gcc无yum源离线rpm安装,ngnix无yum源离线安装,

tech2025-06-27  12

一、GCC无yum源的rpm离线安装

1.gcc 的rpm安装包如下,可以去163镜像上下载相应的rpm包。 163镜像地址: http://mirrors.163.com/centos/7/os/x86_64/Packages/

2.安装rpm包,进入存放rpm所在的路径,使用以下命令,进行安装或升级: rpm -Uvh *.rpm --nodeps --force 如出现包缺失或包版本版本不对称问题,自行下载或升级 3.检查gcc:gcc -v 会出现相应信息

二、无yum源离线安装ngnix

1.获取ngnix安装包nginx-1.16.1.tar.gz 官网下载地址: https://nginx.org 2.上传解压,进入nginx解压目录 3添加用户:useradd nginx 4.检查安装环境,是否符合: ./configure 5.编译: ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.32 6.安装make && make install 7.启动: cd /usr/local/nginx/sbin ./nginx 8.检查启动情况:netstat -anptu | grep nginx curl 127.0.0.1 9.停止: nginx -s stop 或者 ./nginx -s quit 10.ngnix:相关命令 11.nginx相关配置 server { listen 8080 default_server; server_name localhost; root /opt/ngnix/html/website; index index.html; location ^~/tuning { root /; proxy_pass http://172.29.129.41:18080/tuning; } location ^~/nest { root /; proxy_pass http://172.29.129.41:10086/graph/nest; } location ^~/translate { root /; proxy_pass http://172.29.129.41:18081/translate; }

error_page 404 /404.html; location = /40x.html { } } 12.nginx开机自启

systemctl enable nginx.service systemctl status nginx.service ps aux | grep nginx systemctl start nginx.service systemctl stop nginx.service systemctl restart nginx.service

最新回复(0)