运维系列:UBUNTU22 安装NGINX(仅供参考)

UBUNTU22 安装NGINX(仅供参考)




# 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

nginx官网:http://nginx.org/en/download.html

  # ./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







世事浮云

UBUNTU22 安装NGINX

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

坦笑&&life

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值