安装软件仓库
sudo yum install epel-release -y
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
1、nginx
sudo yum install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx
sudo systemctl reload nginx
2、php
rpm -Uvh https://dl.Fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum list php* 查看php相关信息、所有扩展
sudo yum install php72w php72w-fpm php72w-gd php72w-mysqlnd php72w-pdo php72w-mcrypt php72w-mbstring php72w-json php72w-opcache php72w-xml -y
sudo systemctl enable php-fpm
sudo systemctl start php-fpm
sudo systemctl reload php-fpm
3、mysql
sudo yum remove mariadb-libs -y
sudo yum install mariadb101u-server -y
sudo systemctl enable mariadb
sudo systemctl start mariadb
mysql -v: 查看版本
4、数据库权限密码设置:
mysql_secure_installation
Disallow root login remotely? [Y/n] n
5、配置可以远程连接登陆
mysql -uroot -p
use mysql;
grant all privileges on *.* to root@'%' identified by "密码";
grant all privileges on *.* to root@'%' identified by "密码";
flush privileges;
6、配置linux常用软件
yum install lrzsz -y;
yum install unzip -y;
yum install zip -y;