Home >Operation and Maintenance >Nginx >How to install NGINX on RHEL6
yum -y install make gcc gcc-c++ openssl openssl-devel pcre-devel zlib-devel
-y The default is yes for all questions
install automatic installation
make dependencies used to compile binary files
gcc and gcc-c compile c/c language need to use
PCRE The http module of nginx uses pcre to parse regular expressions
openssl nginx supports http and https protocols. openssl is a secure socket layer cryptographic library. It has cryptographic algorithms, common key and certificate encapsulation management functions, and SSL protocol
zlib-devel nginx uses zlib to perform the content of the http package. gzip
Choose the version you want
wget -c http://nginx.org/download/nginx-1.12.2.tar.gz# 我选择1.12.2版本
tar xzf nginx-1.12.2.tar.gz
cd nginx-1.6.3 # 进入目录./configure --prefix=/usr/local/nginx #configure脚本做了很多工作,例如环境监测,参数解析,目录生成,Makefile文件的生成等# --prefix指定了软件的安装位置make && make install# make 是编译的意思。就是把源码包编译成二进制可执行文件# && 当 make (前面) 编译成功,再执行后面的命令# make install 安装
cd /usr/local/nginx # 切换configure指定的目录./sbin/nginx # 启动服务ps aux | grep nginx #查看进程
The above is the detailed content of How to install NGINX on RHEL6. For more information, please follow other related articles on the PHP Chinese website!