LNMP安装环境
1、安装nginx1.14
[root@localhost ~]# wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
[root@localhost ~]#vim /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
其中baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/,把“OS”替换成“rhel”或“centos”,把“OSERELESE”替换成“6”或“7”
[root@localhost ~]#yum clean all
[root@localhost ~]#yum list
[root@localhost ~]# yum -y install nginx
[root@localhost ~]# systemctl start nginx
[root@localhost ~]# systemctl enable nginx
2、安装MySQL5.7
[root@localhost ~]# yum -y install mariadb-server mariadb
[root@localhost ~]# systemctl enable mariadb.service
[root@localhost ~]# systemctl start mariadb.service
[root@localhost ~]# mysql_secure_installation
...
Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
...
Remove anonymous users? [Y/n] n
... skipping.
...
Disallow root login remotely? [Y/n] n
... skipping.
...
Remove