linux模板機配置

2022-09-14 23:54:46 字數 1223 閱讀 7522

1、設定主機名稱

# hostnamectl set-hostname centos7.longlyshadow.cn

# su

2、更改ip獲取方式為靜態設定以及繫結主機名+ip到 /etc/hosts

修改網絡卡:

# vi /etc/sysconfig/network-scripts/ipcfg-ens33

type="ethernet"

bootproto="none"

ipaddr=10.1.1.10

netmask=255.255.255.0

gateway=10.1.1.2

dns1=8.8.8.8

dns2=119.29.29.29

name="ens33"

device="ens33"

onboot="yes"

繫結ip和主機名

# vi /etc/hosts

10.1.1.10 centos7.longlyshadow.cn

重啟網絡卡:

# systemctl restart network
3、關閉防火牆和selinux

# systemctl stop firewalld

# systemctl disable firewalld

# setenforce 0

# vi /etc/selinux/config

selinux=disabled

# yum install wget -y

# mv /etc/yum.repos.d/centos-base.repo /etc/yum.repos.d/centos-base.repo.backup

# wget -o /etc/yum.repos.d/centos-base.repo

# yum clean all

# yum makecache

5、安裝擴充套件軟體(自動補全、vin編輯器、net-tools網路工具包以及ntpdate時間同步工具)

# yum install bash-completion vim net-tools ntpdate -y

# ntpdate 120.25.108.11

linux 檔案 跳板機 linux跳板機配置

1.ip配置 跳板機ip 192.168.10.128 server1ip 192.168.10.133 server2ip 192.168.10.132 server3ip 192.168.10.131 2.建立使用者 root fengxiaoli useradd jump要在所有機器上操作。r...

linux跳板機配置

1.ip配置 跳板機ip 192.168.10.128 server1ip 192.168.10.133 server2ip 192.168.10.132 server3ip 192.168.10.131 2.建立使用者 root fengxiaoli useradd jump 要在所有機器上操作。...

模板機優化

優化網絡卡1 vi etc sysconfig network scripts ifcfg eth0 type ethernet bootproto none defroute yes name eth0 device eth0 onboot yes ipaddr 10.0.0.200 prefix...