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. 消息队列——Kafka基本使用及原理分析

    文章目录 一.什么是Kafka 二.Kafka的基本使用 1. 单机环境搭建及命令行的基本使用 2. 集群搭建 3. Java API的基本使用 三.Kafka原理浅析 1. topic和partit ...

  2. IP地址、计算机名称、MAC地址如何获取

    以下的操作都在“命令提示窗口”中操作. 已知IP,如何获得计算机名称 方法(1): 使用ping -i ip地址 例如已知地址为192.168.1.168. 那么使用ping -i 192.168.1 ...

  3. cc4a-c++类定义与struct定义方式代码示范

    cc4a-c++类定义与struct定义方式代码示范 #include <iostream> #include <string> using namespace std; st ...

  4. vue父路由高亮不显示

    vue父路由高亮不显示 首页和考试中心作为父路由,点击时发现不高亮,是因为路由配置有问题 因为首页和考试中心已经重定向到homepage和tpersonal-data这两个路由,当点击首页和考试中心的 ...

  5. 【K8s学习笔记】K8s是如何部署应用的?

    本文内容 本文致力于介绍K8s一些基础概念与串联部署应用的主体流程,使用Minikube实操 基础架构概念回顾 温故而知新,上一节[K8S学习笔记]初识K8S 及架构组件 我们学习了K8s的发展历史. ...

  6. java scoket Blocking 阻塞IO socket通信二

    在上面一节中,服务端收到客户端的连接之后,都是new一个新的线程来处理客户端发送的请求,每次new 一个线程比较耗费系统资源,如果100万个客户端,我们就要创建100万个线程,相当的 耗费系统的资源, ...

  7. ArrayList类的使用

    ArrayList常用类方法 (1)添加元素 public boolean add(E element) 在集合末端添加一个元素 public void add(int index,E element ...

  8. openstack-taskflow 组件记录

    [Summary] TaskFlow 是一个为了 openstack 实现的 python 库,使得执行 task 变得简单,一致,易扩展,可靠: 它能以一种声明的方式,将轻量级 task 对象的创建 ...

  9. JavaScript基础尽量少使用全局变量(001)

    Pattern意思是模式,好的编码习惯经过多次实践的应用就会形成模式,而反模式(Anti-Pattern)则是不好的编码习惯.了解 JavaScript模式之前,先来看看Anti-pattern的例子 ...

  10. [Debian]查看进程、终止进程

    # jobs -l [1]+ 115 Running nohup /usr/local/bin/dotnet/dotnet/dotnet /usr/share/nginx/asp/publish/Wi ...