怎样在linux下安装nginx,pcre,zlib,openssl

如题所述

liunx安装nginx-1.10.2如下


yum -y install gcc gcc-c++  ncurses-devel libxml2-devel \
openssl-devel curl-devel libjpeg-devel libpng-devel autoconf pcre-devel \
libtool-libs freetype-devel gd zlib-devel  zip unzip \
wget crontabs iptables file bison cmake patch mlocate \
flex diffutils automake make  readline-devel  \
glibc-devel glibc-static glib2-devel  bzip2-devel \
gettext-devel libcap-devel logrotate ntp \
libmcrypt-devel patch  ---安装nginx需要的组件 


wget  http://nginx.org/download/nginx-1.10.2.tar.gz  --获取nginx


tar -zxvf ./nginx-1.10.2.tar.gz 
cd ./nginx-1.10.2
 
./configure --with-stream  ---开启tcp代理
 --with-http_ssl_module    ---开启https服务
 --with-http_stub_status_module   --开启http状态模块
make    --编译nginx  
make install     ---安装nginx

chkconfig nginx on   ---nginx开机启动

温馨提示:答案为网友推荐,仅供参考
相似回答