安装nginx步骤
useradd -s /sbin/nologin -M nginx
id nginx
mkdir -p /var/lib/nginx/tmp/client_body
yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake
yum -y install wget httpd-tools vim
安装OpenSSL https://www.openssl.org/source/
tar -zxvf openssl-fips-2.0.2.tar.gz
cd openssl-fips-2.0.2
./config
make
make install
安装zlib http://www.zlib.net/
tar -zxvf zlib-1.2.7.tar.gz
cd zlib-1.2.7
./configure
make
make install
安装pcre https://sourceforge.net/projects/pcre/files/pcre/
tar -zxvf pcre-8.21.tar.gz
cd pcre-8.21
./configure
make
make install
安装其他组件
yum -y install openssl openssl-devel
yum -y install libxml2 libxml2-dev
yum -y install libxslt-devel
yum install gd gd-devel
yum -y install perl-devel perl-ExtUtils-Embed
yum install -y GeoIP-devel.x86_64
yum -y install gperftools
安装nginx
wget http://nginx.org/download/nginx-1.16.1.tar.gz
tar -zxvf nginx-1.16.1.tar.gz
cd nginx-1.16.1
./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-ipv6 --with-http_auth_request_module --with-http_ssl_module
make
make install
启动nginx
网友评论