1.安装步骤
step1: 下载ninx
$ cd ~/download/ $ wget http://nginx.org/download/nginx-1.8.1.tar.gz
不同版本的下载地址可从http://nginx.org/en/download.html获取。
step2: 解压并安装
$ tar -zxvf nginx-1.8.1.tar.gz $ cd nginx-1.8.1/ $ ./configure $ make $ make install
查看是否安装成功
查看/usr/local/目录下是否有nginx目录,有则安装成功。
2.文件说明
/usr/local/nginx/目录下的文件说明:
conf/ 存放配置文件 html/ 存放一些网页文件 logs/ 存放一些日志 sbin/ 一些可执行文件
3. 安装时常见的一些问题
./configure的时候会报如下错误:
错误1:
error: the HTTP rewrite module requires the PCRE library.
解决办法:
$ apt-get -y install libpcre3 libpcre3-dev #安装库,之后重新./configure
错误2:
error: the HTTP gzip module requires the zlib library
解决办法:
$ apt-get -y install zlib1g zlib1g.dev #安装库,之后重新./configure
参考: http://www.jikexueyuan.com/course/1470_2.html?ss=1
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });以上就介绍了ubuntu下安装nginx,包括了ubuntu方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号