Prepare the VNC environment for installing oracle11g under the centos Virtual Machine of Microsoft cloud
The company is preparing to use Microsoft ECs, so we need to test it first. oracle11g also needs to be migrated to Microsoft ECS.
1. Check whether the VNC service has been installed on the server. The command to check whether the VNC is installed on the server is as follows:
[root@companydb1 rpms]# ps -eaf|grep vncroot 1789 1557 0 17:30 pts/0 00:00:00 grep vnc[root@companydb1 rpms]# [root@companydb1 rpms]# rpm -qa | grep vnc[root@companydb1 rpms]#
2. Install vnc software
Yum installation command:
yum install tigervnc tigervnc-server -y
Check the installation
[root@companydb1 rpms]# rpm -qa | grep vnctigervnc-1.1.0-16.el6.centos.x86_64tigervnc-server-1.1.0-16.el6.centos.x86_64libvncserver-0.9.7-4.el6.x86_64[root@companydb1 rpms]#
3. Install gnome Software
yum install -y gnome*
4. Configure xstartup and vncservers
[root@companydb1 .vnc]# vim /etc/sysconfig/vncserversVNCSERVERS="1:root"VNCSERVERARGS[1]="-geometry 800x600"
Save and exit
[root@companydb1 .vnc]# vim /root/.vnc/xstartup#!/bin/sh# Uncomment the following two lines for normal desktop:unset SESSION_MANAGERexec /etc/X11/xinit/xinitrc[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solid greyvncconfig -iconic &#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &#twm &gnome-session &
Save and exit
PS:
If you use the gnome image interface, you need to comment out the following two lines,
Xterm-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "&
Twm &
And add the following line:
Gnome-session &
5. Change the xstartup permission.
This is a problem that many people may easily ignore, and it is also one of the reasons for the success of the connection.
In CentOS, The xstartup file path is/root/. vnc/(you can use locate xstartup to view the xstartup file path)
Therefore, run chmod 777/root/. vnc/xstartup.
6. Start vnc
Start: service vncserver start
Stop: service vncserver stop
Restart: service vncserver restart
Run the following command to set the VNC service to start at startup:
Chkconfig vncserver on
7. Set the vnc access password
[root@companydb1 .vnc]# vncpasswdPassword:Verify:[root@companydb1 .vnc]#
8. Install vnc viewer on windows
Install the vnc client in windows
: Bytes:
Connect to and enter the password, as shown in 1.png.
In this way, you can remotely operate the oracle server centos6.7 through vnc.