安装完linux系统之后需要做的事情
以centos7为例:
1.用root用户登录
2. tab键补全安装包
yum -y install bash-completion
reboot 重启服务器生效
3.安装vim
yum install -y vim
4.配置网络
最后重启网络服务:systemctl restart network
ip addr 查看有没有获取到地址 用电脑的cmd ping一下ip看看有没有通。
5.关闭防火墙(可选)和selinux
命令:systemctl stop firewalld systemctl disabled firewalld
再输入vim /etc/sysconfig/selinux 输入i。enforcing修改selinux=disabled
reboot 重启
6.配置yum源
yum源放置的位置:cd /etc/yum.repos.d/
这里我是先备份 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup(最好不要删除)然后去使用阿里或者其他的centos源
yum clean all 清除缓存,运行 yum makecache 生成新的缓存
yum update 更新软件包
7.修改hostname和hosts
vim /etc/hostname
安装完linux系统之后需要做的事情
以centos7为例:
1.用root用户登录
2. tab键补全安装包
yum -y install bash-completion
reboot 重启服务器生效
3.安装vim
yum install -y vim
4.配置网络
最后重启网络服务:systemctl restart network
ip addr 查看有没有获取到地址 用电脑的cmd ping一下ip看看有没有通。
5.关闭防火墙(可选)和selinux
命令:systemctl stop firewalld systemctl disabled firewalld
再输入vim /etc/sysconfig/selinux 输入i。enforcing修改selinux=disabled
reboot 重启
6.配置yum源
yum源放置的位置:cd /etc/yum.repos.d/
这里我是先备份 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup(最好不要删除)然后去使用阿里或者其他的centos源
yum clean all 清除缓存,运行 yum makecache 生成新的缓存
yum update 更新软件包
7.修改hostname和hosts
vim /etc/hostname