Install ExpressionEngine on Debian
1. LOG IN TO YOUR SERVER VIA SSH
# ssh root@server_ip
You can check whether you have the proper Debian version installed on your server with the following command:
# lsb_release -a
You should get this output:
Distributor ID: Debian Description: Debian GNU/Linux 8.1 (jessie) Release: 8.1 Codename: jessie
2. UPDATE THE SYSTEM
Make sure your server is fully up to date using:
# apt-get update && apt-get upgrade
3. INSTALL EXPRESSIONENGINE
For the purpose of this tutorial we used the free, feature-limited ExpressionEngine Core version of the product. At the time of writing this article, the latest EE version is 2.10.1 . Therefore, you need to sign up for an account with EllisLab at: https://store.ellislab.com/manage and then download the free version from their store.
Once the download finishes, you need to upload the zip file into your server.
We uploaded the file into a directory of our choice, but feel free to either follow our steps or create a directory to your liking and upload the installation there.
First, create the directory in which the EE installation will be uploaded:
# mkdir /var/www/html/eengine/
Then after the upload is finished, unzip the archive:
# cd /var/www/html/eengine/
# unzip ExpressionEngine_Core2.10.1.zip
Set the proper permissions in order to continue with the installation:
# chmod 666 system/expressionengine/config/config.php # chmod 666 system/expressionengine/config/database.php # chmod 777 system/expressionengine/cache/ # chmod 777 images/avatars/uploads/ # chmod 777 images/captchas/ # chmod 777 images/member_photos/ # chmod 777 images/pm_attachments/ # chmod 777 images/signature_attachments/ # chmod 777 images/uploads/
Our next step is to create the database needed. Log into your MySQL server as root (# mysql -u root -p) and execute the following commands:
mysql> create database eengine; mysql> grant all privileges on eengine.* to euser@localhost identified by 'your_password'; mysql> flush privileges; mysql> exit Bye
Now that the database is created, you should create a virtual host directive for the domain that you will map to the ExpressionEngine installation.
Open a new configuration file:
# vim /etc/apache2/sites-available/your-domain.conf
Paste the following:
<VirtualHost *:80> ServerAdmin email@example.com DocumentRoot /var/www/html/eengine/ ServerName your-domain.com ServerAlias www.your-domain.com <Directory /var/www/html/eengine/> Options FollowSymLinks AllowOverride All </Directory> ErrorLog /var/log/apache2/your-domain.com-error_log CustomLog /var/log/apache2/your-domain.com-access_log common </VirtualHost>
Don’t forget to change the your-domain values with your actual domain.
Enable the configuration file:
# a2ensite your-domain.conf
Restart Apache for the changes to take effect:
# systemctl restart apache2.service
Set the proper file ownership:
# chown -R www-data /var/www/html/eengine/
Next, open your favorite web browser and navigate to http://your-domain/admin.php to run the installation wizard. Follow the on-screen instructions to finish the installation of ExpressionEngine.
Please note that during the installation if you choose the None – Empty Installation Site Theme, your website’s homepage will appear blank because no templates or content has been created yet.
As you can see, you need to remove the system/installer/ directory from your server. Therefore, execute the following command:
# rm -rf /var/www/html/eengine/system/installer/
Congratulations. You have successfully installed ExpressionEngine on your Debian 8 system.