Nginx安装
来源:互联网 发布:sql 双竖线是什么意思 编辑:程序博客网 时间:2024/06/02 05:57
Linux系统是Centos 6.5 64位。
https://www.openssl.org/source/openssl-fips-2.0.16.tar.gzhttp://zlib.net/zlib-1.2.11.tar.gzftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.gzhttp://nginx.org/download/nginx-1.13.6.tar.gz
下载依赖应用
安装c++编译环境,如已安装可略过
[root@localhost src]# yum install gcc-c++省略安装内容...期间会有确认提示输入y回车Is this ok [y/N]:y省略安装内容...
openssl安装
[root@localhost src]# tar zxvf openssl-fips-2.0.10.tar.gz
省略安装内容...[root@localhost src]# cd openssl-fips-2.0.10[root@localhost openssl-fips-2.0.10]# ./config && make && make install
省略安装内容...
Operating system: x86_64-whatever-linux2You need Perl 5.下载最新perl 安装
http://www.cpan.org/src/5.0/perl-5.24.0.tar.gz
tar -xzf perl-5.24.0.tar.gz cd perl-5.24.0 ./Configure -des -Dprefix=$HOME/localperl make make testmake install
pcre安装
[root@localhost src]# tar zxvf pcre-8.40.tar.gz
省略安装内容...[root@localhost src]# cd pcre-8.40[root@localhost pcre-8.40]# ./configure && make && make install
省略安装内容...
zlib安装
[root@localhost src]# tar zxvf zlib-1.2.11.tar.gz
省略安装内容...[root@localhost src]# cd zlib-1.2.11[root@localhost zlib-1.2.11]# ./configure && make && make install
省略安装内容...
nginx安装
[root@localhost src]# tar zxvf nginx-1.10.2.tar.gz
省略安装内容...[root@localhost src]# cd nginx-1.10.2[root@localhost nginx-1.10.2]# ./configure && make && make install
省略安装内容...
/usr/local/nginx/sbin/nginx报错
error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory网上搜的解决方案
1.用whereis libpcre.so.1命令找到libpcre.so.1在哪里2.用ln -s /usr/local/lib/libpcre.so.1 /lib64命令做个软连接就可以了3.用sbin/nginx启动Nginx4.用ps -aux | grep nginx查看状态[root@localhost nginx]# whereis libpcre.so.1[root@localhost nginx]# ln -s /usr/local/lib/libpcre.so.1 /lib64[root@localhost nginx]# sbin/nginx[root@localhost nginx]# ps -aux | grep nginx
启动访问成功
常用命令:
启动[root@localhost ~]# /usr/local/nginx/sbin/nginx停止/重启[root@localhost ~]# /usr/local/nginx/sbin/nginx -s stop(quit、reload)命令帮助[root@localhost ~]# /usr/local/nginx/sbin/nginx -h验证配置文件[root@localhost ~]# /usr/local/nginx/sbin/nginx -t配置文件[root@localhost ~]# vim /usr/local/nginx/conf/nginx.conf配置https访问 :
下次写。
阅读全文
0 0
- nginx笔记:nginx安装
- Nginx-----源码安装nginx
- 【nginx】nginx的安装
- 安装Nginx
- nginx安装
- 安装 nginx
- 安装nginx
- 安装 Nginx
- nginx安装
- Nginx安装
- 安装Nginx
- 安装nginx
- nginx安装
- 安装nginx
- Nginx安装
- nginx安装
- nginx安装
- nginx 安装
- MongoDB基础
- Java中异常处理-finally和return执行顺序
- SLF4J日志的使用
- 解决CentOS(6和7版本),/etc/sysconfig/下没有iptables的问题
- solr的软硬提交
- Nginx安装
- matlab符号运算(一)
- 动态库与静态库的区别
- linux下使用SVN上传项目
- ASP.NET状态管理之一(概括篇)
- unity3d 的一些视频学习
- Qt读取中文文本,兼容GBK&&UTF-8
- 探究C++中的成员函数指针和虚函数表
- org.springframework.web.context.ContextLoader -0 [localhost-startStop-1] ERROR org.springframewor