# sudo apt update
# sudo apt install libjasper1 libjasper-dev
# sudo apt-get install libgsl-dev
.# sudo apt-get install libpcre3 libpcre3-dev
# sudo apt-get install zlib1g-dev
# sudo apt-get install openssl libssl-dev
# sudo apt-get install gcc
# ./configure --prefix=/home/nginx --sbin-path=/home/nginx/sbin/nginx --conf-path=/home/nginx/conf/nginx.conf --error-log-path=/home/log/nginx/error.log --http-log-path=/home/log/nginx/access.log --pid-path=/home/nginx/nginx.pid --lock-path=/home/nginx/nginx.lock --http-client-body-temp-path=/home/nginx/cache/client_temp --http-proxy-temp-path=/home/nginx/cache/proxy_temp --http-fastcgi-temp-path=/home/nginx/cache/fastcgi_temp --http-uwsgi-temp-path=/home/nginx/cache/uwsgi_temp --http-scgi-temp-path=/home/nginx/cache/scgi_temp --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-threads --with-file-aio --with-ipv6 --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=1024 -m64 -mtune=generic'
以下显示正常:
checking for ioctl(FIONREAD) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
checking for PCRE library ... found
checking for PCRE JIT support ... found
checking for OpenSSL library ... found
checking for zlib library ... found
creating objs/Makefile
Configuration summary
+ using threads
+ using system PCRE library
+ using system OpenSSL library
+ using system zlib library
nginx path prefix: "/home/nginx"
nginx binary file: "/home/nginx/sbin/nginx"
nginx modules path: "/home/nginx/modules"
nginx configuration prefix: "/home/nginx/conf"
nginx configuration file: "/home/nginx/conf/nginx.conf"
nginx pid file: "/home/nginx/nginx.pid"
nginx error log file: "/home/log/nginx/error.log"
nginx http access log file: "/home/log/nginx/access.log"
nginx http client request body temporary files: "/home/nginx/cache/client_temp"
nginx http proxy temporary files: "/home/nginx/cache/proxy_temp"
nginx http fastcgi temporary files: "/home/nginx/cache/fastcgi_temp"
nginx http uwsgi temporary files: "/home/nginx/cache/uwsgi_temp"
nginx http scgi temporary files: "/home/nginx/cache/scgi_temp"
./configure: warning: the "--with-ipv6" option is deprecated
编译(生成二进制文件) 并且安装 # make install
创建cache文件夹# cd /home/nginx/ #mkdir cache
赋权 # chmod -R 777 /home/nginx
删除安装文件 # rm -rf /home/nginx-1.22.3
安装结束
现在以下正常:
test -d '/home/nginx/html' \
|| cp -R html '/home/nginx'
test -d '/home/log/nginx' \
|| mkdir -p '/home/log/nginx'
make[1]: 离开目录“/home/nginx-1.19.3”
运行 # ./home/nginx/sbin/nginx
停止 # ./home/nginx/sbin/nginx -s -stop
00 04 * * * bash /home/Crontab.sh
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了