Azure configuration management series Oracle Linux (PART1)
Azure configuration management series Oracle Linux (PART2)
Azure configuration management series Oracle Linux (PART4)
4. Install VNC server in Oracle Linux VM
In this article, describe the process of installing VNC server in Oracle Linux VM.
To set up the VNC server, we perform the following steps:
Install VNC Server package
Create VNC user account
Edit VNC server configuration
Set the user's VNC password
Confirm that VNC server can start and stop normally
Automatically start VNC server service during boot
Custom xstartup script
Test each VNC user by directly connecting to the VNC server
4.1 VNC server software package required for installation
Log in as administrator in Oracle Linux VM and install VNC server.
Our VM runs on Oracle Linux 6. The server is tiger VNC server (not VNC server).
sudo yum install tigervnc-server
4.2 create VNC user account.
By default, Oracle Linux VM installs an oracle user in the system.
sudo cat /etc/passwd
......
oracle:x:54321:54321::/home/oracle:/bin/bash
aroot:x:54322:54323::/home/aroot:/bin/bash
......
To reset the password for an Oracle user:
sudopasswd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
4.3 edit VNC server configuration
Edit the "/ etc / sysconfig / vncservers" configuration file
sudo vi /etc/sysconfig/vncservers
Add the following entry to the file / etc / sysconfig / vncservers to enable VNC with the display numbers ". 1" and ". 2"
VNCSERVERS =" 1: aroot 2: oracle"
VNCSERVERARGS [1] ="-geometry 1024x768 -nolisten tcp"
VNCSERVERARGS [2] =" -geometry 800x600 -nolisten tcp"
Note that there are multiple display: user pairs defined on a single line, but each displayed parameter is defined separately
Through these entries, we define that VNC server instance should be started with user "atoor" on display 1 and user "oracle" on display 2, and also set some options for the server, such as resolution and color depth. Each VNC server instance listens for port 5900 and the display number where the server is running.
aroot's vnc server listens on port 5901
oracle's vnc server listens on port 5902
4.4 setting the user's VNC password
Set the VNC password for all users defined in the "/ etc / sysconfig / vncservers" file.
Switch users to each user's account and run: vncpasswd
You are prompted for a password. The password to use when connecting to the userid's vnc server instance.
[aroot@fftest5 ~]$ vncpasswd
Password:
Verify:
[aroot@fftest5 ~]$ su - oracle
Password:
[oracle@fftest5 ~]$ vncpasswd
Password:
Verify:
[oracle@ffora1 ~]$
This will create ~ /. vnc directory for this user ID:
[aroot@fftest5 ~]$ ls -al /home/aroot/.vnc/total 12drwxrwxr-x. 2 aroot aroot 4096 Oct 16 08:54 .
drwx------. 3 aroot aroot 4096 Oct 16 08:54 ..-rw-------. 1 aroot aroot 8 Oct 16 08:54 passwd
4.5 confirm that VNC server can be started and stopped normally
sudo /sbin/service vncserver start
[aroot@fftest5 ~]$ sudo /sbin/service vncserver start
[sudo] password for aroot:
Starting VNC server: 1:aroot xauth: creating new authority file /home/aroot/.Xauthority
New 'fftest5:1 (aroot)' desktop is fftest5:1Creating default startup script /home/aroot/.vnc/xstartup
Starting applications specified in /home/aroot/.vnc/xstartup
Log file is /home/aroot/.vnc/fftest5:1.log
2: oracle
New 'fftest5:2 (oracle)' desktop is fftest5:2Creating default startup script /home/oracle/.vnc/xstartup
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/fftest5:2.log
[ OK ]
sudo /sbin/service vncserver stop
Shutting down VNC server: 1:aroot 2:oracle [ OK ]
sudo /sbin/service vncserver start
Azure configuration management series Oracle Linux (PART1)
Azure configuration management series Oracle Linux (PART2)
Azure configuration management series Oracle Linux (PART4)