1. vmware安装CentOS版本 CentOS-7-x86_64-Minimal-1611.iso,版本来源:https://www.centos.org/
2. 安装后,没有ifconfig命令,解决方法:
yum install net-tools
3. 安装telnet, 参考: http://blog.csdn.net/jiguang0455/article/details/8670142
http://www.cnblogs.com/lixuwu/p/6102444.html
检查xinetd、telnet是否安装:
rpm -qa |grep telnet
rpm -qa | grep xinetd
安装telnet:
#yum install xinetd (注意在root下安装)
#yum install telnet (注意在root下安装)
#yum install telnet-server(注意在root下安装)
配置telnet,/etc/xinetd.d/telnet:
# default: yes
# description: The telnet server servestelnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server =/usr/sbin/in.telnetd
log_on_failure += USERID
disable = yes
}
只需要将”disable= yes”改成” disable=no”
启动xinetd和telnet:
systemctl start telnet.socket 启动telnet systemctl start xinetd 启动xinet
(或service xinetd start)
安装完成后,将xinetd服务加入开机自启动:
systemctl enable xinetd.service
将telnet服务加入开机自启动:
systemctl enable telnet.socket
关闭防火墙: 参考: http://www.linuxidc.com/Linux/2015-05/117473.htm
iptables -I INPUT -p tcp --dport 23 -jACCEPT
iptables -I INPUT -p udp --dport 23 -jACCEPT
service iptables save //保存
service iptables restart //重启防火墙
或者来点狠的!!关闭防火墙!
service iptables stop
直接关闭:
关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
CentOS 7中没有ifconfig命令,而且不能发现eth0
修改grub中的GRUB_CMDLINE_LINUX,追加语句”net.ifnames=0 biosdevname=0“。
然后执行# grub2-mkconfig -o /boot/grub2/grub.cfg
之后重启# reboot