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.

How to install nginx in Ubuntu的更多相关文章

  1. How To Install Nginx on Ubuntu 16.04 zz

    Introduction Nginx is one of the most popular web servers in the world and is responsible for hostin ...

  2. Install nginx on ubuntu

    1. Install libpcre3, libpcre3-dev2. Install zlib1g-dev3. Download nginx and unzip it4. ./configure5. ...

  3. 【Ubuntu16.04】 install nginx

    1. Download PGP key in order to pass the authentication of the nginx repository signature. click to ...

  4. [django] Deploy Django Applications Using uWSGI and Nginx on Ubuntu 14.04

    关键点1:chmod-socket=666 (mysite_uwsgi.ini) 关键点2 : 工程目录和虚拟环境目录搞清楚 几个参考: http://uwsgi-docs.readthedocs.i ...

  5. Django + Gunicorn + Nginx 部署 Ubuntu 服务器

    Django + Gunicorn + Nginx 部署服务器 获取腾讯云 root权限 本人的服务器使用的是腾讯云,腾讯云默认是没有开放 root 用户的,我们来创建 root 用户. 创建 roo ...

  6. Install Docker on Ubuntu

    Install Docker on Ubuntu Estimated reading time: 17 minutes Docker is supported on these Ubuntu oper ...

  7. yum install nginx

    先安装nginx的yum源 http://nginx.org/en/linux_packages.html#stable 找到链接,安装: rpm -ivh http://nginx.org/pack ...

  8. centos6.5 64位 yum install nginx的默认安装路径

    yum install nginx网站文件存放默认目录 /usr/share/nginx/html 网站默认站点配置 /etc/nginx/conf.d/default.conf 自定义Nginx站点 ...

  9. (转) How to install eclipse in ubuntu 12.04

    源地址:http://www.krizna.com/ubuntu/install-eclipse-in-ubuntu-12-04/ Eclipse installation in ubuntu 12. ...

随机推荐

  1. (六)POI-操作Excel的poi的字体设置

    原文链接:https://blog.csdn.net/class157/article/details/92817286 package com.java.poi; import org.apache ...

  2. 动作函数-web_custom_request

    web_custom_request("get_login", "URL=http://10.1.102.75:8000/login?user=Milton&pw ...

  3. 【JMeter_19】JMeter逻辑控制器__简单控制器<Simple Controller>

    简单控制器<Simple Controller> 业务逻辑: 就像他的名字一样,简单,可以理解为一个文件夹,就是分组用的,没有其他特殊功能,但相比不添加简单控制器,区别在于简单控制器可以被 ...

  4. 记录一次Flink作业异常的排查过程

    最近2周开始接手apache flink全链路监控数据的作业,包括指标统计,业务规则匹配等逻辑,计算结果实时写入elasticsearch. 昨天遇到生产环境有作业无法正常重启的问题,我负责对这个问题 ...

  5. 剑指 Offer 09. 用两个栈实现队列

    剑指 Offer 09. 用两个栈实现队列 用两个栈实现一个队列.队列的声明如下,请实现它的两个函数 appendTail 和 deleteHead ,分别完成在队列尾部插入整数和在队列头部删除整数的 ...

  6. 定时任务Cron

    Linux系统中的定时任务cron,一个很实际很有效很简单的一个工作,在日常的生产环境中,会被广泛使用的一个组件.通过设置时间.执行的脚本等内容,能够让系统自动的执行相关任务,很是方便. cron定时 ...

  7. vue 生命周期:

    vue  生命周期: 1. beforeCreate()创建组件;        2. created() 创建完成;        3. beforeMounte() 组件被挂裁前;        ...

  8. javaScript深入浅出之理解闭包

    javaScript深入浅出之理解闭包 引言 闭包是个老生长谈的话题了,对于闭包网上也有很多不同的看法 <你不知道的javaScript>对于闭包是这么定义的:函数创建和函数执行不在同一个 ...

  9. js Date format(日期格式化:yyyy-MM-dd HH:mm:ss.S)

    今天在做日期显示的时候,那个显示格式困扰了很久,各种组件都尝试了,总是不如意,最后自己网上找了一个,然后稍微修改一下,感觉这个Util挺常用的,这里mark一下 Date.prototype.form ...

  10. java中值传递

    最近学基础的时候,老师讲了值传递和引用传递,这个问题一直不太明白,上网查了很多资料,按照自己的理解整理了一遍,发现之前不太明白的地方基本上想明白了,如有不正确的地方,欢迎指正,谢谢. 首先要说明的是j ...