安装常用的软件(配置系统的yum源)
检查联网情况
ping baidu.com #结果有个time即可.
配置yum源并安装常用工具
给麒麟增加一个软件下载地址(epel centos7地址)
下载额外的软件源
yum install -y wget<br>wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
安装Linux常用工具
yum install -y tree telnet vim wget bash-completion lrzsz net-tools sysstat iotop iftop htop unzip nc nmap telnet bc psmisc httpd-tools bind-utils nethogs expect<br>
麒麟中有趣命令
yum install -y sl cowsay aalib
sl命令<br>cowsay命令<br>animalsay命令<br>aafire命令
Ubuntu配置 (22.04) (Ubt和debian系统中安装软件用的是apt命令)
备份/etc/apt/sources.list文件 到/tmp/
cp /etc/apt/sources.list /tmp/
vim /etc/apt/sources.list
dG #vi/vim快捷键 删除当前行到最后一行的内容
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释<br>deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse<br># deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse<br>deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse<br># deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse<br>deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse<br># deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse<br><br>deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse<br># deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse<br><br># 预发布软件源,不建议启用<br># deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse<br># # deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse<br><br>
执行apt update 生成本地软件包缓存,如果不执行则下载软件失败
<font color="#e74f4c">apt update</font>
安装软件
apt install -y tree telnet vim lrzsz wget unzip
趣味软件
apt install -y cmatrix lolcat nyancat screenfetch libaa-bin<br>
nyancat 彩虹猫<br>lolcat 彩色文本<br>cmatrix 黑客帝国<br>screenfetch 信息展示<br>aafire 火
openssh服务配置(openssh就是远程服务. 服务名字叫sshd)
修改远程连接端口
ubt系统root,禁止root远程登录
配置文件:/etc/ssh/sshd_config
#Port 22修改ssh端口号,端口范围1-65535 推荐10000以上 52113<br>#PermitRootLogin prohibit-password右边是非yes,禁止root远程登录,ubt默认禁止root远程登录
保存退出后重启服务
systemctl restart sshd
重新用户root远程登录即可(测试)
麒麟系统修改端口号后,需要关闭防火墙
红帽类系统
systemctl disable --now firewalld
ubt
systemctl disable --now ufw