Ubuntu14.04默认安装的是Nginx 1.4.6
如果已经安装,请先卸载
sudo apt-get remove nginx
安装方法:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
查看nginx 版本
nginx -v
nginx version: nginx/1.12.0
注意的是,这种方法安装的nginx的配置文件和运行文件是分开的.
配置文件:/etc/nginx/nginx.conf
运行文件:/etc/init.d/nginx
要运行nginx要用以下命令开启:
/etc/init.d/nginx restart
本文详细介绍如何在Ubuntu14.04系统中卸载旧版Nginx并安装新版Nginx1.12.0的过程。文章提供了具体的命令行操作步骤,包括使用软件属性管理器、添加Nginx稳定版本的PPA源、更新软件包列表以及安装和重启Nginx服务。
1826

被折叠的 条评论
为什么被折叠?



