使用root用户进行操作。
修改配置文件方式:
修改文件路径:/etc/sysconfig/network-scripts/ifcfg-eth0
删除文件种有关IP4/IP6、UUID的内容;
修改:
BOOTPROTO=static
ONBOOT=yes
添加:
IPADDR=10.255.55.5 -- 待设置的IP
NETMASK=255.255.255.0 --子网掩码
GATEWAY=10.255.55.1 --网关
DNS=114.114.114.114 --域名系统服务协议
保存,之后关闭防火墙,便可以使用远程访问工具连接。
查看防火墙状态:systemctl status firewalld.service
停止防火墙状态:systemctl stop firewalld.service
设置开机时默认关闭防火墙:systemctl disable firewalld.service
重启服务器:reboot
完成以上操作,便可使用远程工具访问自己的静态IP服务器。