xq8995209 发表于 2018-11-14 13:02:39

nginx 安装脚本

  #!/bin/sh
  yum install gcc c++ &&
  cd /root/source
  cat /etc/passwd | grep web
  if [ $? -ne ]
  then
  useradd -M -s /sbin/nologin
  fi
  echo ####install prce ######
  #wget https://sourceforge.net/projects/pcre/files/pcre/8.41/pcre-8.41.tar.gz/download &&
  #tar -xf download
  cd pcre-8.41
  ./configure && make && make install
  echo #### install nginx #####
  cd /root/source
  wget http://nginx.org/download/nginx-1.8.1.tar.gz &&
  tar -xf nginx-1.8.1.tar.gz && cd./nginx-1.8.1
  ./configure --prefix=/usr/local/nginx --user=web --group=web --with-http_stub_status_module --with-http_ssl_module &&
  [ $? != 0 ] && err_exit "nginx configure err"
  make
  [ $? != 0 ] && err_exit "nginx make err"
  make install
  [ $? != 0 ] && err_exit "nginx make install err"
  cd /lib
  ln -s libpcre.so.0.0.1 libpcre.so.1
  /usr/local/nginx/sbin/nginx

页: [1]
查看完整版本: nginx 安装脚本