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. Water Testing【皮克定理,多边形面积,线段上点的数目】

    Water Testing 传送门:链接  来源:UPC 9656 题目描述 You just bought a large piece of agricultural land, but you n ...

  2. Excel怎样根据出生日期,快速计算出其年龄呢?

    问题:怎样根据出生日期,快速计算出其年龄呢? 方法:DATEDIF函数 Step1:在编辑栏中输入公式:=DATEDIF(E2,TODAY(),”Y”),按回车键. Step2:用鼠标向下拖拽复制公式 ...

  3. windows server2012 安装SQL SERVER 2016环境监测出错

    Windows Server 2012 R2 安装SQL Server 2016 顺序为:KB2919442 ——> KB2919355 ——> SQL Server 2016 并且还要安 ...

  4. pip超时问题解决

    阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣(douban ...

  5. Python基础002---基础知识

    一.标识符 标识符是自己定义的,是开发人员在程序中自己定义的一些符号和名称,如变量名.函数名等.在 Python 里,标识符由字母(区分大小写).数字.下划线组成,且数字不能开头.常用的命名方法有小驼 ...

  6. matlab实现梯度下降法(Gradient Descent)的一个例子

    在此记录使用matlab作梯度下降法(GD)求函数极值的一个例子: 问题设定: 1. 我们有一个$n$个数据点,每个数据点是一个$d$维的向量,向量组成一个data矩阵$\mathbf{X}\in \ ...

  7. cron计划任务

    格式 crontab -e [-u 用户名] ##编辑:注意,每项工作都是一行. crontab -l [-u 用户名] ##查看 crontab -r [-u 用户名] #清除 分 时 日 月 周 ...

  8. 再看rabbitmq的交换器和队列的关系

    最近又要用到rabbitmq,业务上要求服务器只发一次消息,需要多个客户端都去单独消费.但我们知道rabbitmq的机制里,每个队列里的消息只能消费一次,所以客户端要单独消费信息,就必须得每个客户端单 ...

  9. skywalking中表字段的信息

    https://skyapm.github.io/document-cn-translation-of-skywalking/zh/6.2.0/concepts-and-designs/scope-d ...

  10. Pytorch入门——手把手带你配置云服务器环境

    本文始发于个人公众号:TechFlow,原创不易,求个关注 今天这篇是Pytorch专题第一篇文章. 大家好,由于我最近自己在学习Pytorch框架的运用,并且也是为了响应许多读者的需求,推出了这个P ...