学习linux必做的一系列实战操作(vm,centos)
1. 更换yum源
http://t.csdn.cn/wNGXc
2. 制作静态ip
cd /etc/sysconfig/network-scripts/
cp ifcfg-ens33 ifcfg-ens33.bak
vim ifcfg-ens33
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEVICE="ens33"
ONBOOT="yes"
IPADDR=192.168.19.20
GATEWAY=192.168.19.2
DEFROUTE="yes"
NETMASK=255.255.255.0
DNS1=114.114.114.114
//IPV4_FAILURE_FATAL="no"
//IPV6INIT="yes"
//IPV6_AUTOCONF="yes"
//IPV6_DEFROUTE="yes"
//IPV6_FAILURE_FATAL="no"
//IPV6_ADDR_GEN_MODE="stable-privacy"
//NAME="ens33"
//UUID="0b5d44e3-ee5e-4609-9853-a3d1e8e3d358"
systemctl restart network
3. 安装常用的安装包
- 命令补全工具
yum -y install bash-completion
source /etc/profile.d/bash_completion.sh
- vim
yum -y install vim
- net-tools
yum -y install net-tools
- 时间校准
yum -y install ntpdate
4. 关闭防火墙
- 临时关闭
systemctl stop firewalld
setenforce 0
- 永久关闭
systemctl stop firewalld
systemctl disable firewalld
vim /etc/sysconfig/selinux
SELINUX=disable
source /etc/sysconfig/selinux