Nginx支持web界面执行bash|python等系统命令和脚本

发布时间 2023-06-15 16:22:49作者: 属于我的梦,明明还在
##关闭防火墙
##(centos6)
service iptables stop
chkconfig iptables off
##(centos7)
systemctl stop firewalld
systemctl disable firewalld

#关闭selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0

#已有epel源的跳过此步骤,直接安装依赖开始
#centos6 添加epel yum源
wget -O /etc/yum.repos.d/epel-6.repo http://mirrors.aliyun.com/repo/epel-6.repo

#centos7 添加epel yum源 
wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo

#清除缓存 重新生成缓存
yum clean all
yum makecache

#安装开发包组和相关的依赖包
yum install dh-autoreconf fcgi fcgi-devel -y