1.编写脚本自动部署反向代理.web.nfs: #!/bin/bash #检测安装nginx function detection_nginx(){ if [ -f /etc/nginx/nginx.conf ] then echo 'nginx has been installed' exit else then yum install epel-release -y yum install nginx -y echo 'nginx successfully installed' fi } #