一、 安装仓库
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm
二、 安装PHP7.0
#批量安装,之后不够补哪个
sudo yum install -y php72u-fpm;
sudo yum install php72u-gd php72u-mysqlnd php72u-pdo php72u-mbstring php72u-xmlrpc php72u-pecl-memcached php72u-curl php72u-pdo_mysql php72u-json php72u-xml -y
#启动php-fpm
systemctl restart php-fpm
#开机启动
systemctl enable php-fpm
三、 安装Nginx
#安装NGINX;
yum install nginx -y
#启动nginx
systemctl start nginx;
#开机自启动
systemctl enable nginx;
四、 配置PHP-fpm
#打开
vim /etc/php-fpm.d/www.conf
#修改user=php-fpm
user=nginx
#重启php-fpm
systemctl restart php-fpm
五、配置NGINX、里面太多了
六、按照Mariadb
# 删除系统自带的 MariaDB
sudo yum remove mariadb-libs -y
# 安装新的 MariaDB
sudo yum install mariadb100u mariadb100u-server -y
# 启动
sudo systemctl start mariadb
# 设置为开机自动启动
sudo systemctl enable mariadb
#执行安全设置
mysql_secure_installation
# 安全设置的问题
# Enter current password for root (enter for none):
输入当前 root 用户的密码
# Set root password? [Y/n]
想要设置 root 用户的密码吗?
#New password:
输入 root 用户的新密码
#Re-enter new password:
重新输入为 root 用户设置的密码
#Remove anonymous users? [Y/n]
要删掉匿名用户吗?
#Disallow root login remotely? [Y/n]
要禁用 root 用户远程登录吗?
#Remove test database and access to it? [Y/n]
想要删掉 test 这个数据库吗?
#Reload privilege tables now? [Y/n]
现在就要重新载入权限吗?