nginx安装(在SUSE11SP1下)

举报
费德勒 发表于 2017/03/16 14:45:01 2017/03/16
【摘要】 nginx安装指南。

零、说明
1、下载所需要的包,如附件所示
2、下载的包都上传到/root/nginx目录下
3、所有的安装到/usr/local下

一、安装pcre
1、解压tar zxvf pcre-8.35.tar.gz
2、运行配置:./configure --prefix=/usr/local/pcre-8.35 --libdir=/usr/local/lib/pcre
--includedir=/usr/local/include/pcre
3、编译:make
4、make install

二、安装openssl
1、解压tar zxvf openssl-1.0.0h.tar.gz
2、运行配置:./config --prefix=/usr/local/openssh
3、编译:make
4、make install

三、安装zlib
1、rpm -ivh zlib-devel-1.2.3-106.34.x86_64.rpm

四、安装nginx

./configure --prefix=/usr/local/nginx --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --with-http_dav_module --with-http_flv_module --with-http_realip_module --with-http_gzip_static_module --with-http_stub_status_module --with-mail --with-openssl=/root/nginx/openssl-1.0.0h --with-mail_ssl_module --with-debug --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --http-scgi-temp-path=/var/tmp/nginx/scgi --with-pcre=/root/nginx/pcre-8.35/


注意--prefix是待安装的目录
--with-pcre=/root/nginx/pcre-8.35/是指第一步解压出来的文件夹
--with-openssl=/root/nginx/openssl-1.0.0h是指第二步解压出来的文件夹

五、启动nginx
/usr/local/nginx/sbin/nginx
当不指定配置文件时,默认配置文件为conf/nginx.conf
修改配置文件,重新载入,可以使用
/usr/local/nginx/sbin/nginx -s reload

作者 | 甘泉

转载请注明出处:华为云博客 https://portal.hwclouds.com/blogs

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

举报
请填写举报理由
0/200