Home / How To / How to install ExpressionEngine CMS on CentOS 8

How to install ExpressionEngine CMS on CentOS 8

ExpressionEngine is a mature, flexible, secure, free open source content management system (CMS) written in PHP. Its source code is hosted on Github. With ExpressionEngine, you can build websites with full functionality, create a web app or serve content to mobile applications. All without requiring complex programming skills. This guide guides you through the ExpressionEngine installation process on a recent CentOS 8 with PHP, MariaDB as a database and Nginx as a web server.


ExpressionEngine requires a web server running PHP and MySQL / MariaDB. The recommended software bundle and versions are:

  • PHP version 7.0 or later, run with PHP-FPM and with the following PHP extensions ( gd fileinfo intl mbstring ).
  • MySQL version 5.6 or later or Percona version 5.6 or later. This tutorial will use MariaDB.
  • A web server such as Nginx or Apache. This tutorial will use Nginx.

Introductory step

Check your CentOS version:

  cat / etc / centos-release 
# CentOS Linux release 8.0.1
905 (Core)

Set the time zone:

  timedatectl list- timezones 
sudo timedatectl set-timezone & # 39; Region / City & # 39;

Update your operating system packages (software). This is an important first step as it ensures that you have the latest updates and security fixes for your operating system's standard software packages:

  sudo yum update -y 

Install some important packages necessary for basic CentOS operating system administration: [19659012] sudo yum install -y curl wget vim git unzip socat bash-finishing epel release

Step 1 – Install PHP

Install PHP, as well as necessary PHP extensions:

  sudo yum install -y php- cli php-fpm php-common php-mbstring php-gd php-intl php-mysql php-json php-zip 

Check PHP version:

  php - version 
# PHP 7.2.19 (cli ) (built: June 2, 2019 9:49:05 AM) (NTS)
# Copyright (c) 1997-2018 PHP Group
# Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies [19659013] To view PHP compiled in modules you can run:

   php -m 

ctype [1 9459018] curl
. . .
. . .

Start and enable PHP-FPM service:

  sudo systemctl start php-fpm.service 
sudo systemctl enable php-fpm.service

Step 2 - Install MariaDB [19659003] Install MariaDB database server:

  sudo yum install -y mariadb server 

Check MariaDB version:

  mysql - version 
# mysql Ver 15.1 Distrib 10.3.11-MariaDB, for Linux (x86_64 ) with readline 5.1

Starting and activating MariaDB service:

  sudo systemctl start mariadb.service 
sudo systemctl enable mariadb.service

Run mysql_secure_installation to improve Maria's security -installation:

  sudo mysql_secure_installation 

Log in to MariaDB as root user:

  sudo mysql -u root -p 
# Enter password:

Create a new MariaDB database and database users, and remember references:

GIVE ALL ON dbname. * TO "username" IDENTIFIED BY & # 39; password & # 39 ;;

NOTE: Replace dbname and username with appropriate names for your installation. Replace password with a strong password.

Step 3 - Install the Acme.sh Client and Obtain Let's # Encrypt Certificate (Optional)

Securing your website with HTTPS is not necessary, but it is a good practice to secure your website traffic. To get an SSL certificate from Let & # 39; s Encrypt, we use the Acme.sh client. Acme.sh is a pure Unix shell software to obtain TLS certificates from Let & # 39; s Encrypt with zero dependencies.

Download and install acme.sh:vud19659009??sudo su - root
git clone https://github.com/ Neilpang / acme.sh.git
cd acme.sh
./ acme.sh - install --accountemail [email protected] source ~ / .bashrc
cd ~

Check acme.sh version:

  acme.sh - version 
# v2.8.3

Get RSA and ECC / ECDSA certificate for your domain / host name:

  # RSA 2048 
acme.sh - emission - standalone - d example.com --keylength 2048
acme.sh --issue - standalone -d example .com - key length ec-256

If you want fake certificates for testing, you can add - Staging flag for the above commands.

After running the above commands, certificate and keys will be in:

  • For RSA : / home /username/example.com directory.
  • For ECC / ECDSA : /home/username/example.com_ecc directory.

To list your issued certificates, you can run:

  acme.sh --list 

Create a directory to store your certificates. We will use a directory / etc / letsencrypt.

  mkdir -p /etc/letsecnrypt/example.com Chapter19659057vardsudo mkdir -p /etc/letsencrypt/example.com_eccebrit19459009????19659010???19459026] Install / Copy Certificate to    / etc / letsencrypt 19659058]  catalog:       

  # RSA 
acme.sh --install-cert -d example.com - cert-file /etc/letsencrypt/example.com/cert.pem --key-file /etc/letsencrypt/example.com/private.key --fullchain-file / etc / letsencrypt / example.com / fullchain.pem --reloadcmd " sudo systemctl reload nginx.service "
acme.sh --install-cert -d example.com --ecc - cert-file /etc/letsencrypt/example.com_ecc/cert.pem - key-file /etc/letsencrypt/example.com_ecc/private.key --fullchain-file /etc/letsencrypt/example.com_ecc/fullchain.pem - -reloadcmd "sudo systemctl reload nginx.service"

All certificates are renewed automatically every 60 days. [19659042] After getting certificate exit from root user and return to normal sudo user:


Step 4 - Install Nginx

Install Nginx web server:

  sudo yum install-n nginx 

Check Nginx version:

  nginx -v 
# nginx version: nginx / 1.12.2

Start and enable Nginx:

  sudo systemctl start nginx.service 
sudo systemctl enable nginx.service

Configure Nginx for ExpressionEngine. Run sudo vi /etc/nginx/conf.d/expressionengine.confebrit19459009] and fill the file with the following configuration.

  server {

listen 443 ssl;
listen 80;

server name example.com;
root / var / www / expressionengine; 
ssl_certificate /etc/letsencrypt/example.com/fullchain.cer; Greece 19459017 vardssl_certificate_key /etc/letsencrypt/example.com.key;strong19459017??# ECDSA
ssl_certificate etc / letsencrypt / example.com_ cancer;
ssl_certificate_key /etc/letsencrypt/example.com_ecc/example.com.key; Chapter19459017] index index.php; location / { index index.php; try_files $ uri $ uri / @ee; } location @ee { write about ^ (. *) /index.php?$1 last; } location ~ * .php $ { fastcgi_pass; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name; } }

Check NGINX configuration for syntax errors:

   sudo nginx -t  

Reload NGINX service:

  sudo systemctl reload nginx.service 

Step 5 - Install ExpressionEngine [19659003] Create a document root directory where ExpressionEngine should be in:

  sudo mkdir -p / var / www / expressionengine 

Navigate to the document root directory:

  cd / var / www / expressionengine 

Download the latest edition of ExpressionEngine and extract the files to a folder on your server:

  sudo wget -O ee.zip - reference https://expressionengine.com/ & # 39; https: //expressionengine.com/? ACT = 243 & # 39 ; 
sudo unzip ee.zip
sudo rm ee.zip

Change the ownership of / var / www / expressionengine directory to nginx:

  sudo chown - R nginx: nginx / var / www / expressionengine 

Run sudo vim /etc/php-fpm.d/www.confebrit19459009] and set the user and group to nginx . Originally they will be set to apache:

  sudo vi /etc/php-fpm.d/www.confospel19459017vard# user = nginx 
# group = nginx

Restart PHP-FPM service: [19659012] sudo systemctl restart php-fpm.service

Point your browser to the URL of the admin.php file that you uploaded. For example: http://example.com/admin.php . Follow the on-screen instructions to install ExpressionEngine. When the installation wizard is complete, you should rename or remove the system / ee / installer / directory from your server.

Step 6 - Complete the ExpressionEngine installation

Complete the ExpressionEngine installation by entering database and administrator account details:

  Set database connection details

After you will see the default login page:

  Login page </p>
<p style=  This is the ExpressionEngine Administration Panel: </p>
<p style=  Administrator Panel

And here is the front page:

  Default Website

That's it! The ExpressionEngine installation is complete.

Source link