centos使用笔记-安装后的一些配置

一.允许普通用户使用sudo

root用户下运行

visudo
在root ALL=(ALL)ALL下面添加
renren ALL=(ALL)ALL

二.打开有线网络

进入存放网络脚本的文件夹

cd /etc/sysconfig/network-scripts/ 

找到并打开对应的有线网络脚本文件

# nano ifcfg-xxxx

修改onboot参数如下

ONBOOT=yes

重启网络服务

# /etc/init.d/network restart

三.更换中国源(这里以阿里巴巴镜像源为例)

1.备份原来的源文件

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2.下载阿里巴巴源文件

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3.创建缓存

# yum makecache

四.升级操作系统

1.升级系统

#yum update

 2.重启

reboot

猜你喜欢

转载自www.cnblogs.com/renren-study-notes/p/10353852.html