centos7安装时我用的最小化安装,所以很多软件没有,很多都是自己装的,比如vim,ifconfig等。现在说一下使用远程连接的操作,因为平时用win系统,所有想直接用微软的远程桌面连接。
当然,要想这样连接前提条件是,你的centos7安装了图形化界面,GNOME、KDE都行。
1. 安装epel库
yum install epel-release
2. 安装xrdp
yum install xrdp
systemctl start xrdp
systemctl enable xrdp
systemctl status xrdp
可以看一下xrdp监听的端口,也是3389
netstat -tnlp | grep xrdp
3. 安装tigervnc-server
yum install tigervnc-server
4. 关闭防火墙或者放行3389端口
systemctl stop firewalld
# 直接禁用了
systemctl disable firewalld
5. 关闭SElinux
- 临时关闭
sudo setenforce 0
该命令将SELinux模式从Enforcing(强制)切换为Permissive(宽容)模式。在Permissive模式下,SELinux会记录违规行为,但不会阻止它们。
- 永久关闭
则需要修改selinux的配置文件
vim /etc/selinux/config
将SELINUX=enforcing
改为SELINUX=disabled
。
保存退出并重新启动系统以使更改生效。
注意:关闭SELinux可能会降低系统的安全性,所以尽量保持防火墙开启。
网友评论