日积硅步,致以千里!

小沙粒不渺小

醉后不知天在水,满船清梦压星河。

web服务器之nginx

安装:

1 环境准备 gcc yum install gcc-c++

                    pere            (解析正则表达式)
                    zlib               zlib库提供了很多种压缩和解压缩的方式,nginx使用zlib对http包的内容进行gzip
                    openssl          nginx不仅支持http协议,还支持https(即在ssl协议上传输http)
# yum -y install pcre  pcre-devel zlib  zlib-devel openssl openssl-devel

2 上传nginx-1.14.1.tar.gz 至home/iotest,并解压( tar -zxvf  nginx-1.14.1.tar.gz)
 
3 copy -r nginx-1.14.1 /usr/local
 
4 tar -zxvf openssl-1.1.0h.tar.gz /usr/local/src
 
5 编译 ./configure --user=nginx --group=nginx --prefix=/etc/nginx --sbin-path=/usr/sbin --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/cache/nginx/client_body --http-proxy-temp-path=/var/cache/nginx/proxy --http-fastcgi-temp-path=/var/cache/nginx/fastcgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-poll_module --without-select_module --without-http_charset_module --without-http_autoindex_module --without-http_geo_module --without-http_map_module --without-http_referer_module --without-http_empty_gif_module --without-http_browser_module --without-mail_imap_module --without-mail_smtp_module --without-http_scgi_module --without-http_uwsgi_module --without-http_fastcgi_module --with-http_ssl_module --with-md5=/usr/lib64/openssl/ --with-sha1=/usr/lib64/openssl/ --with-openssl=/usr/local/src/openssl-1.1.0h
 
6 mkdir -p /var/cache/nginx  &  mkdir -p /etc/nginx  &   mkdir -p  /var/log/nginx
 
7 make&make install
 
8 新增nginx用户 useradd -s /sbin/nologin -M nginx (id nginx)
 
9 启动 /usr/sbin/nginx

 

posted @ 2020-05-21 11:31  小沙粒不渺小  阅读(127)  评论(0编辑  收藏  举报