将wordpress安装包上传到/var/www/html目录
解压缩
unzip wordpress-5.9.3-zh_CN.zip
cp -r wordpress/* ./
修改权限
chown -R apache:apache /var/www/html/*
chmod -R 755 /var/www/html/*
创建数据库
MysqL> create database wordpress;
Query OK, 1 row affected (0.01 sec)
MysqL> create user wordpress_user@localhost identified by 'Huawei@123';
Query OK, 0 rows affected (0.00 sec)
vim wp-config.php
// ** Database settings - You can get this info from your web host ** //
/** The name of the database for wordpress */
define( 'DB_NAME', 'wordpress' );
/** Database username */
define( 'DB_USER', 'wordpress_user' );
/** Database password */
define( 'DB_PASSWORD', 'Huawei@123' );
/** Database hostname */
define( 'DB_HOST', '192.168.10.82' );
/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
重启httpd和MysqL
systemctl restart httpd
打开安装地址
打开:ip:端口/wp-admin/install.PHP