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

一、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

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值