suse 安装nginx


 nginx 需要的依赖包

gcc gcc-c++ make libtool zlib zlib-devel openssl openssl-devel pcre pcre-devel

如果上述包都没有安装,需先安装。如你的服务器是阿里云服务器的话,直接执行zypper install 包名 ,挨个安装。

否则就wget 到服务器之后,自己安装。

进入正题

安装nginx

1,下载nginx 

http://nginx.org/download/

2, 解压 

tar -zxvf nginx-1.12.0.tar.gz

2,配置  --with-pcre 指定在编译中使用的动态库   --prefix 安装位置

./configure --prefix=/usr/local/nginx --prefix=/usr/local/nginx --with-pcre --with-http_stub_status_module --with-http_ssl_module

3,编译,安装

make

make install

4.测试是否安装成功

切换到/usr/local/nginx目录,执行 ./nginx -t,提示如下信息,说明安装成功

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok

nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM