linux安装nginx的常见错误解决(转载)
2017-09-04 10:14
423 查看
linux安装nginx详细教程
1 安装之前需要先安装:
1.1 openssl
1.1.1 下载 ,cd /home/bigdata/ wget http://www.openssl.org/source/openssl-1.0.0a.tar.gz
解压: tar -xvf openssl-1.0.0a.tar.gz
mv openssl-1.0.0 openss
cd openss
./config
./config -t
make depend
make
make test
make install
1.2 pcre
1.2.1 下载 :http://sourceforge.net/projects/pcre/files/
mv xxx pcre210
./configure --prefix=/home/bigdata/pcre210
make
make install
1.2.2 在线安装 yum -y install pcre-devel
1.3 zlib-devel
1.3.1 在线安装 yum install -y zlib-devel
2 nginx 安装
2.1 nginx 下载
http://nginx.org/en/download.html
2.2 上传到/home/bigdata/nginx-1.7.9.tar.gz
解压: tar -xvf nginx-1.7.9.tar.gz
注:不要改名称为 nginx
改名称 mv nginx-1.7.9 nginx179
2.3 安装
./configure --prefix=/home/bigdata/nginx --with-pcre=/home/bigdata/pcre210 --with-http_ssl_module --with-openssl=/home/bigdata/openssl
make
make install
出现如下错误:
make[2]: Entering directory `/home/bigdata/pcre210'
make[2]: *** No rule to make target `libpcre.la'. Stop.
make[2]: Leaving directory `/home/bigdata/pcre210'
make[1]: *** [/home/bigdata/pcre210/.libs/libpcre.a] Error 2
make[1]: Leaving directory `/home/bigdata/nginx'
make: *** [install] Error 2
解决方案:
mkdir -p /home/bigdata/pcre210/.libs
cp /usr/lib/libpcre.a /home/bigdata/pcre210/libpcre.a
cp /usr/lib/libpcre.a /home/bigdata/pcre210/libpcre.la
cp /usr/lib/libpcre.a /home/bigdata/pcre210/.libs/libpcre.a
cp /usr/lib/libpcre.a /home/bigdata/pcre210/.libs/libpcre.la
再次安装
make install
出现以下错误:
cp: `conf/koi-win' and `/home/bigdata/nginx/conf/koi-win' are the same file
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/bigdata/nginx'
make: *** [install] Error 2
解决方法:以下各需要的组件都是前面对应安装的路径。
./configure --prefix=/home/bigdata/nginx --conf-path=/home/bigdata/nginx/conf/nginx.conf --with-openssl=/home/bigdata/openssl --with-http_ssl_module --with-pcre=/home/bigdata/pcre210
再次make和make install
文章出处:http://blog.csdn.net/lili72
启动 nginx 服务
/home/bigdata/nginx/sbin/nginx -c /home/bigdata/nginx/conf/nginx.conf
查看是否启动成功
查看进程: ps -ef | grep nginx
访问 该台机器的80端口
http://192.168.52.130:80
安装成功.
停止nginx
kill -QUIT 21510(主进程号)
Nginx 重启
/home/bigdata/nginx/sbin/nginx -s reload
Nginx的配置说明可以参考文章:
http://www.cnblogs.com/xiaogangqq123/archive/2011/03/02/1969006.html
1 安装之前需要先安装:
1.1 openssl
1.1.1 下载 ,cd /home/bigdata/ wget http://www.openssl.org/source/openssl-1.0.0a.tar.gz
解压: tar -xvf openssl-1.0.0a.tar.gz
mv openssl-1.0.0 openss
cd openss
./config
./config -t
make depend
make
make test
make install
1.2 pcre
1.2.1 下载 :http://sourceforge.net/projects/pcre/files/
mv xxx pcre210
./configure --prefix=/home/bigdata/pcre210
make
make install
1.2.2 在线安装 yum -y install pcre-devel
1.3 zlib-devel
1.3.1 在线安装 yum install -y zlib-devel
2 nginx 安装
2.1 nginx 下载
http://nginx.org/en/download.html
2.2 上传到/home/bigdata/nginx-1.7.9.tar.gz
解压: tar -xvf nginx-1.7.9.tar.gz
注:不要改名称为 nginx
改名称 mv nginx-1.7.9 nginx179
2.3 安装
./configure --prefix=/home/bigdata/nginx --with-pcre=/home/bigdata/pcre210 --with-http_ssl_module --with-openssl=/home/bigdata/openssl
make
make install
出现如下错误:
make[2]: Entering directory `/home/bigdata/pcre210'
make[2]: *** No rule to make target `libpcre.la'. Stop.
make[2]: Leaving directory `/home/bigdata/pcre210'
make[1]: *** [/home/bigdata/pcre210/.libs/libpcre.a] Error 2
make[1]: Leaving directory `/home/bigdata/nginx'
make: *** [install] Error 2
解决方案:
mkdir -p /home/bigdata/pcre210/.libs
cp /usr/lib/libpcre.a /home/bigdata/pcre210/libpcre.a
cp /usr/lib/libpcre.a /home/bigdata/pcre210/libpcre.la
cp /usr/lib/libpcre.a /home/bigdata/pcre210/.libs/libpcre.a
cp /usr/lib/libpcre.a /home/bigdata/pcre210/.libs/libpcre.la
再次安装
make install
出现以下错误:
cp: `conf/koi-win' and `/home/bigdata/nginx/conf/koi-win' are the same file
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/bigdata/nginx'
make: *** [install] Error 2
解决方法:以下各需要的组件都是前面对应安装的路径。
./configure --prefix=/home/bigdata/nginx --conf-path=/home/bigdata/nginx/conf/nginx.conf --with-openssl=/home/bigdata/openssl --with-http_ssl_module --with-pcre=/home/bigdata/pcre210
再次make和make install
文章出处:http://blog.csdn.net/lili72
启动 nginx 服务
/home/bigdata/nginx/sbin/nginx -c /home/bigdata/nginx/conf/nginx.conf
查看是否启动成功
查看进程: ps -ef | grep nginx
访问 该台机器的80端口
http://192.168.52.130:80
安装成功.
停止nginx
kill -QUIT 21510(主进程号)
Nginx 重启
/home/bigdata/nginx/sbin/nginx -s reload
Nginx的配置说明可以参考文章:
http://www.cnblogs.com/xiaogangqq123/archive/2011/03/02/1969006.html
相关文章推荐
- linux/centos安装nginx常见错误及解决办法【make错误,需要yum -y install openssl openssl-devel或者自己下载然后重新./configure】
- linux/centos安装nginx常见错误及解决办法
- linux/centos安装nginx常见错误及解决办法
- linux/centos安装nginx常见错误及解决办法
- linux/centos安装nginx常见错误及解决办法
- linux/centos安装nginx常见错误及解决办法
- Xilinx petalinux 安装常见错误及解决方法
- ubuntu 安装nginx,php,mysql。常见错误解决
- Linux下安装Nginx完整教程及常见错误解决方案
- Linux中常见操作2--解决安装Ubuntu时分辨率错误问题
- linux编译安装时常见错误解决办法
- 记录linux安装nginx常见错误
- linux下安装oracle10g常见错误及解决办法
- Ubuntu系统下的Nginx服务器软件安装时的常见错误解决
- linux下nginx安装详解及常见问题解决方法
- Linux下安装Nginx完整教程及常见错误解决方案
- Linux 源码安装apache 与常见错误解决
- linux 软件包安装常见错误及解决方法
- Linux下面安装Python常见错误解决方法
- linux编译安装时常见错误解决办法