[linux]redhat7.6 安装telnet

方法一:yum安装

配置yum

创建挂载目录
mkdir /mnt/cdrom

挂载镜像
mount -o loop -t iso9660 /rhel-server-7.6-x86_64-dvd.iso /mnt/cdrom/
备份redhat.repo
cd /etc/yum.repos.d/
cp redhat.repo redhat_bak.repo

编辑redhat7.repo文件
vim redhat7.repo
[dvd]
name=redhat7
baseurl=file:///mnt/cdrom/
gpgcheck=0
enabled=1

重新加载yum
yum clean all
yum makecache

查询是否安装telnet

rpm -qa |grep telnet*

安装服务端:

yum -y install telnet-server.x86_64

安装客户端:
yum -y install telnet.x86_64

安装telnet守护进程:
yum -y  install xinetd.x86_64

安装后检查:

rpm -qa |grep telnet*

启动telnet和守护进程:

systemctl start telnet.socket
systemctl start xinetd

设置xinetd自启动:

systemctl enable telnet.socket
systemctl enable xinetd.service

测试:

telnet

默认端口为:23

方法二:镜像安装

挂载镜像:

mount /dev/sr0  /mnt

或:

mkdir /mnt/cdrom

mount -o loop -t iso9660 /rhel-server-7.6-x86_64-dvd.iso /mnt/cdrom/

查询镜像中的telnet、xinetd安装包:

ls /mnt/Packages/telnet*
ls /mnt/Packages/xinetd*

安装服务端:
rpm -ivh /mnt/Packages/telnet-server-0.17-64.el7.x86_64.rpm 
安装守护进程:
rpm -ivh/mnt/Packages/xinetd-2.3.15-13.el7.x86_64.rpm
安装客户端:
rpm -ivh /mnt/Packages/telnet-0.17-64.el7.x86_64.rpm 

查询是否安装成功:
rpm -ql telnet-server xinetd
启动服务:
systemctl start telnet.socket xinetd.service
查看服务状态:
systemctl status telnet.socket xinetd.service

 

 

你可能感兴趣的:(linux,telnet,redhat)