0.04-Linux配置安装

1、wget 命令

yum install -y wget

2、ifconfig 命令

yum install net-tools              (apt install net-tools)

3、CentOS yum 配置阿里云yum源

-3.1、切换到centos的yum源:cd /etc/yum.repos.d

-3.2、备份原来的repo文件:mv CentOs-Base.repo CentOs-Base.repo.bak

-3.3、下载阿里云的repo文件:wget http://mirrors.aliyun.com/repo/Centos-7.repo

-3.4、替换原来的repo文件:mv Centos-7.repo CentOs-Base.repo

-3.5、依次执行yum源更新命令: ①yum clean all  ② yum makecache ③ yum update

4、 Debian9配置阿里云源

-4.1、在Windows创建“sources.list”文件,内容为

deb http://mirrors.aliyun.com/debian stretch main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch main contrib non-free
deb http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free

-4.2、用创建“sources.list”替换“/etc/apt/sources.list” ,命令:mv /root/sources.list /etc/apt/sources.list

-4.3、更新镜像:apt-get update

5、Debian 9 开启ssh

-5.1、更新apt资源列表:apt-get update

-5.2、安装openssh服务器:apt-get install openssh-service

-5.3、启用ssh.service:systemctl start ssh.service

-5.4、修改配置: vi  /etc/ssh/sshd_config  将 #PermitRootLogin prohibit-password 改为 PermitRootLogin yes  和将 #port 22的“#”号删除

-5.5、重启ssh:/etc/init.d/ssh restart

转载于:https://my.oschina.net/u/3678587/blog/3055199

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值