[准备工作] #在编译安装lnmp之前,首先先卸载已存在的rpm包. rpm -e httpd rpm -e mysql rpm -e php yum -y remove httpd yum -y remove mysql-server mysql yum -y remove php yum -y remove php-mysql #禁用SeLinux,Selinux可能会致使编译安装失败,我们先禁用它. #sed -i 's/SELINUX=enforcing/SELINUX=disabled…