一键安装nginx-1.12.2,安装目录/apps/nginx-1.12.2

#!/bin/bash
#auto install nginx
#by sunny

#add user
groupadd nginx 
useradd nginx -M -s /sbin/nologin -g nginx


yum install pcre-devel gcc gcc-c++ zlib-devel openssl-devel -y

#download
wget http://nginx.org/download/nginx-1.12.2.tar.gz
tar xvf nginx-1.12.2.tar.gz -C /usr/local/src/ 
cd /usr/local/src/nginx-1.12.2

#install nginx
mkdir /apps

sleep 2

/usr/local/src/nginx-1.12.2/configure \
--prefix=/apps/nginx-1.12.2 \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-pcre

make &&make install

  

相关文章:

  • 2021-11-07
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
猜你喜欢
  • 2021-04-11
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案