服务器安装

服务器安装

步骤 1:更新系统和软件源 首先,确保系统的软件包是最新的: sudo apt update sudo apt upgrade -y 步骤 2:编译安装 Nginx apt install git -y #安装git git clone https://github.com/nginx/nginx.git #下载nginx源码 cd nginx # auto/configure --prefix=/usr/local/nginx \ # --with-http_ssl_module \ # --with-stream_ssl_module \ # --with-stream_ssl_preread_module \ # --with-http_v2_module \ # --with-http_gzip_static_module \ # --with-pcre \ # --with-http_realip_module \ # --with-stream_geoip_module=dynamic \ # --with-stream ./auto/configure --prefix=/usr/local/nginx \ --with-http_ssl_module \ --with-http_v2_module \ --with-http_v3_module \ --with-stream \ --with-stream_ssl_module \ --with-stream_ssl_preread_module \ --with-http_realip_module \ --with-http_gzip_static_module \ --with-pcre \ --with-openssl=/usr/local/src/openssl \ --with-threads \ --with-file-aio \ --with-http_stub_status_module \ --with-http_auth_request_module \ --with-cc-opt='-O3 -march=native' make -j$(nproc) make install #安装在 "/usr/local/nginx/sbin/nginx" 安装开机自启服务 ...

2025年4月20日 · 2 分钟 · Fen Xiang