💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
1 网络设置 vi /etc/sysconfig/network-scripts/ifcfg-eth33 第一种 DEVICE=eth33  #设备名称,可根据ifcofnig命令查看到。 BOOTPROTO=dhcp  #连接方式,dhcp会自动分配地址,此时不需要在下面设置ip和网关 HWADDR=00:0C:29:AD:66:9F  #硬件地址,可根据ifcofnig命令查看到。 ONBOOT=yes  #yes表示启动就执行该配置,需要改为yes 第二种 DEVICE=eth33  #设备名称,可根据ifcofnig命令查看到。 BOOTPROTO=static #连接方式,静态ip HWADDR=00:0C:29:AD:66:9F  #硬件地址,可根据ifcofnig命令查看到。 ONBOOT=yes  #yes表示启动就执行该配置,需要改为yes IPADDR=192.168.31.110(需要xshell 访问的地址) NETMASK=255.255.255.0 GATEWAY=192.168.31.0 重启服务器 加载网卡设置 systemctl restart network 重启网卡服务 2 换源 1 yum install -y wget 2 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 3 wget -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo (PS : 可以使用curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo) 4 yum make cache 3 ssh服务 开启ssh服务需要root权限,先用root账户登陆 先检查有没有安装ssh服务:rpm -qa | grep ssh 如果没有安装ssh服务就安装 : yum install openssh-server 安装好后在ssh配置文件里进行配置 : vim /etc/ssh/sshd_config 如果没有安装vim 使用yum 安装下 ![](https://box.kancloud.cn/2de7c0b91be595ce288fa0307a38dccb_368x104.png) 去掉#号 ![](https://box.kancloud.cn/877d817ec8d027e21fa62fd65efbfb07_556x111.png) 允许root登录 开启ssh服务 systemctl start sshd.service 4 防火墙 打开22端口 firewall-cmd --zone=public --add-port=22/tcp --permanent (--permanent永久生效,没有此参数重启后失效) 删除端口 firewall-cmd --zone= public --remove-port=22/tcp --permanent 可以使用xshell链接了 happy