Skip to content
Capture Moments
Go back

服务器安装nginx

下载nginx安装包

wget https://nginx.org/download/nginx-1.21.6.tar.gz

解压并定位到解压文件夹

tar xvf nginx-1.21.6.tar.gz

cd nginx-1.21.6

运行configure检查编译工具链是否安装成功

./configure

若报错可能是以下工具链未安装全,运行

yum install gcc-c++

yum install -y pcre pcre-devel

yum install -y zlib zlib-devel

yum install -y openssl openssl-devel

若没有报错运行make进行编译,该步速度取决于服务器性能

make
make install

安装完成后检查nginx是否正常工作

nginx -t

查看nginx位置

which nginx


Previous Post
2023年了,你还在拍胶片吗
Next Post
如何利用Exiftool修改照片元数据