nginx 安装启动
[root@localhost ~]# wget http://nginx.org/download/nginx-0.7.67.tar.gz
--2010-09-24 14:48:12-- http://nginx.org/download/nginx-0.7.67.tar.gz
Resolving nginx.org... 81.19.68.137
Connecting to nginx.org|81.19.68.137|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 608462 (594K) [application/octet-stream]
Saving to: `nginx-0.7.67.tar.gz'
100%[<========================================>] 608,462 44.5K/s in 18s
2010-09-24 14:48:32 (32.8 KB/s) - `nginx-0.7.67.tar.gz' saved [608462/608462] [root@localhost ~]# tar -zxvf nginx-0.7.67.tar.gz /解压压缩文件
[root@localhost ~]# cd nginx-0.7.67 /进入安装文件目录
[root@localhost nginx-0.7.67]# ./configure –prefix=/usr/local/nginx /指定安装到/usr/local/nginx目录下,可用./configure –help查看需要哪些编译参数
[root@localhost nginx-0.7.67]#make /make
[root@localhost nginx-0.7.67]#make install /安装
[root@localhost nginx-0.7.67]# ll /usr/local/nginx/ /查看是否安装成功
drwxr-xr-x 2 root root 4096 Sep 24 15:12 conf
drwxr-xr-x 2 root root 4096 Sep 24 15:12 html
drwxr-xr-x 2 root root 4096 Sep 24 15:12 logs
drwxr-xr-x 2 root root 4096 Sep 24 15:12 sbin
[root@localhost nginx-0.7.67]#/usr/local/nginx/sbin/nginx –t /测试Nginx配置文件是否正确
[root@localhost nginx-0.7.67]#/usr/local/nginx/sbin/nginx /启动Nginx
当出现如下情况时:
[root@web2 nginx-0.7.67]# /usr/local/nginx_test/sbin/nginx
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: still could not bind()
就要修改nginx的端口或者关掉占用80端口的应用;
修改端口方法:
在 Linux 上该文件的路径下找到 /usr/local/nginx/conf/nginx.conf
server {
listen 80;
server_name localhost;
……
}
改为:
server {
listen 81;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
……
}
nginx 安装启动的更多相关文章
- 聊聊、Nginx 安装启动
首先说下安装 Nginx 的步骤: (1)window 下安装 进入 http://nginx.org/en/download.html 下载版本 Mainline version 或者 Stable ...
- nginX 安装 启动
选择源码安装 下载安装包 nginx-1.8.0.tar.gz 解压 tar -zxvf nginx-1.8.0.tar.gz 进入文件夹 ...
- ubuntu 14.04(desktop amd 64) nginx 安装启动停止
sudo apt-get install nginx 关闭: sudo service nginx stop 启动: sudo nginx
- nginx安装启动
参考:http://network.51cto.com/art/201005/198198_4.htm 下载nginx tar.gz安装包下载pcre tar.gz安装包 安装pcretar zxvf ...
- centos7 nginx安装/启动/进程状态/杀掉进程
1.安装 下载RPM:wget http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.10.0-1.el7.ngx.x86_64.rpm ...
- nginx安装,启动亲测有效
一:安装编译工具及库文件 yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel 二:安装PCRE,让 N ...
- Linux下Nginx安装/启动/重启/停止
Nginx是高性能的web服务器也是非常好用反向代理服务器,可以实现负载均衡,动静分离等策略,在linux下用的非常多.下面是下载地址 http://nginx.org/en/download.h ...
- Nginx安装启动过程报错libpcre.so.1 cannot open shared object file: No such file or directory
具体报错信息如下: nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: ...
- Linux nginx 安装 启动
nginx下载地址:https://nginx.org/download/ ## 解压 tar -zxvf nginx-1.9.9.tar.gz ##进入nginx目录 cd nginx-1.9.9 ...
随机推荐
- sharepoint 2013 更改用户配置文件属性值的方法 modify user profile
在此前写了两篇文章sharepoint 的UserProfile博客 sharepoint 2010 获取用户信息UserProfile方法 sharepoint 2010 怎样用SocialComm ...
- JS常用方法总结,及jquery异步调用后台方法实例
//前台接收get参数值 function getQueryString(name) { var queryStrings = window.location.search.sp ...
- T4模板使用技巧
=============C#.Net 篇目录============== 示例代码:示例代码__你必须懂的T4模板:浅入深出.rar (一)什么是T4模板? T4,即4个T开头的英文字母组合:Tex ...
- Select与SelectMany的区别
Select() 和 SelectMany() 的工作都是依据源值生成一个或多个结果值. Select() 为每个源值生成一个结果值.因此,总体结果是一个与源集合具有相同元素数目的集合.与之相反,Se ...
- EasyUI基础入门之Resiable(可缩放)
easyui的base插件学习已经进行到Resizable(可缩放)了.照旧看看easyui官网的API. Resiable 正如其字面意思一样(可伸缩),resiable主要是将一些html元素扩展 ...
- hdu2203 KMP水的问题
两种方法 首先是纯KMP #include<stdio.h> #include<string.h> #include<iostream> using nam ...
- 内网穿透&UDP打洞
这两天找度度重新回忆了一下关于内网穿透的事情,在百度文库上找到了两三篇写的比较通俗易懂的文章,把内网穿透做个简单总结. 首先文章建议 Cone NAPT 还有希望,要是 Symmetri NAPT 就 ...
- 安装ruby on rail
安装: # nvm 安装, 两种方法 $ curl https://raw.githubusercontent.com/creationix/nvm/v0.8.0/install.sh | sh $ ...
- Cocos2d-x学习笔记(14)(更新函数scheduleUpdate、进度计时器CCProgressTo、滚动视图CCScrollView)
一.scheduleUpdate 1.scheduleUpdate:此函数是CCNode的函数,每一个CCNode仅仅要调用scheduleUpdate更新函数,那么这个CCNode就会响应当前类的u ...
- js 里面 写 C# 代码 遇到的问题
js 代码块 必须放置在 body 里面