vim nginx.sh
mkdir -p /data/software/init_install cd /data/software/init_install/ tar -zxvf nginx-1.4.4.tar.gz tar -zxvf pcre-8.20.tar.gz cd nginx-1.4.4 #在configure之前先查看gcc openssl是否安装yum -y install openssl openssl-devel
yum -y install gcc gcc-c++ #编译与安装nginx ./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.20 --with-pcre-jit --with-http_stub_status_module --with-http_ssl_module make && make install #创建自定义nginx配置目录vhosts mkdir -p /usr/local/nginx/conf/vhosts #创建WEB crossdomain目录 mkdir -p /var/www/crossdomain cd .. cp -rf nginx.conf /usr/local/nginx/conf/nginx.conf cp crossdomain.xml /var/www/crossdomain/ cp crossdomain.conf /usr/local/nginx/conf/vhosts/ /usr/local/nginx/sbin/ngin #添加开机自启动 vim /etc/rc.d/rc.local /usr/local/nginx/sbin/ngin
标签:脚本,crossdomain,--,nginx,usr,conf,local,搭建 From: https://www.cnblogs.com/python-uuu/p/16633681.html