关于nginx

  • Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器,同时也提供了IMAP/POP3/SMTP服务。Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的Rambler.ru站点(俄文:Рамблер)开发的,公开版本1.19.6发布于2020年12月15日。
  • 其将源代码以类BSD许可证的形式发布,因它的稳定性、丰富的功能集、简单的配置文件和低系统资源的消耗而闻名。2022年01月25日,nginx 1.21.6发布。
  • Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,在BSD-like 协议下发行。其特点是占有内存少,并发能力强,事实上nginx的并发能力在同类型的网页服务器中表现较好,中国大陆使用nginx网站用户有:百度、京东、新浪、网易、腾讯、淘宝等。

nginx的安装

nginx-1.20.2.tar.gz 为例

  • 安装环境
yum -y install gcc pcre-devel zlib-devel openssl openssl-devel
或
yum -y install gcc wget gcc-c++ automake autoconf libtool libxml2-devel libxslt-devel perl-devel perl-ExtUtils-Embed pcre-devel openssl-devel
  • 下载
http://nginx.org/en/download.html
  • 解压
tar -zxvf nginx-1.20.2.tar.gz
  • 安装
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module
  • 编译
make && make install

配置环境变量

# 编辑/etc/profile
vim /etc/profile
# 添加配置,:wq保存
PATH=$PATH:/usr/local/nginx/sbin
export PATH
# 更新配置
source /etc/profile

Nginx自启动

还没了解......