##wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.36/pcre-8.36.tar.gz wget https://o3cex9zsl.qnssl.com/libs/nginx/pcre-8.36.tar.gz tar -zxvf pcre-8.36.tar.gz cd pcre-8.36/ ./configure make make installwget http://nginx.org/download/nginx-1.8.0.tar.gz tar -zxvf nginx-1.8.0.tar.gz cd nginx-1.8.0/ ./configure --prefix=/usr/local/nginx --with-http_ssl_module #追加尾巴 --with-http_addition_module --with-http_sub_module ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_addition_module --with-http_sub_module make make install |
##################################################################
【nginx: [emerg] unknown directive “ssl”】
首先确保机器上安装了openssl和openssl-devel
1 2 |
#yum install openssl #yum install openssl-devel |
然后就是自己颁发证书给自己
1 2 3 4 5 |
#cd /usr/local/nginx/conf #openssl genrsa -des3 -out server.key 1024 #openssl req -new -key server.key -out server.csr #openssl rsa -in server.key -out server_nopwd.key #openssl x509 -req -days 365 -in server.csr -signkey server_nopwd.key -out server.crt |
###################################################################
【启动】
1 2 3 4 |
/usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx -s reload |