Linux搭建开发环境
1. Nginx安装说明文档
负载均衡 在线教程:https://www.runoob.com/linux/nginx-install-setup.html
需要安装编译工具及库文件
1.安装编译工具 yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
安装 PCRE PCRE 作用是让 Nginx 支持 Rewrite 功能
1.1检查是否有 #pcre-config --version
安装 Nginx
1、下载 Nginx
下载地址:https://nginx.org/en/download.html
#cd /usr/local/src/
#wget https://nginx.org/download/nginx-1.18.0.zip
#unzip nginx-1.18.0.zip
2、编译安装
[root@bogon nginx-1.6.2]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
[root@bogon nginx-1.6.2]# make
[root@bogon nginx-1.6.2]# make install
3、查看nginx版本
[root@bogon nginx-1.6.2]# /usr/local/nginx/sbin/nginx -v
到此,nginx安装完成
4、Nginx 配置
nginx配置文件默认在安装目录下conf
#cd /usr/local/nginx/conf
#vi nginx.conf
user root;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {