Ubuntu 13.04 安装最新版本的Nginx
如何编译安装请参考我的另一篇博客:http://blog.csdn.net/sheismylife/article/details/6744394
如何直接使用Ubuntu默认的Nginx版本,请参考:http://blog.csdn.net/sheismylife/article/details/8140591
但是默认在Ubuntu13.04下安装得到的Nginx版本居然是1.2.x,太低了。
下面描述如何获取最新的安装包:
1.添加key
wget http://nginx.org/keys/nginx_signing.key
apt-key add nginx_signing.key
2.创建/etc/apt/sources.list.d/nginx.list文件,内容如下:
deb http://nginx.org/packages/mainline/ubuntu/ raring nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ raring nginx
3.更新及安装:
apt-get update
apt-get install nginx
4.检查一下版本
nginx -v
nginx version: nginx/1.5.0
5. 命令行
前面的安装在/etc/init.d/目录下创建了nginx脚本,该脚本支持几个命令参数:
echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload|upgrade|configtest}" >&2
非常好用。比如测试配置的参数:
service nginx configtest
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
6. 进程id
官方文档说:http://nginx.org/en/docs/control.html
进程id文件默认在
/usr/local/nginx/logs/nginx.pid
但实际上在nginx脚本文件中将其放在了
/var/run/nginx.pid
7. 编译选项,用-V可以查看编译nginx程序编译时的选项:
nginx -V
nginx version: nginx/1.5.0
built by gcc 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-http_spdy_module --with-ipv6
基本够用,如果要打开debug日志的话,此版本没有。需要自己编译Nginx,并使用下面的参数:
--with-debug
参考官方文档:http://nginx.org/en/docs/debugging_log.html
Ubuntu 13.04 安装最新版本的Nginx相关推荐
- linux安装nginx1.14.0,Ubuntu 14.04 安装最新稳定版Nginx 1.6.0
Ubuntu14.04默认安装的是Nginx 1.4.6 如果已经安装,请先卸载 sudo apt-get remove nginx 最新的稳定版Nginx 1.6.0在ubuntuupdates p ...
- Ubuntu 18.04 安装最新版本wine(支持微信、企业微信)
目录 1.下载FAudio依赖包 2. 安装libfaudio 3. 安装wine 4.安装exe文件 5. 常见问题 问题1: wine使用微信遇到的输入框焦点问题 问题2:中文乱码问题 其他已知问 ...
- Ubuntu: 安装最新版本的 Nginx
Ubuntu 默认 apt 源中的 Nginx 版本比较旧,今天介绍下如何在 Ubuntu 中安装最新版本的 Nginx. 要安装较新版本的 Nginx, 可以使用 Nginx 的 APT 源.执行如 ...
- 深度Linux13,Ubuntu 13.04安装Linux Deepin特色软件
最新版本的 Linux Deepin 12.12 RC 已经将基础仓库升级到了 Ubuntu Raring,Linux Deepin 开发的特色软件,简单易用,其他发行版本的开发者应该尽量移植.因为 ...
- ubuntu安装linux deepin,Ubuntu 13.04安装Linux Deepin特色软件
最新版本的 Linux Deepin 12.12 RC 已经将基础仓库升级到了 Ubuntu Raring,Linux Deepin 开发的特色软件,简单易用,其他发行版本的开发者应该尽量移植.因为 ...
- ubuntu 20.04 设置网关_如何把Ubuntu升级到Ubuntu 20.04 LTS 最新版本
请关注本头条号,每天坚持更新原创干货技术文章. 如需学习视频,请在微信搜索公众号"智传网优"直接开始自助视频学习 1. 前言 本文主要介绍如何把Ubuntu 旧版本升级到最新的Ub ...
- Ubuntu 13.04安装搜狗输入法
目标:在Ubuntu 13.04以及基于Ubuntu的发行版上安装fcitx小企鹅输入法,并安装Linux版本搜狗输入法. 方法: 提供两种输入法,一种添加PPA安装,第二种直接添加源安装. 实现过程 ...
- linux steam输入法,Ubuntu 13.04安装搜狗输入法
目标:在Ubuntu 13.04以及基于Ubuntu的发行版上安装fcitx小企鹅输入法,并安装Linux版本搜狗输入法. 方法: 提供两种输入法,一种添加PPA安装,第二种直接添加源安装. 实现过程 ...
- ubuntu 16.04 安装最新的 docker
转载地址:https://www.cnblogs.com/tianhei/p/7802064.html 本文将介绍在ubuntu16.04系统下安装和升级docker.docker-compose.d ...
最新文章
- 下载安装tomcat6.0
- Database:Database数据库的简介、类型及其区别(关系数据库VS非关系型数据库)、案例应用之详细攻略
- 佳明245接收微信消息
- boost::program_options模块实现一个用户定义的类来解析 特定机制——不是默认使用的 iostream 操作的测试程序
- C++中extern关键字使用 http://blog.csdn.net/sruru/article/details/7951019
- java正则表达式 匹配()_学习Java正则表达式(匹配、替换、查找)
- Qt实用快捷键(较全面)
- 温升测试总结setllom解胶剂
- window.location.href和window.location.replace
- Eclipse—如何为Eclipse开发工具中创建的JavaWeb工程创建Servlet
- cmd窗口命令行上移下移_微软新版命令行界面:Windows Termina...
- PySide6将ui文件编译为py文件
- 关于太阳(卫星)天顶角,太阳高度角,太阳方位角
- centos7mysql错误代码7_CentOS7下安装mysql5.7及mysql登录错误
- 火车票能不能选座_电话订火车票可以自己选座位吗
- C++进阶与拔高(五)(C++ STL utility和iterator)
- mac的ftp工具-cyberduck
- 云原生之使用Docker部署Python应用
- 数字孪生天然气管道解决方案
- 双剑合璧:springboot打包将vue引入
热门文章
- java 性能瓶颈_如何通过 Java 线程堆栈来进行性能瓶颈分析?
- php状态机,有限状态机FSM的原理与GO的实现
- amd860k能装黑苹果吗_我的电脑可以安装黑苹果吗?
- PowerShell实现“机器人定时在企业微信群中发送消息”功能(上)
- 用java编写一个故事的程序_使用Java怎么编写一个递归程序
- Win + Appium + Android/IOS + Python环境搭建
- 后端服务接口都在测试什么?怎么测?
- c语言期终试卷,谁有c语言的往年期中试卷么
- pandas 作图 统计_pandas数据作图方法
- 基于图像的小麦真菌病害深度学习识别(数据+平台)