Linux学习记录(二)yum换源、ssh远程连接等基本配置
前言
上一篇章已经安装了最小安装的CentOS7,接下来进行一些基本的配置
开始之前:为了防止在配置中出现错误导致Linux崩坏,建议大家先拍摄快照
一、更换yum阿里源
1、安装wget
yum -y install wget
2、进入/etc/yum.repos.d目录,备份yum源
cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.bak
3、下载阿里源
wget http://mirrors.aliyun.com/repo/Centos-7.repo 下载阿里源配置文件
4、用下载的.repo文件替换默认配置
mv Centos-7.repo CentOS-Base.repo
5、重新生成新的yum缓存
yum makecache
至此,yum源更换成功 
二、SSH远程连接配置
1、查看是否安装ssh(一般CentOS自带ssh服务,无需下载);
yum list installed | grep openssh-server

2、安装ssh服务(如果未安装);
yum install openssh-server
3、配置ssh文件;
vi /etc/ssh/sshd_config
按下 i 可进入编辑:去掉#注释即可 4、启动ssh服务;
检查服务状态:systemctl status sshd.service 启动命令(未启动时):systemctl start sshd.service
 设置为开机自启动
systemctl enable sshd.service
三、Xshell / 堡塔SSH终端 连接 CentOS7
Xshell:https://www.jb51.net/softs/732916.html 堡塔SSH终端: https://www.bt.cn/download/term.html
1、查看IP地址:192.168.146.147**
ifconfig
 2、堡塔SSH终端连接   3、Xshell 工具连接 
  接下来就可以使用远程工具来操作Linux,不用担心复制粘贴了。
四、其他配置
1、关闭防火墙
systemctl stop firewalld . 开机自启动关闭:systemctl disable firewalld.service
2、安装 net-tools(net-tools中包含常用的网络命令)
yum install -y net-tools
3、安装vim编辑器
yum install -y vim-enhanced
4、安装rpm增强
yum provides ‘*/applydeltarpm’ yum -y install deltarpm
|