Как установить JOOMLA CMS на CENTOS 7

To install the LAMP stack in CentOS that works with Joomla, copy and paste the commands below.

sudo yum update && sudo yum install httpd mariadb-server mariadb php php-mysql php-curl php-gd php-pear php-memcache php-pspell php-snmp php-xmlrpc

Next, you’ll need to configure a database and a database user for Joomla to use. To do that, run the commands below to start the database server.

sudo systemctl start mariadb.service
systemctl enable mariadb

Then run the commands below to configure the database server.

sudo mysql_secure_installation

Next, choose Yes for the rest of the prompts until you’re done. Enter current password for root (enter for none): press Enter Set root password? Y New password:

Type new root password Re-enter new password:

Confirm the password Remove anonymous users? Y

Disallow root login remotely? Y

Remove test database and access to it? Y

Reload privilege tables now? Y

After that, run the commands below to sign on to the database

 mysql -u root -p

Then run the SQL statement below to create a database called JoomlaDB

 CREATE DATABASE JoomlaDB;

Next, create a database user called JoomlaDBUser

CREATE USER JoomlaDBUser@localhost IDENTIFIED BY 'password_here';

Finally, grant all privileges to JoomlaUser for JoomlaDB

GRANT ALL ON JoomlaDB.* TO JoomlaDBUser@localhost;

Exit and you’re done. When you’re done with creating the database, go and download Joomla content. To do that, run the commands below.

cd /tmp/ && wget https://github.com/joomla/joomla-cms/releases/download/3.5.1/Joomla_3.5.1-Stable-Full_Package.zip

Then run the commands below to unzip or extract the downloaded content

sudo unzip -q Joomla*.zip -d /var/www/html

Next, change the ownership of the directory to Apache2

 sudo chown -R apache:apache /var/www/html

Then change the permissions on the directory by running the commands below.

sudo chmod -R 755 /var/www/html

Restart Apache2

sudo systemctl restart httpd.service 
systemctl enable httpd.service

To access the site, you must enable HTTP traffic remotely since all traffic except SSH are blocked by default on CentOS. To open the post, run the commands below.

sudo firewall-cmd --permanent --zone=public --add-service=http

Reload the firewall.

sudo firewall-cmd --reload

Now try to access the page and you should see Joomla setup page.