October installation 4.34 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
              October cms installation!!

1.update your system with latest version by using these commands

--->apt-get update -y
--->apt-get upgrade -y

2.first install  apache,mariadb,php modules to your system by running thses commands

--->apt-get install apache2 mariadb-server php7.2 libapache2-mod-php7.2 libapache2-mod-php7.2 php7.2-json php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-tidy php7.2-mysql php7.2-cli php7.2-ldap php7.2-pdo php7.2-zip php7.2-curl php7.2-sqlite3 unzip wget -y

3.after installing all the packages open php.ini file and apply the changes
--->nano /etc/php/7.2/apache2/php.ini
 open php.ini file and make these changes in the code:
      
file_uploads = On


allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 30M
post_max_size = 40M
max_execution_time = 60
max_input_vars = 1500

4.after saving and closing the file then start apache and mariadb service and enable them and start on boot time
first run this command to start apache2
--->systemctl start apache2
after that enable apache2 and again start apache2
--->systemctl enable apache2
--->systemctl start apache2
secondly run this command to start mariadb 
--->systemctl start mariadb
after that enable mariadb and again start  mariadb
--->systemctl enable mariadb
--->systemctl start mariadb
5.mariadb is not secured so secure it by running  script
mysql_secure_installation
6.it will ask some basic  questions and answer it by providing result:
      Enter current password for root (enter for none):

 Set root password? [Y/n]: N
    Remove anonymous users? [Y/n]: Y
    Disallow root login remotely? [Y/n]: Y
    Remove test database and access to it? [Y/n]:  Y
    Reload privilege tables now? [Y/n]:  Y


once it is secured ,then login in to mariadb shell :
--->mysql -u root -p
then enter root password and create database 
> CREATE DATABASE octoberdb;
> CREATE USER 'october'@'localhost' IDENTIFIED BY 'password';
next,grant all users
> GRANT ALL PRIVILEGES ON octoberdb.* TO 'october'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
after that flush and exit from mariadb
> FLUSH PRIVILEGES;
> EXIT;
install octobercms:
1.download the latest version of octobercms from git repository ,,we can download by following command
--->wget https://codeload.github.com/octobercms/install/zip/master-O octobercms.zip
2.unzip the downloaded file
--->unzip octobercms.zip
3.move extracted directory to root directory
--->mv install-master /var/www/html/octobercms
4.give proper permissions
--->chown -R www-data:www-data /var/www/html/octobercms
--->chmod -R 755 /var/www/html/octobercms
5.create apache virtual host file for octobercms
--->nano /etc/apache2/sites-available/octobercms.conf
after that add the following lines
<VirtualHost *:80>
     ServerAdmin admin@example.com
     ServerName 192.168.0.103
     DocumentRoot /var/www/html/octobercms/

     <Directory /var/www/html/octobercms/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>

     ErrorLog /var/log/apache2/october_error.log
     CustomLog /var/log/apache2/october_access.log combined
</VirtualHost>
save and close the file
disable apache default host and restart apache service
--->a2ensite octobercms
--->a2dissite 000-default
next enable apache rewrite module and restart apache service
--->a2enmod rewrite
--->systemctl restart apache2
check the status of apache service
--->systemctl status apache2

you should see the following output:
? apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           ??apache2-systemd.conf
   Active: active (running) since Wed 2019-01-30 10:56:45 UTC; 6s ago
  Process: 6498 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 6517 (apache2)
    Tasks: 1 (limit: 1114)
   CGroup: /system.slice/apache2.service
           ??6517 /usr/sbin/apache2 -k start

Jan 30 10:56:45 ubuntu1804 systemd[1]: Starting The Apache HTTP Server...
Jan 30 10:56:45 ubuntu1804 apachectl[6498]: AH00557: apache2: apr_sockaddr_info_get() failed for ubuntu1804
Jan 30 10:56:45 ubuntu1804 apachectl[6498]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. S
Jan 30 10:56:45 ubuntu1804 systemd[1]: Started The Apache HTTP Server.