服务器操作集合

服务器使用PC作为代理访问外网

1、PC上启动代理,比如nginx

下载nginx:http://nginx.org/en/download.html
修改配置文件,在conf下:

http {
    include       mime.types;
    default_type  application/octet-stream;    
   
    sendfile        on;
    keepalive_timeout  65;


    server {
        listen       888;
        server_name  localhost;
        resolver 114.114.114.114;

        location / {         
           if ($scheme = 'http') {
               proxy_pass http://$host$request_uri;
            }
           if ($scheme = 'https') {
               proxy_pass https://$host$request_uri;
            }
            proxy_set_header Host $host;
            proxy_buffers 256 4k;
            proxy_max_temp_file_size 0k;
        }
 }

双击启动nginx

注:如果使用的还有https,则不能使用windows版本,需要自己编译linux版本。
./configure --prefix=/opt/nginx --with-http_ssl_module --add-module=./modules/ngx_http_proxy_connect_module --with-openssl=…/…/openssl/openssl-1.1.1
https功能目前可以使用curl https://blog.csdn.net/ 不能使用curl https://baidu.com会报错

2、启动ssh

 ssh -R localhost:xxx1:localhost:xxx2 username@服务器IP

参数分别是:服务器端口:PC主机:PC端口

连上后设置代理:

export {http,https}_proxy='localhost:xxx1'

说明:这样设置apt命令仍然会提示 Unsupported proxy configured:
localhost://7890
需要将设置放在apt.conf中增加Acquire::http::Proxy “http://127.0.0.1:7890”;
Acquire::https::Proxy “http://127.0.0.1:7890”;

在这里插入图片描述

这时总体拓扑为:
在这里插入图片描述

ipmi修改BIOS启动参数

先关闭电源 ipmitool -H BMC口IP -U userName -P password chassis power soft

然后查看是否关闭:ipmitool -I lanplus -H BMC口IP -U userName -P password power status

在一个终端先连上启动界面:ipmitool -I lanplus -H BMC口IP -U userName -P password sol activate
在这里插入图片描述

在另一个终端启动:ipmitool -I lanplus -H BMC口IP -U userName -P password power on
在这里插入图片描述

然后在启动界面按F4(根据提示,可能不一致)进入BIOS

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值