码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • 服务器操作集合


    服务器使用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

  • 相关阅读:
    为什么新的5G标准将为技术栈带来更低的TCO
    基于MiniTest的小程序自动化测试
    LabVIEW 使用VISA Close真的关闭COM口了吗
    国密sm2的Vue、Python、Java互通使用
    Java:实现快速傅里叶变换算法(附完整源码)
    Django笔记十八之save函数的继承操作和指定字段更新等实例方法
    Proxyless Mesh 在 Dubbo 中的实践
    C语言 原码、反码、补码
    基于复合优化加速算法研究实际问题
    【非对称加密算法】RSA算法
  • 原文地址:https://blog.csdn.net/aashuii/article/details/140371705
  • 最新文章
  • 沪漂五周年了:我越来越迷茫了
    Agentic Skill Routing 实战:别再把所有 Skill 塞进 AI Agent 上下文
    MySQL-Seconds_behind_master的精度误差
    [MAF预定义ChatClient中间件-03]CachingChatClient——利用缓存省钱省时间
    AI的至暗历史:从万众期待到被政府撤资,AI的两次死亡徘徊
    Agent OS :五种驯服不确定性的范式
    PortSwigger SQL注入LAB11
    数据库即时编译JIT
    [Begin]AI Learn Data Day 0
    深度学习进阶(二十七)现代 LLM 的核心架构设计其二:SwiGLU
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号