shell一键源码安装nginx

vim nginx_php.sh
#!/bin/bash
systemctl stop firewalld
setenforce 0
wget http://nginx.org/download/nginx-1.16.1.tar.gz
if [ $? -ne 0 ];then
        echo "下载nginx.tar包出问题"
        exit
fi
yum -y install gcc gcc-c++ zlib-devel pcre-devel php php-fpm php-mysql php-gd
tar zxf nginx-1.16.1.tar.gz
cd nginx-1.16.1 && ./configure && make && make install
/usr/local/nginx/sbin/nginx
sh nginx_php.sh

测试:
在这里插入图片描述

发布了139 篇原创文章 · 获赞 240 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/a13568hki/article/details/103799736