Trang

[TUT] - Remote Desktop cho VPS Linux

Đầu tiên login vào SSH nhé ( khuyên dùng Tunnelier nhé )

Bước 1 : Cài X Windows System (KDE và GNOME Desktop Environement !)

Code:

yum groupinstall "X Window System" "GNOME Desktop Environment"

Đến đoạn nó hỏi Y/n cứ Y rồi ngồi đợi xíu

Chờ xíu nó Complete là được.

Sau khi cài đặt xong GNOME Desktop Environnement,chúng ta chuyển qua KDE chạy lệnh :

Code:

yum groupinstall "X Window System" "KDE (K Desktop Environment)"

Đến đoạn nó hỏi Y/n cứ Y rồi ngồi đợi xíu

Bước 2 : Cài đặt VNC Server :

Code:

yum install vnc-server

Đợi xíu cài xong nó sẽ báo

Bước 3 : Chỉnh config của VNC Server

Edit file vnc server, chạy lệnh :

Code:

vi /etc/sysconfig/vncservers

Nếu ai biết sử dụng Linux rồi thì ko nói , còn ai ko biết thì mở SFTP của tunnelier lên,download file đó về,mở = notepad++ , xong edit : Bỏ 2 dấu # ở 2 câu cuối cùng

Code:

# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

# Use "-nohttpd" to prevent web-based VNC clients connecting.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.

VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"

Save lại rồi up đè lên file cũ trên server

Bước 4 : Khởi động VNC Server :

Code:

vncserver

Chạy cái này nó sẽ kiu đặt pass khi vào remote desktop.
Lưu ý: linux khi nhập pass nó sẽ ko ra dấu *** như windows mà nó ẩn xuống,nên các bạn cứ nhập xong bấm enter rồi verify lại 1 lần nữa

Bước 4 : Sửa file xstartup

Code:

vi /root/.vnc/xstartup

Bỏ 2 dấu thăngs ở 2 đoạn như code dưới :

Code:

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

Còn đây là đoạn code đúng luôn,ai ko biết sửa thì copy cái này vào

Code:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

Bước 5 : Khởi động lại vnc server :

Code:

/etc/init.d/vncserver restart

Bước 6 : Khởi động khi bật máy:

Code:

chkconfig vncserver on

Bước 7 : Tắt firewall

Code:

/etc/init.d/iptables stop

Bước 8 : Tắt firewall khi bật máy

Code:

chkconfig iptables off

Xong download file này về chạy theo dạng:

Code:
http://www.mediafire.com/?c56submfwizyhbl

Code:
IPserver:1



Chú Ý:

Coppy phải ghi rõ nguồn Dương-UG Blog's
 

0 nhận xét:

Đăng nhận xét

:) :( :)) :(( =))

Copyright © Dương-UG Blog's - Nguyễn Bình Dương