Thursday, July 13, 2017

Installing joomla on Centos 7

ssh into your server as root (assuming your server ip is 10.0.0.100)
# ssh root@10.0.0.100

Install database mariadb
# yum install mariadb-server

start mariadb

# systemctl start mariadb

secure mariadb installation and answer yes (this will remove anonymous user, test database, and set root password)
# mysql_secure_installation

create database
# mysql -u root -p
# mariadb> create database joomla;


create user in mariadb
# mariadb> create user joomlauser@localhost;

grant privilege for user to access database
# mariadb> grant all privileges on joomla.* to joomlauser@localhost identified by 'password';

flush privileges
# mariadb> flush privileges;

# exit

Install httpd
# yum install httpd

start httpd

# systemctl start httpd

Install epel
# yum install epel-release

Install php php-mysql php-mcrypt
# yum install php php-mysql php-mcrypt php-xml php-zlib php-json


Restart httpd
# systemctl restart httpd

Download joomla
# wget https://downloads.joomla.org/cms/joomla3/3-7-3/Joomla_3.7.3-Stable-Full_Package.zip?format=zip

Make directory /var/www/html/joomla
# mkdir /var/www/html/joomla

Extract joomla zip file to /var/www/html/joomla
# unzip Joomla*zip -d /var/www/html/joomla


Set apache as owner and group owner
# chown apache.apache -R /var/www/html/joomla

Set permission for apache as user to read/write/exec
# chmod 755 -R /var/www/html/joomla

Allow http in firewall, and make it permanent
# firewall-cmd --add-service=http

# firewall-cmd --add-service=http --permanent

Use your favorite browser to browse to http://10.0.0.100/joomla

Follow the wizard to complete joomla installation, providing mariadb username and password set above

Remove joomla installation directory
# rm -rf /var/www/html/joomla/installation


Once finished, browse to http://10.0.0.100/joomla for user site, or http://10.0.0.100/joomla/administrator for admin site


Done

No comments: