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 ...
随机推荐
- iOS开发必看的博客汇总
OneV's Den http://onevcat.com/ 沉船家园 http://beyondvincent.com/ NSHipster http://nshipster.cn/ Limboy ...
- jQuery.extend()方法和jQuery.fn.extend()方法
jQuery.extend()方法和jQuery.fn.extend()方法源码分析 这两个方法用的是相同的代码,一个用于给jQuery对象或者普通对象合并属性和方法一个是针对jQuery对象的实例, ...
- MVC推荐教程和文章列表
着手Getting Started Getting Started with ASP.NET MVC 5 (共11部分) Pluralsight ASP.NET MVC 5 Fundamentals( ...
- .NET中IDisposable接口的基本使用
首先来看MSDN中关于这个接口的说明: [ComVisible(true)] public interface IDisposable { // Methods void Dispose(); } 1 ...
- [LeetCode]N-Queens 八皇后问题扩展(经典深层搜索)
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens ...
- http层负载均衡之haproxy
http层负载均衡之haproxy实践篇(一) 方案 上篇文章讲到了负载均衡的相关理论知识,这篇文章我打算讲讲实践方法以及实践中遇到的问题 方案:haproxy http层负载均衡 安装一个hapro ...
- input的width和padding-left同时存在时IE兼容问题
总的来说,text-indent不影响元素的最终宽度但是有兼容性问题,padding-left在中国主流浏览器IE低版本下影响最终宽度,但在chrome和firefox下不影响宽度,但是可以通过CSS ...
- mysql5.6.16绿色版配置、运行
原文:mysql5.6.16绿色版配置.运行 1.从该地址http://dev.mysql.com/downloads/mysql/中选择windows的版本,选择下载. 2.将下载的压缩包解压. 3 ...
- javascript通过数日两个日期之间的比较分离
$(function () { var starttime = transdate("2014-09-30 15:53:00"); var endtime = transdat ...
- 关于SQL Server 2005 的自动远程数据库备份
原文:(原创)关于SQL Server 2005 的自动远程数据库备份 由于项目需要,需要对目标服务器上的数据库每天进行备份并转移,查阅网上的一些帮助,结合自己的实际需要,写了这篇文章,希望对有同样需 ...