yum install -y epel-*
yum install -y nginx mariadb-server php php-MySQL \
php-fpm php-pdo php-pdo_dblib php-gd php-pear \
php-xml php-pecl-zip php-json php-devel wget vim
nginx的web主目录mkdir /var/wwwroot
cd /var/wwwroot
echo -e hello_world >> index.html
echo -e "" >> info.php
nginx的配置文件vim /etc/nginx/nginx.conf
nginx主目录和索引http下的server下的root的值修改为/var/wwwroothttp下的server下添加index index.php index.html index.htmhttp下的server区块加入以下内容 location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
nginx和php-fpmsystemctl start nginx php-fpm
systemctl enable nginx php-fpm
setenforce 0
systemctl stop firewalld
systemctl disable firewalld
访问http://[centos_ip]/info.php

成都创新互联-专业网站定制、快速模板网站建设、高性价比大新网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式大新网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖大新地区。费用合理售后完善,十多年实体公司更值得信赖。
MySQLsystemctl start mariadb
systemctl enable mariadb
MySQLmysql_secure_installation
Enter current password for root (enter for none):敲击回车
Set root password? [Y/n]按Y,随后设置密码
Remove anonymous users?意思为是否删除匿名用户
Disallow root login remotely?意思为远程禁止root登录吗?
Remove test database and access to it?意思为删除测试数据库吗?
Reload privilege tables now?意思为现在重新加载特权表吗?
mysql -uroot -p
cd /var/wwwroot
rm -rf index.html
rm -rf info.php
wget https://cn.wordpress.org/wordpress-4.9.4-zh_CN.tar.gz
tar -zxvf wordpress-4.9.4-zh_CN.tar.gz
cp -rf /var/wwwroot/wordpress/* /var/wwwroot
cd /var/wwwroot
rm -rf wordpress
chmod -R 777 *
mysql -uroot -p
CREATE DATABASE wordpress;
访问http://[centos_ip]/
按提示安装即可