cat /etc/yum.repos.d/local.repo //配置yum源[centos]name=centosbaseurl=file:///opt/centosgpgcheck=0enabled=1[lnmp]name=lnmpbaseurl=file:///root/project3/lnmpgpgcheck=0enabled=1yum -y install nginx mariadb-server mariadb php-fpm php-mysqlsystemctl start nginx && systemctl enable nginxvi /etc/nginx/conf.d/default.conf location / { root /usr/share/nginx/html; index index.php index.html index.htm; } location ~ \.php$ { root /usr/share/nginx/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }systemctl restart nginx systemctl start mariadb && systemctl enable mariadb //启动数据库mysql_secure_installation //初始化数据库mysql -uroot -p123456 //登录数据库> create database wordpress; //创建数据库服务> grant all privileges on *.* to root@localhost identified by '123456' with grant option; //授权所有用户拥有本地数据库的所有权限。> grant all privileges on *.* to root@"%" identified by '123456' with grant option; //授权用户可进行远程登录vi /etc/php-fpm.d/www.confsystemctl start php-fpm && systemctl enable php-fpmuser = nginx; RPM: Keep a group allowed to write in log dir.group = nginx unzip wordpress-4.7.3-zh_CN.zipcd /usr/share/nginx/html rm -rf *cp -rvf /root/wordpress/* ./cp wp-config-sample.php wp-config.phpchmod 777 *vi wp-config.php// ** MySQL 设置 - 具体信息来自您正在使用的主机 ** ///** WordPress数据库的名称 */define('DB_NAME', 'wordpress');使用Curl命令,返回前端页面/** MySQL数据库用户名 */define('DB_USER', 'root');/** MySQL数据库密码 */define('DB_PASSWORD', '123456');/** MySQL主机 */define('DB_HOST', '127.0.0.1');/** 创建数据表时默认的文字编码 */define('DB_CHARSET', 'utf8');/** 数据库整理类型。如不确定请勿更改 */define('DB_COLLATE', '');