yum -yinstall mariadb mariadb-server php php-server wget php-fpm php-mysql
#Start httpd, MariaDB, and initialize mailadb
systemctl start mariadb httpd
mysql_secure_installation #Set the database root user password
2、Test php
echo"<?php phpinfo(); ?>"> /var/www/html/phpinfo.php
Open browser to access native IP
http://192.168.200.10/phpinfo.php
3、Download WordPress and configure
# wget https://wordpress.org/wordpress-4.9.tar.gz
You can download it to the computer first and then transfer it to the server
Tar decompression package
tar-zxf wordpress-4.9.tar.gz
Log in to MySQL and create WordPress database and user
MariaDB [(none)]> create database `wordpress-db`;
MariaDB [(none)]> grant all privileges on `wordpress-db`.* to 'wordpress'@'localhost' identified by '000000';
MariaDB [(none)]> flush privileges;
Create and edit WP config PHP file
[root@server ~]# cp wordpress/wp-config-sample.php wordpress/wp-config.php
[root@server ~]# vi wordpress/wp-config.php
Modify database name, database user and password
Copy the contents of WordPress installation directory
Top comments (0)