首页 / UBUNTU / ubuntu编译安装nginx
ubuntu编译安装nginx
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了ubuntu编译安装nginx,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1979字,纯文字阅读大概需要3分钟。
内容图文
更新源:apt-get update升级软件:apt-get upgrade
更新系统:apt-get dist-upgrade
apt-get install openssl
apt-get install libssl-dev
yum -y install openssl openssl-devel
groupadd www-data
useradd -g www-data www-data
以上乱扯可能会用到
下载 zlib pcre openssl
./configure --prefix=/usr/local/tengine --user=www-data --group=www-data --with-zlib=/home/zlib-1.2.8 --with-pcre=/home/pcre-8.36 --with-openssl=/home/openssl-1.0.1k
(这里的 zlib pcre 和 openssl 都是下载的 文件解压后的路径)
Configuration summary
+ using PCRE library: /home/pcre-8.36
+ using OpenSSL library: /home/openssl-1.0.1k
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using zlib library: /home/zlib-1.2.8
+ jemalloc library is disabled
nginx path prefix: "/usr/local/tengine"
nginx binary file: "/usr/local/tengine/sbin/nginx"
nginx configuration prefix: "/usr/local/tengine/conf"
nginx configuration file: "/usr/local/tengine/conf/nginx.conf"
nginx pid file: "/usr/local/tengine/logs/nginx.pid"
nginx error log file: "/usr/local/tengine/logs/error.log"
nginx http access log file: "/usr/local/tengine/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx dso module path: "/usr/local/tengine/modules/"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
要启动nginx,直接执行/usr/local/nginx/sbin/nginx命令即可。一旦nginx启动后,便可以通过nginx加-s参数调用来控制它。使用的语法格式为:
nginx -s signal
其中signal可以为如下参数的一种:
* stop 快速关闭
* quit 优雅的关闭
* reload 重新加载配置文件
* reopen 重新打开log文件
修改PATH 变量 使 替换 #/usr/local/nginx/sbin/nginx # nginx
修改 /etc/profile 最后添加一行
export PATH=/usr/local/tengine/sbin:$PATH
//重启
source /etc/profile
添加开机启动
echo "/usr/local/tengine/sbin/nginx" >>/etc/rc.local
以上就介绍了ubuntu 编译安装 nginx,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
内容总结
以上是互联网集市为您收集整理的ubuntu编译安装nginx全部内容,希望文章能够帮你解决ubuntu编译安装nginx所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。