The steps for installing the nginx on Ubuntu below.

1.install the packages first.

apt-get install gcc
apt-get install libpcre3 libpcre3-dev
apt-get install zlib1g zlib1g-dev
apt-get install openssl openssl-dev

2.download the source code of nginx from the website http://nginx.org/en/download.html

3. uncompress the downloaded nginx file.

tar zxvf nginx-1.8.

4.install nginx.

su root #using root user to install nginx
cd /home/pinxiong/pinxiong/nginx-1.8./ #the directory is the unpressed nginx's dictory.
./configure
make
make install

5.check if nginx configure is right.

root@ubuntu:/usr/local/nginx# ./sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

6.check if nginx had started.

root@ubuntu:/usr/local/nginx# ps -ax | grep nginx
? Ss : nginx: master process ./sbin/nginx
? S : nginx: worker process
? S : nginx: worker process
? S : nginx: worker process
? S : nginx: worker process
? S : nginx: worker process
? S : nginx: worker process
? S : nginx: worker process
? S : nginx: worker process
? S : nginx: worker process
? S : nginx: worker process
pts/ S+ : grep --color=auto nginx

7.check if nginx can work well.

open your browser and then type the web address localhost/index.html . It's OK if you can see a webpage showing "Welcome to nginx!", or failed otherwise.

最新文章

  1. ng-disabled 不起作用的解决办法
  2. IOS 绘图教程Quartz2D
  3. I2C控制器的Verilog建模之二
  4. 配置ssh免密码连接
  5. C# 获取属性字段上DescriptionAttribute的值
  6. poj3378
  7. [Typescript] Function defination
  8. Filter过滤器实现登录检查
  9. vijos 1047 送给圣诞夜的礼品 矩阵
  10. Qt(QML)本地化
  11. Python 保存爬行动物捕捉网页
  12. 为实体类增加toJSON方法
  13. 关于Eclipse启动报错,jvm版本不匹配的问题
  14. Codeforces 839B Game of the Rows【贪心】
  15. 微信小程序绘制分享图
  16. 6.Git基础-远程仓库的使用
  17. django项目实现中文检索
  18. 3D数学基础(三)矩阵
  19. 【搬运】 Page Object 官方文档 (新增了Widget特性)
  20. Activiti流程设计工具

热门文章

  1. 关于Attach *.mdf数据库联想到的备份
  2. Android SDK 安装与配置
  3. Vmware虚拟机克隆以及关闭防火墙
  4. vue环境配置脚手架搭建,生命周期,钩子
  5. 【题解】[USACO17JAN]Balanced Photo G
  6. 暑假集训Day2 互不侵犯(状压dp)
  7. Data Science and Matrix Optimization-课程推荐
  8. 深入理解RocketMQ(九)---实战(控制台搭建)
  9. 【错误】fatal: destination path already exists and is not an empty directory. 错误及解决办法
  10. 扯淡 Spring BeanDefinition