[转载]https://www.linuxhelp.com/how-to-install-xrdp-in-centos/
找了很多国内的,总是这里出问题,那里出问题。直接找了一个国外的,亲试可用。
To install XRDP in CentOS
Xrdp is a free-ware implementation of RDP (Remote Desktop Protocol), the protocol used with Windows Terminal Services for native Windows desktop connectivity. The xrdp package provides RDP functionality, along with an X server capable of accepting connections from rdesktop and Windows Terminal Server clients.
To install XRDP
Run the following command to install epel repository
[root@linuxhelp Desktop]# yum install epel-release
Loaded plugins: fastestmirror, langpacks
.
.
.
Installing : epel-release-7-6.noarch 1/1
Verifying : epel-release-7-6.noarch 1/1
Installed:
epel-release.noarch 0:7-6
Complete!
Next install NUX repository by running the following command.
[root@linuxhelp Desktop]# rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
Retrieving http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
warning: /var/tmp/rpm-tmp.RzwKEg: Header V4 RSA/SHA1 Signature, key ID 85c6cd8a: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:nux-dextop-release-0-1.el7.nux ################################# [100%]
Create the repo file inside yum.repos.d directory and add the following statements into it.
[root@linuxhelp Desktop]# vim /etc/yum.repos.d/xrdp.repo
[xrdp]
name=xrdp
baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/
enabled=1
gpgcheck=0
After creating the repos start installing xrdp.
[root@linuxhelp Desktop]# yum install xrdp tigervnc-server
Loaded plugins: fastestmirror, langpacks
http://epel.mirror.net.in/epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
.
.
.
Installed:
tigervnc-server.x86_64 0:1.3.1-4.el7_2 xrdp.x86_64 1:0.9.0-4.el7
Complete!
Run the following command to start and enable the xrdp service
[root@linuxhelp Desktop]# systemctl start xrdp.service
[root@linuxhelp Desktop]# systemctl enable xrdp.service
ln -s '/usr/lib/systemd/system/xrdp.service' '/etc/systemd/system/multi-user.target.wants/xrdp.service'
Then check the status of xrdp by using the following command.
[root@linuxhelp Desktop]# systemctl status xrdp.service
xrdp.service - xrdp daemon
Loaded: loaded (/usr/lib/systemd/system/xrdp.service; enabled)
Active: active (running) since Tue 2016-09-20 14:41:13 IST; 23s ago
Main PID: 12192 (xrdp)
CGroup: /system.slice/xrdp.service
??12192 /usr/sbin/xrdp --nodaemon
Sep 20 14:41:13 linuxhelp systemd[1]: Starting xrdp daemon...
Sep 20 14:41:13 linuxhelp systemd[1]: Started xrdp daemon.
Verify the XRDP listening port with the help of the following command.
[root@linuxhelp Desktop]# netstat -antup | grep xrdp
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 12192/xrdp
tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 12190/xrdp-sesman
Add the listen port into iptables and reload the firewall.
[root@linuxhelp Desktop]# firewall-cmd --permanent --zone=public --add-port=3389/tcp
success
[root@linuxhelp Desktop]# firewall-cmd --reload
Success
Run the following command to configure Selinux for xrdp.
[root@linuxhelp Desktop]# chcon --type=bin_t /usr/sbin/xrdp
[root@linuxhelp Desktop]# chcon --type=bin_t /usr/sbin/xrdp-sesman
Open the Remote Desktop Connection wizard and enter the ip for Linux machine.
Login to the XRDP and click OK.
Now we have successfully logged in to the remote desktop.
You can start using the remote desktop.
Thank you! for using Linux Help.
You find this tutorial helpful? Share with your friends to keep it alive.
For more help topics browse our website www.linuxhelp.com
Be the first to comment, we value your suggestions. For further queries please comment below.