WordPress is a blog platform developed with PHP language. Users can set up their own website on the server supporting PHP and MySQL database.
Download from the official websiteWordPressIf the speed is slow, it can be downloaded locally and uploaded to the server through SCP. Unzip it through the unzip command. My lamp directory is
/var/www/html/So unzip and store it in this directory.
Access in browser
lamp.test.com/wordpress/wp-admin/setup-config.php, the following page appears to tell us to configure the database.
View database status
systemctl status mysqld, showing that it is running.
Log in to the database, create a new database and test the user who uses the database.
create database wordpress_test; mysql> GRANT ALL ON wordpress_test.* TO 'tester'@'192.168.1.10' IDENTIFIED BY "A123bbcvoa$";
wordpressDirectory to generate relevant database configuration files.
cp wp-config-sample.php wp-config.php
wp-config.phpFile, fill in your own database information.
/** The name of the database for WordPress */ define( 'DB_NAME', 'wordpress_test' ); /** MySQL database username */ define( 'DB_USER', 'tester' ); /** MySQL database password */ define( 'DB_PASSWORD', 'A123bbcvoa$' ); /** MySQL hostname */ define( 'DB_HOST', '192.168.1.10' );
Restart Apache and visit again
lamp.test.com/wordpress/wp-admin/setup-config.php, clickLet’s go!Button, if the following error prompt appears, adjust SELinux settings.
Temporary shutdown, invalid after restart.
Permanent shutdown, but there is a system security risk.
vim /etc/selinux/config SELINUX=disabled
Set the Boolean value of each rule of SELinux policy flexibly to realize the normal operation of httpd.
getsebool -a | grep httpd | grep -v grep
Set off to on.
setsebool -P http_can_network_connect=1
This time, I successfully enter the personal information setting page, and log in after registration.
Click the appearance to make simple settings, and the personal home page is completed.
This work adoptsCC agreementReprint must indicate the author and the link of this article