CentOS操作系统是商业版Red Hat Enterprise Linux(RHEL)的免费版,是架构LAMP的理想操作系统,稳定性非常好,和Ubuntu不同的是,CentOS主要用于服务器而不是桌面环境,不少大型的商业网站都使用CentOS操作系统,我在《LAMP网站架构方案分析》中曾经讲述了一系列架构方案,这里以CentOS为例具体讲一下LAMP环境的安装和搭建。
官方文档:https://nginx.org/en/linux_packages.html#RHEL-CentOS
安装环境:Linux 服务器 CentOS 7.3、Root 权限
1、Install the prerequisites:
sudo yum install yum-utils
2、To set up the yum repository, create the file named /etc/yum.repos.d/nginx.repo with the following c