Linux serverNETWORK ADMINISTRATIONS

How to install WordPress on CentOS 7

(1st Step) We need to install apache and php
[root@wp ~]# yum install httpd –y
[root@wp ~]# firewall-cmd –permanent –add-service=http
[root@wp ~]# firewall-cmd –reload
[root@wp ~]# systemctl start httpd
[root@wp ~]# systemctl enable httpd

(2nd Step) We need to install php
[root@wp ~]# yum install php php-pear php-mbstring php-gd php-mysql –y
[root@wp ~]# vim /etc/php.ini
go to 879 line and comment out this line, then edit this-
( date.timezone = “Asia/Dhaka” )
[root@wp ~]# systemctl restart httpd

3rd Step (We need to install and configure mariadb)
[root@wp ~]# yum install mariadb-server mariadb -y
[root@wp ~]# vim /etc/my.cnf
add this line in [mysqld]
‘character-set-server=utf8’

[root@wp ~]# firewall-cmd –permanent –add-service=mysql
[root@wp ~]# firewall-cmd –reload
[root@wp ~]# systemctl start mariadb
[root@wp ~]# systemctl enable mariadb
[root@wp ~]# mysql_secure_installation
[root@wp ~]# mysql -u root –p [check database]
Enter password:

4th Step (Now need to create a database for wordpress)
after connecting the database-
create database wpdb;
create user wpuser@localhost identified by ‘ric786’;
grant all privileges on wpdb.* to wpuser@localhost;
flush privileges;
exit

5th Step (download and install wordpress)
[root@wp ~]# yum install wget –y
[root@wp ~]# wget http://wordpress.org/latest.tar.gz

[root@wp ~]# tar -xvf latest.tar.gz
[root@wp ~]# cp -rf wordpress/* /var/www/html/
[root@wp www]# cd /var/www/
[root@wp www]# chown -R apache:apache /var/www/html
[root@wp www]# chcon -R –reference /var/www /var/www/html

Last Setp (Install WordPress)

source

centos 7

Leave a Reply

Your email address will not be published. Required fields are marked *