How to install nginx in Ubuntu
2024-09-05 23:55:06
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.
最新文章
- ng-disabled 不起作用的解决办法
- IOS 绘图教程Quartz2D
- I2C控制器的Verilog建模之二
- 配置ssh免密码连接
- C# 获取属性字段上DescriptionAttribute的值
- poj3378
- [Typescript] Function defination
- Filter过滤器实现登录检查
- vijos 1047 送给圣诞夜的礼品 矩阵
- Qt(QML)本地化
- Python 保存爬行动物捕捉网页
- 为实体类增加toJSON方法
- 关于Eclipse启动报错,jvm版本不匹配的问题
- Codeforces 839B Game of the Rows【贪心】
- 微信小程序绘制分享图
- 6.Git基础-远程仓库的使用
- django项目实现中文检索
- 3D数学基础(三)矩阵
- 【搬运】 Page Object 官方文档 (新增了Widget特性)
- Activiti流程设计工具
热门文章
- 关于Attach *.mdf数据库联想到的备份
- Android SDK 安装与配置
- Vmware虚拟机克隆以及关闭防火墙
- vue环境配置脚手架搭建,生命周期,钩子
- 【题解】[USACO17JAN]Balanced Photo G
- 暑假集训Day2 互不侵犯(状压dp)
- Data Science and Matrix Optimization-课程推荐
- 深入理解RocketMQ(九)---实战(控制台搭建)
- 【错误】fatal: destination path already exists and is not an empty directory. 错误及解决办法
- 扯淡 Spring BeanDefinition