Install Apache2 HTTP Server by running the following commands:

  1. $ sudo apt update
  2. $ sudo apt install apache2
  3. Once the installation is done, you can use these three linestostop, startandenable Apache2.
  4. $ sudo systemctl stop apache2.service
  5. $ sudo systemctl start apache2.service
  6. $ sudo systemctl enable apache2.service

Step 2: Get MariaDB Database Server

MariaDB is one of the most popular open source database servers. To install it, you have to run these commands:

  1. $ sudo apt-get install mariadb-server mariadb-client
  2. You can use the following lines to stop, start andenable MariaDB service on Ubuntu 16.04 LTS:
  3. $ sudo systemctl stop mysql.service
  4. $ sudo systemctl start mysql.service
  5. $ sudo systemctl enable mysql.service
  6. For Ubuntu 18.10 and 18.04 LTS, the commands will be like this:
  7. $ sudo systemctl stop mariadb.service
  8. $ sudo systemctl start mariadb.service
  9. $ sudo systemctl enable mariadb.service

Now, it’s time for securing MariaDB with a root password. Type this line:

  1. $ sudo mysql_secure_installation

You will be asked to enter the current root password. Press the Enter button. Then, you will be asked whether you want to set the root password. Hit the Y button. Then, enter and re-enter the new password. Next, you will be prompted to answer the following questions:

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

For all of these cases, hit the Y button.

Now, it’s time to check whether MariaDB works on your machine appropriately or not. Run the following line:

  1. $ sudo mysql -u root -p

You will be asked to insert your root password. Type it accurately.

You will see the screen shown below. Basically, it means that MariaDB has been running on your PC perfectly.

 

Step 3: Get PHP 7.2, Along with the Required Modules

At first, you have to install common software properties and add a required module.

  1. $ sudo apt-get install software-properties-common
  2. $ sudo add-apt-repository ppa:ondrej/php

Next, run this command:

  1. $ sudo apt update

Then install PHP 7.2 and the relevant modules with this line:

  1. $ sudo apt install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mysql php7.2-gmp php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-gd php7.2-bcmath php7.2-xml php7.2-cli php7.2-zip

Next, you have to open PHP default configuration file for apache.

  1. $ sudo nano /etc/php/7.2/apache2/php.ini

Update the configuration file with the following settings:

  1. file_uploads = On
  2. allow_url_fopen = On
  3. short_open_tag = On
  4. memory_limit = 256M
  5. upload_max_filesize = 100M
  6. max_execution_time = 360
  7. date.timezone = America/Chicago

Restart Apache2 web server

  1. $ sudo systemctl restart apache2.service

Now, it’s time for checking whether PHP is working appropriately or not. To do it, you have to create a text file. In this case, we will name it as phpinfo.php.

  1. $ sudo nano /var/www/html/phpinfo.php

Now, go to this URL:

http://localhost/phpinfo.php

If you see the page shown below, PHP is running on Ubuntu perfectly.

 

Step 4: Configure Server and Create Database

Now, it’s time for configuring the server and creating the database. In this tutorial, we will use MariaDB.

First, you will have to log into the MariaDB database server. Run this command:

  1. $ sudo mysql -u root -p

Then, you will have to create a database. Type this line:

  1. CREATEDATABASE e107;

Now, you have to create a database user. In our case, it will be e107user. You will also have to specify the password for the user. Run this command:

  1. CREATEUSER'e107user'@'localhost'IDENTIFIEDBY'new_password_here';

You have to provide e107user with the complete access to the created database. Use these lines of codes:

  1. GRANT ALL ON e107.* TO'e107user'@'localhost'IDENTIFIEDBY'user_password_here'WITHGRANTOPTION;
  2. Save the changes.
  3. FLUSHPRIVILEGES;
  4. EXIT;

Step 5: Get the Latest Version of e107

Open your favorite browser. Go to this link:

https://e107.org/download

Download the latest version of e107, which is 2.1.9 right now.

Unzip the downloaded file to the root directory of Apache2 server with these lines:

  1. $ cd /tmp
  2. $ wget http://sourceforge.net/projects/e107/files/e107/e107%20v2.1.9/e107_2.1.9_full.zip
  3. $ sudo unzip -d /var/www/html/e107 /tmp/e107_2.1.9_full.zip
  4. Now, you have to specify the permission for the root directory of e107 CMS appropriately.
  5. $ sudo chown -R www-data:www-data /var/www/html/e107/
  6. $ sudo chmod -R 755/var/www/html/e107/

Step 6: Configure Apache2 Server

At first, you have to create a new configuration file. In our case, it will be e107.conf.

  1. $ sudo nano /etc/apache2/sites-available/e107.conf

Copy these codes to the e107.conf file. In place of example.com and www.example.com, use your own domain name and the directory root location respectively.

  1. <VirtualHost *:80>
  2. ServerAdmin [email protected]
  3. DocumentRoot /var/www/html/e107
  4. ServerName example.com
  5. ServerAlias www.example.com
  6.  
  7. <Directory /var/www/html/e107/>
  8. Options FollowSymlinks
  9. AllowOverrideAll
  10. Requireall granted
  11. </Directory>
  12.  
  13. ErrorLog${APACHE_LOG_DIR}/error.log
  14. CustomLog${APACHE_LOG_DIR}/access.log combined
  15.  
  16. <Directory /var/www/html/e107/>
  17. RewriteEngineon
  18. RewriteBase /
  19. RewriteCond%{REQUEST_FILENAME} !-f
  20. RewriteRule ^(.*) index.php [PT,L]
  21. </Directory>
  22. </VirtualHost>

Make sure to save the file before exiting.

Step 7: Enable e107 CMS

Enabling e107 is really easy. Just type these lines:

  1. $ sudo a2ensite e107.conf
  2. $ sudo a2enmod rewrite
  3. $ sudo systemctl restart apache2.service

Open your favorite browser. Head to your server domain name.

http://example.com/

The e107 setup wizard will be displayed. Select your preferred language. Then click on the Next button

Fill up the database fields with the required information appropriately. Click on the Continue button.

You will see the Administration page. Here, you will have to configure the admin account. Specify your preferred username, password, and the other required stuff.

Now, e107 has been installed successfully. Now, you can sign in using the admin account that you have just created. If you manage to login using the right credentials, you will see this page:

Conclusion

Now, e107 is ready to use on your operating system. You can use it to make your website up and running in just 5 minutes. If you don’t know to write the code to build websites, it can be incredibly effective for you.

Was this answer helpful? 0 Users Found This Useful (0 Votes)