Mine decision was to create solid base installation foundation for incoming 11.2/12.1 upgrades using ASM. So I decide to built 11.1.0.7 version, in which I have to made some upgrade steps as well. So this is how this post has been born.
Beside that, I wanted to show all important run-time installation information, which are in many cases not shown in other blog posts.
Download VMware image
For starting point I downloaded ready made image from page, where I choose CentOS 5.9x 64 server installation. Of course I could choose OEL 5, but with OEL whole Oracle works out of the box without slightest problems, so I wanted to sharpen some expected skills in non Oracle based OS, like CentOS is a good example.Change default image settings
When you initially open ready made VMware image, it has DHCP setting, which is not suitable for real work. So changing IP address to static IP with new server name is something that has to be done.First step is to check VMware image Network settings.
In mine case image has NAT based defined network. To see network range, in Workstation, choose menu
"Edit | Virtual Network Editor", and then select VMnet8 adapter.
In mine case it was 192.168.254.x range. Choose DHCP settings and ensure that first IP address range is above your static IP address.
In mine case I'll use 192.168.254.132, so setting lower value to 134 will be OK. Start CentOS. Now have to setup IP address on OS level. This can be done by calling GUI tool system-config-network or manually.
I'll show GUI approach which could be run either from putty or VMware terminal directly.
Enter, Enter and define as shown: Ok, Save.
Edit DNS Configuration
Change hostname (centos5x64.localdomain) Save, Save&Quit
Restart network service to activate new settings
/etc/init.d/network restart ifconfig
[root@centos5x64 ~]# /etc/init.d/network restart Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: [ OK ] [root@centos5x64 ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:27:02:06 inet addr:192.168.254.132 Bcast:192.168.254.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe27:206/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2303 errors:0 dropped:0 overruns:0 frame:0 TX packets:4313 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:166815 (162.9 KiB) TX bytes:825063 (805.7 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:44 errors:0 dropped:0 overruns:0 frame:0 TX packets:44 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3720 (3.6 KiB) TX bytes:3720 (3.6 KiB) [root@centos5x64 ~]#Now it's time start your session in putty.
Check hostname
[root@centos5x64 ~]# hostname -i 192.168.254.132 [root@centos5x64 ~]# ping centos5x64 PING centos5x64 (192.168.254.132) 56(84) bytes of data. 64 bytes from centos5x64 (192.168.254.132): icmp_seq=1 ttl=64 time=0.201 ms 64 bytes from centos5x64 (192.168.254.132): icmp_seq=2 ttl=64 time=0.034 ms --- centos5x64 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.034/0.117/0.201/0.084 ms [root@centos5x64 ~]#If reply is not as presented, edit /etc/hosts and add entry
192.168.254.132 centos5x64.localdomain centos5x64Check that CentOS is accessible from your Windows OS:
C:\Users\DamirV>ping -a 192.168.254.132 Pinging centos5x64 [192.168.254.132] with 32 bytes of data: Reply from 192.168.254.132: bytes=32 time<1ms TTL=64 Reply from 192.168.254.132: bytes=32 time<1ms TTL=64 Reply from 192.168.254.132: bytes=32 time<1ms TTL=64 Reply from 192.168.254.132: bytes=32 time<1ms TTL=64 Ping statistics for 192.168.254.132: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:This is not enough but later we'll disable firewall settings.
Swap and temp
If you have original CentOS installation then both of those settings are perfect for initial amount of memory. However, changing their size should be followed by changing swap size.grep SwapTotal /proc/meminfo
[root@centos5x64 ~]# grep SwapTotal /proc/meminfo SwapTotal: 2064376 kB [root@centos5x64 ~]#According Oracle:
Available RAM Swap Space Required --------------------------- ----------------- Between 1024 MB and 2048 MB 1.5 times the size of RAM Between 2049 MB and 8192 MB Equal to the size of RAM More than 8192 MB 0.75 times the size of RAM2 GB swap on mine 4 GB RAM VMware is more than enough for play. And check temp space size
df -h /dev/shm
[root@centos5x64 ~]# df -h /dev/shm Filesystem Size Used Avail Use% Mounted on tmpfs 1.5G 0 1.5G 0% /dev/shm [root@centos5x64 ~]#
SELinux
Set Status to Permissive:/usr/sbin/getenforce /usr/sbin/setenforce 0 /usr/sbin/getenforce
[root@centos5x64 ~]# /usr/sbin/getenforce Enforcing [root@centos5x64 ~]# /usr/sbin/setenforce 0 [root@centos5x64 ~]# /usr/sbin/getenforce PermissiveTo make permanent, modify the /etc/sysconfig/selinux change value of SELINUX variable to disabled:
[root@centos5x64 ~]# cp -p /etc/sysconfig/selinux /etc/sysconfig/selinux_org [root@centos5x64 ~]# vi /etc/sysconfig/selinux [root@centos5x64 ~]# cat /etc/sysconfig/selinux # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=disabled # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted # SETLOCALDEFS= Check local definition changes SETLOCALDEFS=0
Disable firewall
For testing disable firewall. Next commands will disable whole firewall (IPv and IPv6).service iptables save service iptables stop chkconfig iptables off service ip6tables save service ip6tables stop chkconfig ip6tables off
[root@centos5x64 ~]# service iptables save Saving firewall rules to /etc/sysconfig/iptables: [ OK ] [root@centos5x64 ~]# service iptables stop Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: filter [ OK ] Unloading iptables modules: [ OK ] [root@centos5x64 ~]# chkconfig iptables off [root@centos5x64 ~]# service ip6tables save Saving firewall rules to /etc/sysconfig/ip6tables: [ OK ] [root@centos5x64 ~]# service ip6tables stop Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: filter [ OK ] Unloading ip6tables modules: [ OK ] [root@centos5x64 ~]# chkconfig ip6tables off [root@centos5x64 ~]#Do not forget that SELinux settings may become active after server reboot while firewall is inactive immediately.
yum updates
yum update CentOS (to the latest version)uname -r cat /etc/redhat-release yum update uname -r cat /etc/redhat-release
[root@centos5x64 ~]# uname -r 2.6.18-348.el5 [root@centos5x64 ~]# cat /etc/redhat-release CentOS release 5.9 (Final) [root@centos5x64 ~]# yum update Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.centos.plus.hr * extras: mirror.centos.plus.hr * updates: mirror.centos.plus.hr base | 1.1 kB 00:00 base/primary | 1.3 MB 00:00 base 3662/3662 extras | 2.1 kB 00:00 extras/primary_db | 173 kB 00:00 updates | 1.9 kB 00:00 updates/primary_db | 329 kB 00:00 Skipping security plugin, no data Setting up Update Process Resolving Dependencies Skipping security plugin, no data --> Running transaction check ---> Package aspell.i386 12:0.60.3-13 set to be updated ---> Package aspell.x86_64 12:0.60.3-13 set to be updated ---> Package autofs.x86_64 1:5.0.1-0.rc2.183.el5 set to be updated ---> Package bash.x86_64 0:3.2-32.el5_9.1 set to be updated ---> Package bind.x86_64 30:9.3.6-20.P1.el5_8.6 set to be updated ---> Package bind-chroot.x86_64 30:9.3.6-20.P1.el5_8.6 set to be updated ---> Package bind-libs.x86_64 30:9.3.6-20.P1.el5_8.6 set to be updated ---> Package bind-utils.x86_64 30:9.3.6-20.P1.el5_8.6 set to be updated ---> Package binutils.x86_64 0:2.17.50.0.6-26.el5 set to be updated ---> Package ccid.x86_64 0:1.3.8-2.el5 set to be updated ---> Package centos-release.x86_64 10:5-10.el5.centos set to be updated ---> Package centos-release-notes.x86_64 0:5.10-0 set to be updated ---> Package coolkey.i386 0:1.1.0-16.1.el5 set to be updated ---> Package coolkey.x86_64 0:1.1.0-16.1.el5 set to be updated ---> Package cpio.x86_64 0:2.6-26.el5 set to be updated ---> Package crash.x86_64 0:5.1.8-2.el5.centos set to be updated ---> Package cups-libs.x86_64 1:1.3.7-30.el5_9.3 set to be updated ---> Package curl.x86_64 0:7.15.5-17.el5_9 set to be updated ---> Package dbus.x86_64 0:1.1.2-21.el5 set to be updated ---> Package dbus-glib.i386 0:0.73-11.el5_9 set to be updated ---> Package dbus-glib.x86_64 0:0.73-11.el5_9 set to be updated ---> Package dbus-libs.i386 0:1.1.2-21.el5 set to be updated ---> Package dbus-libs.x86_64 0:1.1.2-21.el5 set to be updated ---> Package device-mapper-multipath.x86_64 0:0.4.7-59.el5 set to be updated ---> Package dhclient.x86_64 12:3.0.5-33.el5_9 set to be updated ---> Package dovecot.x86_64 0:1.0.7-8.el5_9.1 set to be updated ---> Package e2fsprogs.x86_64 0:1.39-36.el5_9 set to be updated ---> Package e2fsprogs-libs.i386 0:1.39-36.el5_9 set to be updated ---> Package e2fsprogs-libs.x86_64 0:1.39-36.el5_9 set to be updated ---> Package elinks.x86_64 0:0.11.1-8.el5_9 set to be updated ---> Package freetype.x86_64 0:2.2.1-32.el5_9.1 set to be updated ---> Package glibc.i686 0:2.5-118.el5_10.2 set to be updated ---> Package glibc.x86_64 0:2.5-118.el5_10.2 set to be updated ---> Package glibc-common.x86_64 0:2.5-118.el5_10.2 set to be updated ---> Package gnome-vfs2.x86_64 0:2.16.2-12.el5_9 set to be updated ---> Package gnupg.x86_64 0:1.4.5-18.el5_10.1 set to be updated ---> Package gnutls.x86_64 0:1.4.1-10.el5_9.2 set to be updated ---> Package grub.x86_64 0:0.97-13.11.el5_10.1 set to be updated ---> Package gtk2.x86_64 0:2.10.4-30.el5 set to be updated ---> Package httpd.x86_64 0:2.2.3-83.el5.centos set to be updated ---> Package httpd-manual.x86_64 0:2.2.3-83.el5.centos set to be updated ---> Package hwdata.noarch 0:0.213.28-3.el5 set to be updated ---> Package hypervkvpd.x86_64 0:0-0.7.el5_9.3 set to be updated ---> Package initscripts.x86_64 0:8.45.44-3.el5.centos set to be updated ---> Package kernel.x86_64 0:2.6.18-371.4.1.el5 set to be installed ---> Package kpartx.x86_64 0:0.4.7-59.el5 set to be updated ---> Package krb5-libs.i386 0:1.6.1-70.el5_9.2 set to be updated ---> Package krb5-libs.x86_64 0:1.6.1-70.el5_9.2 set to be updated ---> Package krb5-workstation.x86_64 0:1.6.1-70.el5_9.2 set to be updated ---> Package ksh.x86_64 0:20100621-18.el5 set to be updated ---> Package libXfont.x86_64 0:1.2.2-1.0.5.el5_10 set to be updated ---> Package libgcrypt.i386 0:1.4.4-7.el5_10 set to be updated ---> Package libgcrypt.x86_64 0:1.4.4-7.el5_10 set to be updated ---> Package libjpeg.x86_64 0:6b-38 set to be updated ---> Package libtiff.x86_64 0:3.8.2-19.el5_10 set to be updated ---> Package libxml2.x86_64 0:2.6.26-2.1.21.el5_9.3 set to be updated ---> Package libxml2-python.x86_64 0:2.6.26-2.1.21.el5_9.3 set to be updated ---> Package lvm2.x86_64 0:2.02.88-12.el5 set to be updated ---> Package man-pages-overrides.noarch 0:5.10.2-1.el5 set to be updated ---> Package microcode_ctl.x86_64 2:1.17-5.el5 set to be updated ---> Package mkinitrd.i386 0:5.1.19.6-81.el5_10 set to be updated ---> Package mkinitrd.x86_64 0:5.1.19.6-81.el5_10 set to be updated ---> Package mod_ssl.x86_64 1:2.2.3-83.el5.centos set to be updated ---> Package module-init-tools.x86_64 0:3.3-0.pre3.1.63.el5 set to be updated ---> Package mysql.x86_64 0:5.0.95-5.el5_9 set to be updated ---> Package nash.x86_64 0:5.1.19.6-81.el5_10 set to be updated ---> Package net-tools.x86_64 0:1.60-83.el5_10 set to be updated ---> Package nfs-utils.x86_64 1:1.0.9-70.el5 set to be updated ---> Package nscd.x86_64 0:2.5-118.el5_10.2 set to be updated ---> Package nspr.i386 0:4.10.2-2.el5_10 set to be updated ---> Package nspr.x86_64 0:4.10.2-2.el5_10 set to be updated ---> Package nss.i386 0:3.15.3-4.el5_10 set to be updated --> Processing Dependency: libsqlite3.so.0 for package: nss ---> Package nss.x86_64 0:3.15.3-4.el5_10 set to be updated ---> Package nss-tools.x86_64 0:3.15.3-4.el5_10 set to be updated ---> Package nss_ldap.i386 0:253-51.el5_9.1 set to be updated ---> Package nss_ldap.x86_64 0:253-51.el5_9.1 set to be updated ---> Package openldap.i386 0:2.3.43-27.el5_10 set to be updated ---> Package openldap.x86_64 0:2.3.43-27.el5_10 set to be updated ---> Package openssl.i686 0:0.9.8e-27.el5_10.1 set to be updated ---> Package openssl.x86_64 0:0.9.8e-27.el5_10.1 set to be updated ---> Package pcre.x86_64 0:6.6-9.el5 set to be updated ---> Package perl.x86_64 4:5.8.8-41.el5 set to be updated ---> Package perl-IO-Socket-SSL.noarch 0:1.01-2.el5 set to be updated ---> Package php.x86_64 0:5.1.6-43.el5_10 set to be updated ---> Package php-cli.x86_64 0:5.1.6-43.el5_10 set to be updated ---> Package php-common.x86_64 0:5.1.6-43.el5_10 set to be updated ---> Package php-ldap.x86_64 0:5.1.6-43.el5_10 set to be updated ---> Package policycoreutils.x86_64 0:1.33.12-14.13.el5 set to be updated ---> Package popt.x86_64 0:1.10.2.3-34.el5 set to be updated ---> Package procps.x86_64 0:3.2.7-26.el5 set to be updated ---> Package rpm.x86_64 0:4.4.2.3-34.el5 set to be updated ---> Package rpm-libs.x86_64 0:4.4.2.3-34.el5 set to be updated ---> Package rpm-python.x86_64 0:4.4.2.3-34.el5 set to be updated ---> Package scl-utils.x86_64 0:20120927-8.el5 set to be updated ---> Package selinux-policy.noarch 0:2.4.6-346.el5 set to be updated ---> Package selinux-policy-targeted.noarch 0:2.4.6-346.el5 set to be updated ---> Package sos.noarch 0:1.7-9.66.el5.centos set to be updated ---> Package spamassassin.x86_64 0:3.3.1-4.el5 set to be updated ---> Package sqlite.x86_64 0:3.3.6-7 set to be updated ---> Package sudo.x86_64 0:1.7.2p1-28.el5 set to be updated ---> Package tzdata.x86_64 0:2013i-2.el5 set to be updated ---> Package wpa_supplicant.x86_64 1:0.5.10-10.el5 set to be updated ---> Package xinetd.x86_64 2:2.3.14-20.el5_10 set to be updated --> Running transaction check ---> Package sqlite.i386 0:3.3.6-7 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================================ Package Arch Version Repository Size ============================================================================================ Installing: kernel x86_64 2.6.18-371.4.1.el5 updates 22 M Updating: aspell i386 12:0.60.3-13 base 946 k aspell x86_64 12:0.60.3-13 base 959 k autofs x86_64 1:5.0.1-0.rc2.183.el5 base 920 k bash x86_64 3.2-32.el5_9.1 base 1.8 M bind x86_64 30:9.3.6-20.P1.el5_8.6 base 989 k bind-chroot x86_64 30:9.3.6-20.P1.el5_8.6 base 47 k bind-libs x86_64 30:9.3.6-20.P1.el5_8.6 base 898 k bind-utils x86_64 30:9.3.6-20.P1.el5_8.6 base 180 k binutils x86_64 2.17.50.0.6-26.el5 base 2.9 M ccid x86_64 1.3.8-2.el5 base 150 k centos-release x86_64 10:5-10.el5.centos base 21 k centos-release-notes x86_64 5.10-0 base 40 k coolkey i386 1.1.0-16.1.el5 base 106 k coolkey x86_64 1.1.0-16.1.el5 base 108 k cpio x86_64 2.6-26.el5 base 123 k crash x86_64 5.1.8-2.el5.centos base 2.3 M cups-libs x86_64 1:1.3.7-30.el5_9.3 base 196 k curl x86_64 7.15.5-17.el5_9 base 232 k dbus x86_64 1.1.2-21.el5 base 235 k dbus-glib i386 0.73-11.el5_9 base 161 k dbus-glib x86_64 0.73-11.el5_9 base 163 k dbus-libs i386 1.1.2-21.el5 base 125 k dbus-libs x86_64 1.1.2-21.el5 base 124 k device-mapper-multipath x86_64 0.4.7-59.el5 base 3.0 M dhclient x86_64 12:3.0.5-33.el5_9 base 287 k dovecot x86_64 1.0.7-8.el5_9.1 base 1.7 M e2fsprogs x86_64 1.39-36.el5_9 base 845 k e2fsprogs-libs i386 1.39-36.el5_9 base 120 k e2fsprogs-libs x86_64 1.39-36.el5_9 base 120 k elinks x86_64 0.11.1-8.el5_9 base 1.0 M freetype x86_64 2.2.1-32.el5_9.1 base 312 k glibc i686 2.5-118.el5_10.2 updates 5.4 M glibc x86_64 2.5-118.el5_10.2 updates 4.8 M glibc-common x86_64 2.5-118.el5_10.2 updates 16 M gnome-vfs2 x86_64 2.16.2-12.el5_9 base 1.3 M gnupg x86_64 1.4.5-18.el5_10.1 updates 1.8 M gnutls x86_64 1.4.1-10.el5_9.2 base 365 k grub x86_64 0.97-13.11.el5_10.1 updates 885 k gtk2 x86_64 2.10.4-30.el5 base 6.6 M httpd x86_64 2.2.3-83.el5.centos updates 1.3 M httpd-manual x86_64 2.2.3-83.el5.centos updates 819 k hwdata noarch 0.213.28-3.el5 base 460 k hypervkvpd x86_64 0-0.7.el5_9.3 base 11 k initscripts x86_64 8.45.44-3.el5.centos base 1.6 M kpartx x86_64 0.4.7-59.el5 base 446 k krb5-libs i386 1.6.1-70.el5_9.2 base 669 k krb5-libs x86_64 1.6.1-70.el5_9.2 base 681 k krb5-workstation x86_64 1.6.1-70.el5_9.2 base 917 k ksh x86_64 20100621-18.el5 base 1.3 M libXfont x86_64 1.2.2-1.0.5.el5_10 updates 246 k libgcrypt i386 1.4.4-7.el5_10 updates 251 k libgcrypt x86_64 1.4.4-7.el5_10 updates 233 k libjpeg x86_64 6b-38 updates 138 k libtiff x86_64 3.8.2-19.el5_10 updates 316 k libxml2 x86_64 2.6.26-2.1.21.el5_9.3 base 811 k libxml2-python x86_64 2.6.26-2.1.21.el5_9.3 base 715 k lvm2 x86_64 2.02.88-12.el5 base 3.3 M man-pages-overrides noarch 5.10.2-1.el5 base 147 k microcode_ctl x86_64 2:1.17-5.el5 base 709 k mkinitrd i386 5.1.19.6-81.el5_10 updates 482 k mkinitrd x86_64 5.1.19.6-81.el5_10 updates 471 k mod_ssl x86_64 1:2.2.3-83.el5.centos updates 98 k module-init-tools x86_64 3.3-0.pre3.1.63.el5 base 446 k mysql x86_64 5.0.95-5.el5_9 base 4.9 M nash x86_64 5.1.19.6-81.el5_10 updates 1.1 M net-tools x86_64 1.60-83.el5_10 updates 368 k nfs-utils x86_64 1:1.0.9-70.el5 base 409 k nscd x86_64 2.5-118.el5_10.2 updates 177 k nspr i386 4.10.2-2.el5_10 updates 123 k nspr x86_64 4.10.2-2.el5_10 updates 122 k nss i386 3.15.3-4.el5_10 updates 1.2 M nss x86_64 3.15.3-4.el5_10 updates 1.3 M nss-tools x86_64 3.15.3-4.el5_10 updates 753 k nss_ldap i386 253-51.el5_9.1 base 1.4 M nss_ldap x86_64 253-51.el5_9.1 base 1.4 M openldap i386 2.3.43-27.el5_10 updates 298 k openldap x86_64 2.3.43-27.el5_10 updates 306 k openssl i686 0.9.8e-27.el5_10.1 updates 1.5 M openssl x86_64 0.9.8e-27.el5_10.1 updates 1.5 M pcre x86_64 6.6-9.el5 base 119 k perl x86_64 4:5.8.8-41.el5 base 12 M perl-IO-Socket-SSL noarch 1.01-2.el5 base 50 k php x86_64 5.1.6-43.el5_10 updates 2.4 M php-cli x86_64 5.1.6-43.el5_10 updates 2.2 M php-common x86_64 5.1.6-43.el5_10 updates 155 k php-ldap x86_64 5.1.6-43.el5_10 updates 39 k policycoreutils x86_64 1.33.12-14.13.el5 base 630 k popt x86_64 1.10.2.3-34.el5 base 79 k procps x86_64 3.2.7-26.el5 base 217 k rpm x86_64 4.4.2.3-34.el5 base 1.2 M rpm-libs x86_64 4.4.2.3-34.el5 base 926 k rpm-python x86_64 4.4.2.3-34.el5 base 65 k scl-utils x86_64 20120927-8.el5 base 11 k selinux-policy noarch 2.4.6-346.el5 base 433 k selinux-policy-targeted noarch 2.4.6-346.el5 base 1.3 M sos noarch 1.7-9.66.el5.centos base 165 k spamassassin x86_64 3.3.1-4.el5 base 1.1 M sqlite x86_64 3.3.6-7 base 207 k sudo x86_64 1.7.2p1-28.el5 base 364 k tzdata x86_64 2013i-2.el5 updates 772 k wpa_supplicant x86_64 1:0.5.10-10.el5 base 261 k xinetd x86_64 2:2.3.14-20.el5_10 updates 127 k Installing for dependencies: sqlite i386 3.3.6-7 base 213 k Transaction Summary ============================================================================================ Install 2 Package(s) Upgrade 102 Package(s) Total download size: 139 M Is this ok [y/N]: ... ... (103/104): glibc-common-2.5-118.el5_10.2.x86_64.rpm | 16 MB 00:08 (104/104): kernel-2.6.18-371.4.1.el5.x86_64.rpm | 22 MB 00:12 ----------------------------------------------------------------------------------------------- Total 1.8 MB/s | 139 MB 01:18 warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897 base/gpgkey | 1.5 kB 00:00 Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) " from /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Updating : centos-release-notes 1/208 Updating : tzdata 2/208 ... ... Cleanup : postgresql-libs 207/208 Cleanup : nspr 208/208 Dependency Installed: sqlite.i386 0:3.3.6-7 Updated: aspell.i386 12:0.60.3-13 aspell.x86_64 12:0.60.3-13 autofs.x86_64 1:5.0.1-0.rc2.183.el5 bash.x86_64 0:3.2-32.el5_9.1 bind.x86_64 30:9.3.6-20.P1.el5_8.6 bind-chroot.x86_64 30:9.3.6-20.P1.el5_8.6 bind-libs.x86_64 30:9.3.6-20.P1.el5_8.6 bind-utils.x86_64 30:9.3.6-20.P1.el5_8.6 binutils.x86_64 0:2.17.50.0.6-26.el5 ccid.x86_64 0:1.3.8-2.el5 centos-release.x86_64 10:5-10.el5.centos centos-release-notes.x86_64 0:5.10-0 coolkey.i386 0:1.1.0-16.1.el5 coolkey.x86_64 0:1.1.0-16.1.el5 cpio.x86_64 0:2.6-26.el5 crash.x86_64 0:5.1.8-2.el5.centos cups-libs.x86_64 1:1.3.7-30.el5_9.3 curl.x86_64 0:7.15.5-17.el5_9 dbus.x86_64 0:1.1.2-21.el5 dbus-glib.i386 0:0.73-11.el5_9 dbus-glib.x86_64 0:0.73-11.el5_9 dbus-libs.i386 0:1.1.2-21.el5 dbus-libs.x86_64 0:1.1.2-21.el5 device-mapper-multipath.x86_64 0:0.4.7-59.el5 dhclient.x86_64 12:3.0.5-33.el5_9 dovecot.x86_64 0:1.0.7-8.el5_9.1 e2fsprogs.x86_64 0:1.39-36.el5_9 e2fsprogs-libs.i386 0:1.39-36.el5_9 e2fsprogs-libs.x86_64 0:1.39-36.el5_9 elinks.x86_64 0:0.11.1-8.el5_9 freetype.x86_64 0:2.2.1-32.el5_9.1 glibc.i686 0:2.5-118.el5_10.2 glibc.x86_64 0:2.5-118.el5_10.2 glibc-common.x86_64 0:2.5-118.el5_10.2 gnome-vfs2.x86_64 0:2.16.2-12.el5_9 gnupg.x86_64 0:1.4.5-18.el5_10.1 gnutls.x86_64 0:1.4.1-14.el5_10 grub.x86_64 0:0.97-13.11.el5_10.1 gtk2.x86_64 0:2.10.4-30.el5 httpd.x86_64 0:2.2.3-83.el5.centos httpd-manual.x86_64 0:2.2.3-83.el5.centos hwdata.noarch 0:0.213.28-3.el5 hypervkvpd.x86_64 0:0-0.7.el5_9.3 initscripts.x86_64 0:8.45.44-3.el5.centos kpartx.x86_64 0:0.4.7-59.el5 krb5-libs.i386 0:1.6.1-70.el5_9.2 krb5-libs.x86_64 0:1.6.1-70.el5_9.2 krb5-workstation.x86_64 0:1.6.1-70.el5_9.2 ksh.x86_64 0:20100621-18.el5 libXfont.x86_64 0:1.2.2-1.0.5.el5_10 libgcrypt.i386 0:1.4.4-7.el5_10 libgcrypt.x86_64 0:1.4.4-7.el5_10 libjpeg.x86_64 0:6b-38 libtiff.x86_64 0:3.8.2-19.el5_10 libxml2.x86_64 0:2.6.26-2.1.21.el5_9.3 libxml2-python.x86_64 0:2.6.26-2.1.21.el5_9.3 lvm2.x86_64 0:2.02.88-12.el5 man-pages-overrides.noarch 0:5.10.2-1.el5 microcode_ctl.x86_64 2:1.17-5.el5 mkinitrd.i386 0:5.1.19.6-81.el5_10 mkinitrd.x86_64 0:5.1.19.6-81.el5_10 mod_ssl.x86_64 1:2.2.3-83.el5.centos module-init-tools.x86_64 0:3.3-0.pre3.1.63.el5 mysql.x86_64 0:5.0.95-5.el5_9 nash.x86_64 0:5.1.19.6-81.el5_10 net-tools.x86_64 0:1.60-83.el5_10 nfs-utils.x86_64 1:1.0.9-70.el5 nscd.x86_64 0:2.5-118.el5_10.2 nspr.i386 0:4.10.2-2.el5_10 nspr.x86_64 0:4.10.2-2.el5_10 nss.i386 0:3.15.3-4.el5_10 nss.x86_64 0:3.15.3-4.el5_10 nss-tools.x86_64 0:3.15.3-4.el5_10 nss_ldap.i386 0:253-51.el5_9.1 nss_ldap.x86_64 0:253-51.el5_9.1 openldap.i386 0:2.3.43-27.el5_10 openldap.x86_64 0:2.3.43-27.el5_10 openssl.i686 0:0.9.8e-27.el5_10.1 openssl.x86_64 0:0.9.8e-27.el5_10.1 pcre.x86_64 0:6.6-9.el5 perl.x86_64 4:5.8.8-41.el5 perl-IO-Socket-SSL.noarch 0:1.01-2.el5 php.x86_64 0:5.1.6-43.el5_10 php-cli.x86_64 0:5.1.6-43.el5_10 php-common.x86_64 0:5.1.6-43.el5_10 php-ldap.x86_64 0:5.1.6-43.el5_10 policycoreutils.x86_64 0:1.33.12-14.13.el5 popt.x86_64 0:1.10.2.3-34.el5 postgresql-libs.x86_64 0:8.1.23-10.el5_10 procps.x86_64 0:3.2.7-26.el5 rpm.x86_64 0:4.4.2.3-34.el5 rpm-libs.x86_64 0:4.4.2.3-34.el5 rpm-python.x86_64 0:4.4.2.3-34.el5 scl-utils.x86_64 0:20120927-8.el5 selinux-policy.noarch 0:2.4.6-346.el5 selinux-policy-targeted.noarch 0:2.4.6-346.el5 sos.noarch 0:1.7-9.66.el5.centos spamassassin.x86_64 0:3.3.1-4.el5 sqlite.x86_64 0:3.3.6-7 sudo.x86_64 0:1.7.2p1-28.el5 tzdata.x86_64 0:2013i-2.el5 wpa_supplicant.x86_64 1:0.5.10-10.el5 xinetd.x86_64 2:2.3.14-20.el5_10 Complete! [root@centos5x64 ~]# uname -r 2.6.18-348.el5 [root@centos5x64 ~]# cat /etc/redhat-release CentOS release 5.10 (Final)Kernel is still showing old version, so reboot here.
[root@centos5x64 ~]# uname -r 2.6.18-371.4.1.el5 [root@centos5x64 ~]#Two additional packages should be installed: xterm and xclock
xterm
yum install xterm
[root@centos5x64 ~]# yum install xterm Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: centos.fastbull.org * extras: centos.fastbull.org * updates: mirrors.prometeus.net Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package xterm.x86_64 0:215-8.el5_4.1 set to be updated --> Processing Dependency: libXaw.so.7()(64bit) for package: xterm --> Running transaction check ---> Package libXaw.x86_64 0:1.0.2-8.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================================= Package Arch Version Repository Size ================================================================================================= Installing: xterm x86_64 215-8.el5_4.1 base 410 k Installing for dependencies: libXaw x86_64 1.0.2-8.1 base 329 k Transaction Summary ================================================================================================= Install 2 Package(s) Upgrade 0 Package(s) Total download size: 739 k Is this ok [y/N]: y Downloading Packages: (1/2): libXaw-1.0.2-8.1.x86_64.rpm | 329 kB 00:00 (2/2): xterm-215-8.el5_4.1.x86_64.rpm | 410 kB 00:00 ------------------------------------------------------------------------------------------------- Total 346 kB/s | 739 kB 00:02 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : libXaw 1/2 Installing : xterm 2/2 Installed: xterm.x86_64 0:215-8.el5_4.1 Dependency Installed: libXaw.x86_64 0:1.0.2-8.1 Complete! [root@centos5x64 ~]#
xclock
yum install xclock
[root@centos5x64 ~]# yum install xclock Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.centos.plus.hr * extras: mirror.centos.plus.hr * updates: mirror.centos.plus.hr Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package xorg-x11-apps.x86_64 0:7.1-4.0.1.el5 set to be updated --> Processing Dependency: libxkbfile.so.1()(64bit) for package: xorg-x11-apps --> Running transaction check ---> Package libxkbfile.x86_64 0:1.0.3-3.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================ Package Arch Version Repository Size ============================================================================================================================================ Installing: xorg-x11-apps x86_64 7.1-4.0.1.el5 base 265 k Installing for dependencies: libxkbfile x86_64 1.0.3-3.1 base 73 k Transaction Summary ============================================================================================================================================ Install 2 Package(s) Upgrade 0 Package(s) Total download size: 338 k Is this ok [y/N]: y Downloading Packages: (1/2): libxkbfile-1.0.3-3.1.x86_64.rpm | 73 kB 00:00 (2/2): xorg-x11-apps-7.1-4.0.1.el5.x86_64.rpm | 265 kB 00:00 -------------------------------------------------------------------------------------------------------------------------------------------- Total 1.0 MB/s | 338 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : libxkbfile 1/2 Installing : xorg-x11-apps 2/2 Installed: xorg-x11-apps.x86_64 0:7.1-4.0.1.el5 Dependency Installed: libxkbfile.x86_64 0:1.0.3-3.1 Complete! [root@centos5x64 ~]#
VNC server
This step is not required at all, but I'll place here as good reference for mine next VNC installation...just to have in one place. For all other you may skip this step!yum install vnc-server
[root@centos5x64 ~]# yum install vnc-server Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.centos.plus.hr * extras: mirror.centos.plus.hr * updates: mirror.centos.plus.hr Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package vnc-server.x86_64 0:4.1.2-14.el5_6.6 set to be updated --> Processing Dependency: xorg-x11-fonts-base for package: vnc-server --> Processing Dependency: xorg-x11-xauth for package: vnc-server --> Processing Dependency: libXtst.so.6()(64bit) for package: vnc-server --> Running transaction check ---> Package libXtst.x86_64 0:1.0.1-3.1 set to be updated ---> Package xorg-x11-fonts-base.noarch 0:7.1-2.1.el5 set to be updated ---> Package xorg-x11-xauth.x86_64 1:1.0.1-2.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================================= Package Arch Version Repository Size ======================================================================================= Installing: vnc-server x86_64 4.1.2-14.el5_6.6 base 2.0 M Installing for dependencies: libXtst x86_64 1.0.1-3.1 base 16 k xorg-x11-fonts-base noarch 7.1-2.1.el5 base 3.7 M xorg-x11-xauth x86_64 1:1.0.1-2.1 base 32 k Transaction Summary ======================================================================================= Install 4 Package(s) Upgrade 0 Package(s) Total download size: 5.8 M Is this ok [y/N]: y Downloading Packages: (1/4): libXtst-1.0.1-3.1.x86_64.rpm | 16 kB 00:00 (2/4): xorg-x11-xauth-1.0.1-2.1.x86_64.rpm | 32 kB 00:00 (3/4): vnc-server-4.1.2-14.el5_6.6.x86_64.rpm | 2.0 MB 00:01 (4/4): xorg-x11-fonts-base-7.1-2.1.el5.noarch.rpm | 3.7 MB 00:04 -------------------------------------------------------------------------------------------- Total 823 kB/s | 5.8 MB 00:07 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : xorg-x11-xauth 1/4 Installing : libXtst 2/4 Installing : xorg-x11-fonts-base 3/4 Installing : vnc-server 4/4 Installed: vnc-server.x86_64 0:4.1.2-14.el5_6.6 Dependency Installed: libXtst.x86_64 0:1.0.1-3.1 xorg-x11-fonts-base.noarch 0:7.1-2.1.el5 xorg-x11-xauth.x86_64 1:1.0.1-2.1 Complete! [root@centos5x64 ~]#Install xorg-x11-server-Xorg package:
yum install xorg-x11-server-Xorg
[root@centos5x64 ~]# yum install xorg-x11-server-Xorg Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.centos.plus.hr * extras: mirror.centos.plus.hr * updates: mirror.centos.plus.hr Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package xorg-x11-server-Xorg.x86_64 0:1.1.1-48.101.0.1.el5.centos.2 set to be updated --> Processing Dependency: xorg-x11-server-utils >= 0.99.2-5 for package: xorg-x11-server-Xorg --> Processing Dependency: xorg-x11-utils for package: xorg-x11-server-Xorg --> Processing Dependency: xkbdata for package: xorg-x11-server-Xorg --> Processing Dependency: xorg-x11-drv-mouse for package: xorg-x11-server-Xorg --> Processing Dependency: xorg-x11-drv-keyboard for package: xorg-x11-server-Xorg --> Processing Dependency: xorg-x11-drv-vesa for package: xorg-x11-server-Xorg --> Processing Dependency: xkbcomp for package: xorg-x11-server-Xorg --> Processing Dependency: xorg-x11-drv-void for package: xorg-x11-server-Xorg --> Processing Dependency: xorg-x11-drv-evdev for package: xorg-x11-server-Xorg --> Running transaction check ---> Package xkeyboard-config.noarch 0:0.8-10.el5 set to be updated ---> Package xorg-x11-drv-evdev.x86_64 1:1.0.0.5-5.el5 set to be updated ---> Package xorg-x11-drv-keyboard.x86_64 0:1.1.0-3 set to be updated ---> Package xorg-x11-drv-mouse.x86_64 0:1.1.1-1.1 set to be updated ---> Package xorg-x11-drv-vesa.x86_64 0:1.3.0-8.3.el5 set to be updated ---> Package xorg-x11-drv-void.x86_64 0:1.1.0-3.1 set to be updated ---> Package xorg-x11-server-utils.x86_64 0:7.1-5.el5_6.2 set to be updated --> Processing Dependency: libXTrap.so.6()(64bit) for package: xorg-x11-server-utils --> Processing Dependency: libXxf86vm.so.1()(64bit) for package: xorg-x11-server-utils --> Processing Dependency: libXxf86misc.so.1()(64bit) for package: xorg-x11-server-utils --> Processing Dependency: libXfontcache.so.1()(64bit) for package: xorg-x11-server-utils ---> Package xorg-x11-utils.x86_64 0:7.1-2.fc6 set to be updated --> Processing Dependency: libGL.so.1()(64bit) for package: xorg-x11-utils --> Processing Dependency: libXv.so.1()(64bit) for package: xorg-x11-utils --> Processing Dependency: libdmx.so.1()(64bit) for package: xorg-x11-utils --> Processing Dependency: libXxf86dga.so.1()(64bit) for package: xorg-x11-utils ---> Package xorg-x11-xkb-utils.x86_64 0:1.0.2-2.1 set to be updated --> Processing Dependency: libxkbfile.so.1()(64bit) for package: xorg-x11-xkb-utils --> Running transaction check ---> Package libXTrap.x86_64 0:1.0.0-3.1 set to be updated ---> Package libXfontcache.x86_64 0:1.0.2-3.1 set to be updated ---> Package libXv.x86_64 0:1.0.1-4.1 set to be updated ---> Package libXxf86dga.x86_64 0:1.0.1-3.1 set to be updated ---> Package libXxf86misc.x86_64 0:1.0.1-3.1 set to be updated ---> Package libXxf86vm.x86_64 0:1.0.1-3.1 set to be updated ---> Package libdmx.x86_64 0:1.0.2-3.1 set to be updated ---> Package libxkbfile.x86_64 0:1.0.3-3.1 set to be updated ---> Package mesa-libGL.x86_64 0:6.5.1-7.11.el5_9 set to be updated --> Processing Dependency: libdrm.so.2()(64bit) for package: mesa-libGL --> Running transaction check ---> Package libdrm.x86_64 0:2.0.2-1.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================== Package Arch Version Repository Size ======================================================================================================== Installing: xorg-x11-server-Xorg x86_64 1.1.1-48.101.0.1.el5.centos.2 updates 3.4 M Installing for dependencies: libXTrap x86_64 1.0.0-3.1 base 23 k libXfontcache x86_64 1.0.2-3.1 base 9.7 k libXv x86_64 1.0.1-4.1 base 14 k libXxf86dga x86_64 1.0.1-3.1 base 16 k libXxf86misc x86_64 1.0.1-3.1 base 12 k libXxf86vm x86_64 1.0.1-3.1 base 14 k libdmx x86_64 1.0.2-3.1 base 13 k libdrm x86_64 2.0.2-1.1 base 19 k libxkbfile x86_64 1.0.3-3.1 base 73 k mesa-libGL x86_64 6.5.1-7.11.el5_9 base 8.7 M xkeyboard-config noarch 0.8-10.el5 base 321 k xorg-x11-drv-evdev x86_64 1:1.0.0.5-5.el5 base 10 k xorg-x11-drv-keyboard x86_64 1.1.0-3 base 14 k xorg-x11-drv-mouse x86_64 1.1.1-1.1 base 28 k xorg-x11-drv-vesa x86_64 1.3.0-8.3.el5 base 19 k xorg-x11-drv-void x86_64 1.1.0-3.1 base 7.6 k xorg-x11-server-utils x86_64 7.1-5.el5_6.2 base 172 k xorg-x11-utils x86_64 7.1-2.fc6 base 123 k xorg-x11-xkb-utils x86_64 1.0.2-2.1 base 183 k Transaction Summary ======================================================================================================== Install 20 Package(s) Upgrade 0 Package(s) Total download size: 13 M Is this ok [y/N]: y Downloading Packages: (1/20): xorg-x11-drv-void-1.1.0-3.1.x86_64.rpm | 7.6 kB 00:00 (2/20): libXfontcache-1.0.2-3.1.x86_64.rpm | 9.7 kB 00:00 (3/20): xorg-x11-drv-evdev-1.0.0.5-5.el5.x86_64.rpm | 10 kB 00:00 (4/20): libXxf86misc-1.0.1-3.1.x86_64.rpm | 12 kB 00:00 (5/20): libdmx-1.0.2-3.1.x86_64.rpm | 13 kB 00:00 (6/20): xorg-x11-drv-keyboard-1.1.0-3.x86_64.rpm | 14 kB 00:00 (7/20): libXv-1.0.1-4.1.x86_64.rpm | 14 kB 00:00 (8/20): libXxf86vm-1.0.1-3.1.x86_64.rpm | 14 kB 00:00 (9/20): libXxf86dga-1.0.1-3.1.x86_64.rpm | 16 kB 00:00 (10/20): libdrm-2.0.2-1.1.x86_64.rpm | 19 kB 00:00 (11/20): xorg-x11-drv-vesa-1.3.0-8.3.el5.x86_64.rpm | 19 kB 00:00 (12/20): libXTrap-1.0.0-3.1.x86_64.rpm | 23 kB 00:00 (13/20): xorg-x11-drv-mouse-1.1.1-1.1.x86_64.rpm | 28 kB 00:00 (14/20): libxkbfile-1.0.3-3.1.x86_64.rpm | 73 kB 00:00 (15/20): xorg-x11-utils-7.1-2.fc6.x86_64.rpm | 123 kB 00:00 (16/20): xorg-x11-server-utils-7.1-5.el5_6.2.x86_64.rpm | 172 kB 00:00 (17/20): xorg-x11-xkb-utils-1.0.2-2.1.x86_64.rpm | 183 kB 00:00 (18/20): xkeyboard-config-0.8-10.el5.noarch.rpm | 321 kB 00:00 (19/20): xorg-x11-server-Xorg-1.1.1-48.101.0.1.el5.centos.2.x86_64.rpm | 3.4 MB 00:01 (20/20): mesa-libGL-6.5.1-7.11.el5_9.x86_64.rpm | 8.7 MB 00:03 ------------------------------------------------------------------------------------------------------------ Total 1.3 MB/s | 13 MB 00:10 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : libXxf86vm 1/20 Installing : libXxf86misc 2/20 Installing : libXfontcache 3/20 Installing : libdrm 4/20 Installing : mesa-libGL 5/20 Installing : libXTrap 6/20 Installing : xorg-x11-server-utils 7/20 Installing : libXv 8/20 Installing : libxkbfile 9/20 Installing : xorg-x11-xkb-utils 10/20 Installing : libdmx 11/20 Installing : libXxf86dga 12/20 Installing : xorg-x11-utils 13/20 Installing : xkeyboard-config 14/20 Installing : xorg-x11-drv-evdev 15/20 Installing : xorg-x11-drv-void 16/20 Installing : xorg-x11-drv-keyboard 17/20 Installing : xorg-x11-drv-mouse 18/20 Installing : xorg-x11-server-Xorg 19/20 Installing : xorg-x11-drv-vesa 20/20 Installed: xorg-x11-server-Xorg.x86_64 0:1.1.1-48.101.0.1.el5.centos.2 Dependency Installed: libXTrap.x86_64 0:1.0.0-3.1 libXfontcache.x86_64 0:1.0.2-3.1 libXv.x86_64 0:1.0.1-4.1 libXxf86dga.x86_64 0:1.0.1-3.1 libXxf86misc.x86_64 0:1.0.1-3.1 libXxf86vm.x86_64 0:1.0.1-3.1 libdmx.x86_64 0:1.0.2-3.1 libdrm.x86_64 0:2.0.2-1.1 libxkbfile.x86_64 0:1.0.3-3.1 mesa-libGL.x86_64 0:6.5.1-7.11.el5_9 xkeyboard-config.noarch 0:0.8-10.el5 xorg-x11-drv-evdev.x86_64 1:1.0.0.5-5.el5 xorg-x11-drv-keyboard.x86_64 0:1.1.0-3 xorg-x11-drv-mouse.x86_64 0:1.1.1-1.1 xorg-x11-drv-vesa.x86_64 0:1.3.0-8.3.el5 xorg-x11-drv-void.x86_64 0:1.1.0-3.1 xorg-x11-server-utils.x86_64 0:7.1-5.el5_6.2 xorg-x11-utils.x86_64 0:7.1-2.fc6 xorg-x11-xkb-utils.x86_64 0:1.0.2-2.1 Complete! [root@centos5x64 ~]#Create two VNC user accounts. One for root and one oracle by adding content to /etc/sysconfig/vncservers file
VNCSERVERS="1:root 2:oracle" VNCSERVERARGS[1]="-geometry 1024x768" VNCSERVERARGS[2]="-geometry 800x600"by executing:
cp -p /etc/sysconfig/vncservers /etc/sysconfig/vncservers_org echo 'VNCSERVERS="1:root 2:oracle"' >> /etc/sysconfig/vncservers echo 'VNCSERVERARGS[1]="-geometry 1024x768"' >> /etc/sysconfig/vncservers echo 'VNCSERVERARGS[2]="-geometry 800x600"' >> /etc/sysconfig/vncservers tail -3 /etc/sysconfig/vncservers
[root@centos5x64 ~]# cp -p /etc/sysconfig/vncservers /etc/sysconfig/vncservers_org [root@centos5x64 ~]# echo 'VNCSERVERS="1:root 2:oracle"' >> /etc/sysconfig/vncservers [root@centos5x64 ~]# echo 'VNCSERVERARGS[1]="-geometry 1024x768"' >> /etc/sysconfig/vncservers [root@centos5x64 ~]# echo 'VNCSERVERARGS[2]="-geometry 800x600"' >> /etc/sysconfig/vncservers [root@centos5x64 ~]# tail -3 /etc/sysconfig/vncservers VNCSERVERS="1:root 2:oracle" VNCSERVERARGS[1]="-geometry 1024x768" VNCSERVERARGS[2]="-geometry 800x600" [root@centos5x64 ~]#This would allow root to connect to "port:1" and oracle to "port:2". Root will have 1024x768, while oracle will have 800x600 resolution, which you may modify by your need. Set vnc passwords for each user (root and oracle) by logged in as that user
vncpasswd
[root@centos5x64 ~]# vncpasswd Password: Password must be at least 6 characters - try again Password: Verify: [root@centos5x64 ~]# su - oracle [oracle@centos5x64 ~]$ vncpasswd Password: Verify: [oracle@centos5x64 ~]$As root, check vncserver service:
/sbin/service vncserver start /sbin/service vncserver status /sbin/service vncserver stop
[root@centos5x64 ~]# /sbin/service vncserver start Starting VNC server: 1:root xauth: creating new authority file /root/.Xauthority New 'centos5x64.localdomain:1 (root)' desktop is centos5x64.localdomain:1 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/centos5x64.localdomain:1.log 2:oracle xauth: creating new authority file /home/oracle/.Xauthority New 'centos5x64.localdomain:2 (oracle)' desktop is centos5x64.localdomain:2 Creating default startup script /home/oracle/.vnc/xstartup Starting applications specified in /home/oracle/.vnc/xstartup Log file is /home/oracle/.vnc/centos5x64.localdomain:2.log [ OK ] [root@centos5x64 ~]# /sbin/service vncserver status Xvnc (pid 10731 10688) is running... [root@centos5x64 ~]# /sbin/service vncserver stop Shutting down VNC server: 1:root 2:oracle [ OK ]If you want to startup vnc server automatically (what I do not suggest until you use EBS or some kind of software that need VNC all the time), execute:
/sbin/chkconfig vncserver onTo see ports where vnc run execute:
netstat -tulp | grep vnc
[root@centos5x64 ~]# netstat -tulp | grep vnc tcp 0 0 *:5801 *:* LISTEN 10688/Xvnc tcp 0 0 *:5802 *:* LISTEN 10731/Xvnc tcp 0 0 *:5901 *:* LISTEN 10688/Xvnc tcp 0 0 *:5902 *:* LISTEN 10731/Xvnc tcp 0 0 *:6001 *:* LISTEN 10688/Xvnc tcp 0 0 *:6002 *:* LISTEN 10731/Xvnc tcp 0 0 *:6001 *:* LISTEN 10688/Xvnc tcp 0 0 *:6002 *:* LISTEN 10731/XvncEdit ~/.vnc/xstartup for each user. Over right content with this part for each vnc user
#!/bin/sh # Add the following line to ensure you always have an xterm available. ( while true ; do xterm ; done ) & # 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 &start again vnc server
[root@centos5x64 .vnc]# /sbin/service vncserver start Starting VNC server: 1:root New 'centos5x64.localdomain:1 (root)' desktop is centos5x64.localdomain:1 Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/centos5x64.localdomain:1.log 2:oracle New 'centos5x64.localdomain:2 (oracle)' desktop is centos5x64.localdomain:2 Starting applications specified in /home/oracle/.vnc/xstartup Log file is /home/oracle/.vnc/centos5x64.localdomain:2.log [ OK ] [root@centos5x64 .vnc]#As you see both vnc ports are set automatically.
Check log for any errors tha may arise. Correct one for oracle should looks like:
Xvnc Free Edition 4.1.2 Copyright (C) 2002-2005 RealVNC Ltd. See http://www.realvnc.com for information on VNC. Underlying X server release 70101000, The X.Org Foundation Thu Mar 6 23:33:30 2014 vncext: VNC extension running! vncext: Listening for VNC connections on port 5902 vncext: Listening for HTTP connections on port 5802 vncext: created VNC server for screen 0 /home/oracle/.vnc/centos5x64.localdomain:2.log (END)Test that vnc is accessable outside from putty. First start again vnc as root:
/sbin/service vncserver startAnd from WEB browser (with a java enabled browser) call next URL:
root http://192.168.254.132:5801 or http://centos5x64.localdomain:5801 oracle http://192.168.254.132:5802 or http://centos5x64.localdomain:5802As you see, beauty of new VNC package is that WEB based connection is possible. This is why I love them regardless many security "issues" that this package may arise (issues which are not confirmed in praxis but people just do not like that package-and nothing more).
Install VMware tools
If not shown in VMware status line (through buttons), choose menu "VM|Install VMware Tools..." and then continue from terminal (putty).mkdir /mnt/cdrom mount /dev/cdrom /mnt/cdrom cd /tmp #tar -xvf /mnt/cdrom/VMwareTools-9.6.0-1294478.tar.gz tar -xvf /mnt/cdrom/VMwareTools*.tar.gz cd VMware-tools-distrib/ ./VMware-install.plOn every single ask respond with Enter. Here is log of such a install
[root@centos5x64 ~]# mkdir /mnt/cdrom [root@centos5x64 ~]# mount /dev/cdrom /mnt/cdrom mount: block device /dev/cdrom is write-protected, mounting read-only [root@centos5x64 ~]# cd /tmp [root@centos5x64 tmp]# tar -xvf /mnt/cdrom/VMwareTools*.tar.gz VMware-tools-distrib/ VMware-tools-distrib/VMware-install.pl VMware-tools-distrib/lib/ VMware-tools-distrib/lib/lib32/ VMware-tools-distrib/lib/lib32/libcairo.so.2/ VMware-tools-distrib/lib/lib32/libcairo.so.2/libcairo.so.2 ... ... ... VMware-tools-distrib/bin/vm-support VMware-tools-distrib/FILES VMware-tools-distrib/doc/ VMware-tools-distrib/doc/open_source_licenses.txt VMware-tools-distrib/doc/INSTALL VMware-tools-distrib/doc/README [root@centos5x64 tmp]# cd VMware-tools-distrib/ [root@centos5x64 VMware-tools-distrib]# ./VMware-install.pl A previous installation of VMware Tools has been detected. The previous installation was made by the tar installer (version 4). Keeping the tar4 installer database format. You have a version of VMware Tools installed. Continuing this install will first uninstall the currently installed version. Do you wish to continue? (yes/no) [yes] Uninstalling the tar installation of VMware Tools. Stopping services for VMware Tools Stopping VMware Tools services in the virtual machine: Guest operating system daemon: [ OK ] VMware User Agent (VMware-user): [ OK ] Blocking file system: [ OK ] Unmounting HGFS shares: [ OK ] Guest filesystem driver: [ OK ] Guest memory manager: [ OK ] VM communication interface socket family: [ OK ] VM communication interface: [ OK ] Stopping Thinprint services in the virtual machine: Stopping Virtual Printing daemon: done The removal of VMware Tools 9.6.0 build-1294478 for Linux completed successfully. Installing VMware Tools. In which directory do you want to install the binary files? [/usr/bin] What is the directory that contains the init directories (rc0.d/ to rc6.d/)? [/etc/rc.d] What is the directory that contains the init scripts? [/etc/rc.d/init.d] In which directory do you want to install the daemon files? [/usr/sbin] In which directory do you want to install the library files? [/usr/lib/VMware-tools] The path "/usr/lib/VMware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] In which directory do you want to install the documentation files? [/usr/share/doc/VMware-tools] The path "/usr/share/doc/VMware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] The installation of VMware Tools 9.6.0 build-1294478 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/VMware-uninstall-tools.pl". Before running VMware Tools for the first time, you need to configure it by invoking the following command: "/usr/bin/VMware-config-tools.pl". Do you want this program to invoke the command for you now? [yes] Initializing... Making sure services for VMware Tools are stopped. Stopping Thinprint services in the virtual machine: Stopping Virtual Printing daemon: done Stopping VMware Tools services in the virtual machine: Guest operating system daemon: [ OK ] VMware User Agent (VMware-user): [ OK ] Blocking file system: [ OK ] Unmounting HGFS shares: [ OK ] Guest filesystem driver: [ OK ] Guest memory manager: [ OK ] VM communication interface socket family: [ OK ] VM communication interface: [ OK ] The VMware FileSystem Sync Driver (vmsync) allows external third-party backup software that is integrated with vSphere to create backups of the virtual machine. Do you wish to enable this feature? [no] Found a compatible pre-built module for vmci. Installing it... Found a compatible pre-built module for vsock. Installing it... Found a compatible pre-built module for vmxnet3. Installing it... Found a compatible pre-built module for pvscsi. Installing it... Found a compatible pre-built module for vmmemctl. Installing it... The VMware Host-Guest Filesystem allows for shared folders between the host OS and the guest OS in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [yes] Found a compatible pre-built module for vmhgfs. Installing it... Found a compatible pre-built module for vmxnet. Installing it... The vmblock enables dragging or copying files between host and guest in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [yes] Found a compatible pre-built module for vmblock. Installing it... VMware automatic kernel modules enables automatic building and installation of VMware kernel modules at boot that are not already present. This feature can be enabled/disabled by re-running VMware-config-tools.pl. Would you like to enable VMware automatic kernel modules? [no] No X install found. Creating a new initrd boot image for the kernel. Starting Virtual Printing daemon: done Checking acpi hot plug [ OK ] Starting VMware Tools services in the virtual machine: Switching to guest configuration: [ OK ] Paravirtual SCSI module: [ OK ] Guest memory manager: [ OK ] VM communication interface: [ OK ] VM communication interface socket family: [ OK ] Guest filesystem driver: [ OK ] Mounting HGFS shares: [ OK ] Blocking file system: [ OK ] Guest operating system daemon: [ OK ] The configuration of VMware Tools 9.6.0 build-1294478 for Linux for this running kernel completed successfully. You must restart your X session before any mouse or graphics changes take effect. You can now run VMware Tools by invoking "/usr/bin/VMware-toolbox-cmd" from the command line. To enable advanced X features (e.g., guest resolution fit, drag and drop, and file and text copy/paste), you will need to do one (or more) of the following: 1. Manually start /usr/bin/VMware-user 2. Log out and log back into your desktop session; and, 3. Restart your X session. Enjoy, --the VMware team Found VMware Tools CDROM mounted at /mnt/cdrom. Ejecting device /dev/cdrom ... [root@centos5x64 VMware-tools-distrib]#
Timezone
VMware image comes with predefined TZ for America, so I have to change it to Croatia.Check date (run in 19:55):
[root@centos5x64 ~]# date Mon Mar 3 14:55:46 EST 2014Time seems to be OK but have to change timezone.
[root@centos5x64 ~]# mv /etc/localtime /etc/localtime_org [root@centos5x64 ~]# ln -s /usr/share/zoneinfo/Europe/Zagreb /etc/localtime [root@centos5x64 ~]# date Mon Mar 3 19:57:23 UTC 2014 [root@centos5x64 ~]#If have to additionally change date then read more here.
Oracle part
Now it's time to implement Oracle based part of installationOracle required packages
This is OK moment to add Oracle required RPMs. You may add them later (when Installer check them and tell you missing one) but if you know it's better to add them now.yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh
[root@centos5x64 ~]# yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh ... Installed: compat-libstdc++-33.i386 0:3.2.3-61 compat-libstdc++-33.x86_64 0:3.2.3-61 elfutils-libelf.i386 0:0.137-3.el5 elfutils-libelf-devel.i386 0:0.137-3.el5 elfutils-libelf-devel.x86_64 0:0.137-3.el5 gcc.x86_64 0:4.1.2-54.el5 gcc-c++.x86_64 0:4.1.2-54.el5 glibc-devel.i386 0:2.5-118.el5_10.2 glibc-devel.x86_64 0:2.5-118.el5_10.2 libaio-devel.i386 0:0.3.106-5 libaio-devel.x86_64 0:0.3.106-5 libstdc++-devel.i386 0:4.1.2-54.el5 libstdc++-devel.x86_64 0:4.1.2-54.el5 pdksh.x86_64 0:5.2.14-37.el5_8.1 sysstat.x86_64 0:7.0.2-12.el5 unixODBC.i386 0:2.2.11-10.el5 unixODBC.x86_64 0:2.2.11-10.el5 unixODBC-devel.i386 0:2.2.11-10.el5 unixODBC-devel.x86_64 0:2.2.11-10.el5 Dependency Installed: cpp.x86_64 0:4.1.2-54.el5 elfutils-libelf-devel-static.i386 0:0.137-3.el5 elfutils-libelf-devel-static.x86_64 0:0.137-3.el5 glibc-headers.x86_64 0:2.5-118.el5_10.2 kernel-headers.x86_64 0:2.6.18-371.4.1.el5 unixODBC-libs.i386 0:2.2.11-10.el5 unixODBC-libs.x86_64 0:2.2.11-10.el5 Complete! [root@centos5x64 ~]#Other method (using Oracle public yum) is not recommended because you'll damage your CentOS distro!
Be aware that all youm updates may be queried by command or through log:
less /var/log/yum.logor by executing yum command
yum list installed xxx
[root@centos5x64 ~]# yum list installed libaio Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirrors.paknet.org * extras: mirrors.paknet.org * updates: mirrors.paknet.org Installed Packages libaio.i386 0.3.106-5 installed libaio.x86_64 0.3.106-5 installed [root@centos5x64 ~]#
Configure the kernel
We need to configure the CentOS 5.10 Linux kernel to support Oracle 11gR1 11.1.0.7.kernel.shmall = physical RAM size / pagesize For most systems, this will be the value 2097152. See Note 301830.1 for more information. kernel.shmmax = 1/2 of physical RAM. This would be the value 2147483648 for a system with 4Gb of physical RAM. See Note 567506.1 for more information. kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 512 x processes (for example 65536 for 128 processes) Development recommends a minimum of 327679 for active systems. net.ipv4.ip_local_port_range = 9000 65500 @per Bug 7507772 The runInstaller (OUI) checks may expect this to be the old guidance of 1024 65000 . The new guidance from Oracle development is 9000 65500 . Please allow the runInstaller (OUI) to proceed with the new guidance from Oracle development.net.core.rmem_default = 262144 net.core.rmem_default=262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576Edit /etc/sysctl.conf and add following lines:
cp -p /etc/sysctl.conf /etc/sysctl.conf_org vi /etc/sysctl.confIn mine system that means write these values.
kernel.shmall = 2097152 #edit value that exist in file kernel.shmmax = 2147483648 #edit value that exist in fileAdd these values at the end:
# added for Oracle 11.2 (haven't found for 11.1!)kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 6815744 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576to apply the new settings (commit the changes):
sysctl -p
[root@centos5x64 ~]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 2147483648 kernel.shmall = 2097152 kernel.sem = 250 32000 100 128 fs.file-max = 6815744 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 [root@centos5x64 ~]#Keep in mind that changing kernel parameters has vital role in life of healthy server and Oracle components.
Edit the /etc/pam.d/login file and add following part
session required pam_limits.so
cp -p /etc/pam.d/login /etc/pam.d/login_org echo '#Oracle 11' >> /etc/pam.d/login echo 'session required pam_limits.so' >> /etc/pam.d/login tail -2 /etc/pam.d/login
[root@centos5x64 ~]# cp -p /etc/pam.d/login /etc/pam.d/login_org [root@centos5x64 ~]# echo '#Oracle 11' >> /etc/pam.d/login [root@centos5x64 ~]# echo 'session required pam_limits.so' >> /etc/pam.d/login [root@centos5x64 ~]# tail -2 /etc/pam.d/login #Oracle 11 session required pam_limits.so [root@centos5x64 ~]#Edit the /etc/security/limits.conf file and add following lines:
# added for Oracle 11. oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
cp -p /etc/security/limits.conf /etc/security/limits.conf_org echo '# added for Oracle 11.' >> /etc/security/limits.conf_org echo 'oracle soft nproc 2047' >> /etc/security/limits.conf echo 'oracle hard nproc 16384' >> /etc/security/limits.conf echo 'oracle soft nofile 1024' >> /etc/security/limits.conf echo 'oracle hard nofile 65536' >> /etc/security/limits.conf tail -10 /etc/security/limits.conf
[root@centos5x64 ~]# cp -p /etc/security/limits.conf /etc/security/limits.conf_org [root@centos5x64 ~]# echo '# added for Oracle 11.' >> /etc/security/limits.conf_org [root@centos5x64 ~]# echo 'oracle soft nproc 2047' >> /etc/security/limits.conf [root@centos5x64 ~]# echo 'oracle hard nproc 16384' >> /etc/security/limits.conf [root@centos5x64 ~]# echo 'oracle soft nofile 1024' >> /etc/security/limits.conf [root@centos5x64 ~]# echo 'oracle hard nofile 65536' >> /etc/security/limits.conf [root@centos5x64 ~]# tail -10 /etc/security/limits.conf #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #@student - maxlogins 4 # End of file oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 [root@centos5x64 ~]#
Create oracle user
groupadd dba groupadd oinstall useradd -g oinstall -G dba oracle
[root@centos5x64 ~]# groupadd dba [root@centos5x64 ~]# groupadd oinstall [root@centos5x64 ~]# useradd -g oinstall -G dba oracle [root@centos5x64 ~]#Regardless this may not be by Oracle security policy, I use only two groups and one oracle owner software.
Set the password for the oracle user.
passwd oracle
[root@centos5x64 ~]# passwd oracle Changing password for user oracle. New UNIX password: BAD PASSWORD: it is WAY too short Retype new UNIX password: passwd: all authentication tokens updated successfully.Now we can log into our new oracle account and configure the bash profile with adding content:
TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=`hostname`; export ORACLE_HOSTNAME ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fithese are statements:
su oracle cd ls -la cp -p .bash_profile .bash_profile_org echo 'TMP=/tmp; export TMP' >> .bash_profile echo 'TMPDIR=$TMP; export TMPDIR' >> .bash_profile echo 'ORACLE_HOSTNAME=`hostname`; export ORACLE_HOSTNAME' >> .bash_profile echo 'ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE' >> .bash_profile echo 'ORACLE_TERM=xterm; export ORACLE_TERM' >> .bash_profile echo 'PATH=/usr/sbin:$PATH; export PATH' >> .bash_profile echo '' >> .bash_profile echo 'umask 022' >> .bash_profile echo 'if [ $USER = "oracle" ]; then' >> .bash_profile echo ' if [ $SHELL = "/bin/ksh" ]; then' >> .bash_profile echo ' ulimit -p 16384' >> .bash_profile echo ' ulimit -n 65536' >> .bash_profile echo ' else' >> .bash_profile echo ' ulimit -u 16384 -n 65536' >> .bash_profile echo ' fi' >> .bash_profile echo 'fi' >> .bash_profile echo 'umask 0022' >> .bash_profile tail -18 .bash_profile
[oracle@centos5x64 ~]$ echo 'TMP=/tmp; export TMP' >> .bash_profile [oracle@centos5x64 ~]$ echo 'TMPDIR=$TMP; export TMPDIR' >> .bash_profile [oracle@centos5x64 ~]$ echo 'ORACLE_HOSTNAME=`hostname`; export ORACLE_HOSTNAME' >> .bash_profile [oracle@centos5x64 ~]$ echo 'ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE' >> .bash_profile [oracle@centos5x64 ~]$ echo 'ORACLE_TERM=xterm; export ORACLE_TERM' >> .bash_profile [oracle@centos5x64 ~]$ echo 'PATH=/usr/sbin:$PATH; export PATH' >> .bash_profile [oracle@centos5x64 ~]$ echo '' >> .bash_profile [oracle@centos5x64 ~]$ echo 'if [ $USER = "oracle" ]; then' >> .bash_profile [oracle@centos5x64 ~]$ echo ' if [ $SHELL = "/bin/ksh" ]; then' >> .bash_profile [oracle@centos5x64 ~]$ echo ' ulimit -p 16384' >> .bash_profile [oracle@centos5x64 ~]$ echo ' ulimit -n 65536' >> .bash_profile [oracle@centos5x64 ~]$ echo ' else' >> .bash_profile [oracle@centos5x64 ~]$ echo ' ulimit -u 16384 -n 65536' >> .bash_profile [oracle@centos5x64 ~]$ echo ' fi' >> .bash_profile [oracle@centos5x64 ~]$ echo 'fi' >> .bash_profile [oracle@centos5x64 ~]$ tail -18 .bash_profile PATH=$PATH:$HOME/bin export PATH TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=`hostname`; export ORACLE_HOSTNAME ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi [oracle@centos5x64 ~]$
Displaying remote X clients
Fo that I use mine Windows Cygwin installation which doesn't require any server part of installation. This kind of clients X method is officially supported by Oracle, example for Oracle® Enterprise Manager Cloud Control Basic Installation Guide. For others who desn't have Cygwin, you may use vnc-server free solution, server side solution, which is described hereHowever it is not needed, I'd like to install several packages, which will help me testing remote X client.
yum install xterm xclock libXtst.x86_64 xorg-x11-xauth.x86_64 xorg-x11-fonts-base.noarch
[root@centos5x64 ~]# yum install xterm xclock libXtst.x86_64 xorg-x11-xauth.x86_64 xorg-x11-fonts-base.noarch Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.centos.plus.hr * extras: mirror.centos.plus.hr * updates: mirror.centos.plus.hr Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package libXtst.x86_64 0:1.0.1-3.1 set to be updated ---> Package xorg-x11-apps.x86_64 0:7.1-4.0.1.el5 set to be updated --> Processing Dependency: libxkbfile.so.1()(64bit) for package: xorg-x11-apps --> Processing Dependency: libXaw.so.7()(64bit) for package: xorg-x11-apps ---> Package xorg-x11-fonts-base.noarch 0:7.1-2.1.el5 set to be updated ---> Package xorg-x11-xauth.x86_64 1:1.0.1-2.1 set to be updated ---> Package xterm.x86_64 0:215-8.el5_4.1 set to be updated --> Running transaction check ---> Package libXaw.x86_64 0:1.0.2-8.1 set to be updated ---> Package libxkbfile.x86_64 0:1.0.3-3.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================= Package Arch Version Repository Size ======================================================================================================= Installing: libXtst x86_64 1.0.1-3.1 base 16 k xorg-x11-apps x86_64 7.1-4.0.1.el5 base 265 k xorg-x11-fonts-base noarch 7.1-2.1.el5 base 3.7 M xorg-x11-xauth x86_64 1:1.0.1-2.1 base 32 k xterm x86_64 215-8.el5_4.1 base 410 k Installing for dependencies: libXaw x86_64 1.0.2-8.1 base 329 k libxkbfile x86_64 1.0.3-3.1 base 73 k Transaction Summary ======================================================================================================= Install 7 Package(s) Upgrade 0 Package(s) Total download size: 4.8 M Is this ok [y/N]: y Downloading Packages: (1/7): libXtst-1.0.1-3.1.x86_64.rpm | 16 kB 00:00 (2/7): xorg-x11-xauth-1.0.1-2.1.x86_64.rpm | 32 kB 00:00 (3/7): libxkbfile-1.0.3-3.1.x86_64.rpm | 73 kB 00:00 (4/7): xorg-x11-apps-7.1-4.0.1.el5.x86_64.rpm | 265 kB 00:00 (5/7): libXaw-1.0.2-8.1.x86_64.rpm | 329 kB 00:00 (6/7): xterm-215-8.el5_4.1.x86_64.rpm | 410 kB 00:00 (7/7): xorg-x11-fonts-base-7.1-2.1.el5.noarch.rpm | 3.7 MB 00:01 ------------------------------------------------------------------------------------------------------- Total 1.7 MB/s | 4.8 MB 00:02 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : libXaw 1/7 Installing : libxkbfile 2/7 Installing : xorg-x11-apps 3/7 Installing : xorg-x11-xauth 4/7 Installing : libXtst 5/7 Installing : xorg-x11-fonts-base 6/7 Installing : xterm 7/7 Installed: libXtst.x86_64 0:1.0.1-3.1 xorg-x11-apps.x86_64 0:7.1-4.0.1.el5 xorg-x11-fonts-base.noarch 0:7.1-2.1.el5 xorg-x11-xauth.x86_64 1:1.0.1-2.1 xterm.x86_64 0:215-8.el5_4.1 Dependency Installed: libXaw.x86_64 0:1.0.2-8.1 libxkbfile.x86_64 0:1.0.3-3.1 Complete! [root@centos5x64 ~]#
Testing remote X is working
Launch Cygwin and startstartxwin
DamirV@PCDAMIR ~ $ startxwin Welcome to the XWin X Server Vendor: The Cygwin/X Project Release: 1.15.0.0 OS: CYGWIN_NT-6.1 PCDAMIR 1.7.28(0.271/5/3) 2014-02-09 21:06 x86_64 OS: Windows Server 2008 R2 Service Pack 1 [Windows NT 6.1 build 7601](Win64) Package: version 1.15.0-3 built 2014-02-25 XWin was started with the following command line: X :0 -multiwindow Initializing built-in extension Generic Event Extension Initializing built-in extension SHAPE Initializing built-in extension MIT-SHM Initializing built-in extension XInputExtension Initializing built-in extension XTEST Initializing built-in extension BIG-REQUESTS Initializing built-in extension SYNC Initializing built-in extension XKEYBOARD Initializing built-in extension XC-MISC Initializing built-in extension XINERAMA Initializing built-in extension XFIXES Initializing built-in extension XFree86-Bigfont Initializing built-in extension RENDER Initializing built-in extension RANDR Initializing built-in extension COMPOSITE Initializing built-in extension DAMAGE Initializing built-in extension MIT-SCREEN-SAVER Initializing built-in extension DOUBLE-BUFFER Initializing built-in extension RECORD Initializing built-in extension DPMS Initializing built-in extension Present Initializing built-in extension X-Resource Initializing built-in extension GLX (II) xorg.conf is not supported (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information LoadPreferences: /home/DamirV/.XWinrc not found LoadPreferences: Loading /etc/X11/system.XWinrc LoadPreferences: Done parsing the configuration file... winDetectSupportedEngines - DirectDraw installed, allowing ShadowDD winDetectSupportedEngines - Windows NT, allowing PrimaryDD winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL winDetectSupportedEngines - Returning, supported engines 0000001f winSetEngine - Multi Window or Rootless => ShadowGDI winScreenInit - Using Windows display depth of 32 bits per pixel winAllocateFBShadowGDI - Creating DIB with width: 3360 height: 1080 depth: 32 winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32 winInitMultiWindowWM - Calling pthread_mutex_lock () winMultiWindowXMsgProc - Calling pthread_mutex_lock () MIT-SHM extension disabled due to lack of kernel support XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel glWinSelectGLimplementation: Loaded 'cygnativeGLthunk.dll' GL_VERSION: 3.3.0 GL_VENDOR: NVIDIA Corporation GL_RENDERER: Quadro FX 880M/PCIe/SSE2 (II) AIGLX: enabled GLX_SGI_make_current_read (II) AIGLX: enabled GLX_MESA_copy_sub_buffer (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control (II) AIGLX: enabled GLX_SGIX_pbuffer (II) AIGLX: enabled GLX_ARB_multisample and GLX_SGIS_multisample (II) 849 pixel formats reported by wglGetPixelFormatAttribivARB (II) AIGLX: Set GLX version to 1.4 (II) 687 fbConfigs (II) GLX: Initialized Win32 native WGL GL provider for screen 0 [dix] Could not init font path element /usr/share/fonts/TTF/, removing from list! [dix] Could not init font path element /usr/share/fonts/OTF/, removing from list! [dix] Could not init font path element /usr/share/fonts/Type1/, removing from list! winPointerWarpCursor - Discarding first warp: 1680 540 (--) 16 mouse buttons found (--) Setting autorepeat to delay=250, rate=31 (--) Windows keyboard layout: "0000041A" (0000041a) "Croatian", type 4 (--) Found matching XKB configuration "Croatian" (--) Model = "pc105" Layout = "hr" Variant = "none" Options = "none" Rules = "base" Model = "pc105" Layout = "hr" Variant = "none" Options = "none" The XKEYBOARD keymap compiler (xkbcomp) reports: > Warning: Type "ONE_LEVEL" has 1 levels, butThis will open new window with xterm in which you should execute:has 2 symbols > Ignoring extra symbols Errors from xkbcomp are not fatal to the X server winBlockHandler - pthread_mutex_unlock() winInitMultiWindowWM - pthread_mutex_lock () returned. winInitMultiWindowWM - pthread_mutex_unlock () returned. winMultiWindowXMsgProc - pthread_mutex_lock () returned. winInitMultiWindowWM - DISPLAY=:0.0 winMultiWindowXMsgProc - pthread_mutex_unlock () returned. winMultiWindowXMsgProc - DISPLAY=:0.0 winProcEstablishConnection - winInitClipboard returned. winClipboardThreadProc - DISPLAY=:0.0 winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display. winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display. winClipboardProc - XOpenDisplay () returned and successfully opened the display. DamirV@PCDAMIR ~ $ Warning: Missing charsets in String to FontSet conversion
export DISPLAY=:0.0 ssh -Y oracle@192.168.254.132 (or ssh -Y root@192.168.254.132) xclock &
DamirV@PCDAMIR ~ $ export DISPLAY=:0.0 DamirV@PCDAMIR ~ $ ssh -Y root@192.168.254.132 root@192.168.254.132's password: Warning: No xauth data; using fake authentication data for X11 forwarding. Last login: Sat Mar 8 19:24:47 2014 from 192.168.254.1 [root@centos5x64 ~]# xclock & [1] 4720 [root@centos5x64 ~]# Warning: Missing charsets in String to FontSet conversion [root@centos5x64 ~]#Result will be a new window with white clock. Warnings like shown may not worry you too much.
Do not go any further until you resolve that part-it is vital for Oracle GUI based install.
Adding additional disks
Beside one disk that come with original CentOS image, I'd add two additional disks:- 40 GB disk for ASM (iSCSI on AsmLib)
- 80 GB disk for Oracle software (mount point /u01)
shutdown -h nowBefore continuing, be aware to remove all snapshots, if they exists
Add disks trough "Edit Virtual Machine Settings"
- Add|Hard Disk|Add|Hard Disk|SCSI|Create a new virtual disk| size 80 GB (Split virtual disk into multiple files) "centos-5.x-x86_64-server-asm-disk1.vmdk"
- Add|Hard Disk|Add|Hard Disk|SCSI|Create a new virtual disk| size 40 GB (Split virtual disk into multiple files) "centos-5.x-x86_64-server-u01.vmdk"
vmx file editing
Some settings has to be done by directly by editing .vmx file (VMware definition):... scsi1.present = "TRUE" scsi1.virtualDev = "lsilogic" scsi1:0.present = "TRUE" scsi1:0.fileName = "centos-5.x-x86_64-server-asm-disk1.vmdk" scsi0:1.present = "TRUE" scsi0:1.fileName = "centos-5.x-x86_64-server-u01.vmdk" ...As you see, scsi1:0.fileName = "centos-5.9-x86_64-server-asm-disk1.vmdk" and that will represent sdc. For that disk we need to add next lines in .vmx file:
#directive is needed to allow VMware Workstation to provide unique SCSI identifiers to Linux. disk.locking = "FALSE" diskLib.dataCacheMaxSize = "0" diskLib.dataCacheMaxReadAheadSize = "0" diskLib.dataCacheMinReadAheadSize = "0" diskLib.dataCachePageSize = "4096" diskLib.maxUnsyncedWrites = "0" scsi1.sharedBus = "virtual" disk.EnabledUUID = "TRUE" # end directiveSave file.
Rename VMware.log to VMware.log_org, so you can easily find errors or potential problems.
Start VM and watch in console for some errors (if any). Examine VMware.log. It is not a bad idea to rebuild VMware tools.
If you get on boot time message like Clustering is not supported for WMware Workstation – this setting will be ignored, don’t worry about this. This is expected behavior. Check current status of disks in CentOS:
ls -ltr /dev/sd* fdisk -l
[root@centos5x64 ~]# ls -ltr /dev/sd* brw-r----- 1 root disk 8, 32 Mar 8 21:04 /dev/sdc brw-r----- 1 root disk 8, 16 Mar 8 21:04 /dev/sdb brw-r----- 1 root disk 8, 2 Mar 8 21:04 /dev/sda2 brw-r----- 1 root disk 8, 0 Mar 8 21:04 /dev/sda brw-r----- 1 root disk 8, 1 Mar 8 21:04 /dev/sda1 [root@centos5x64 ~]# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 2610 20860402+ 8e Linux LVM Disk /dev/sdb: 85.8 GB, 85899345920 bytes 255 heads, 63 sectors/track, 10443 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdb doesn't contain a valid partition table Disk /dev/sdc: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table [root@centos5x64 ~]#As stated before, sdb and sdc are our new disks. Keep in mind that SCSI 0:x is always before SCSI 1:x, so sdb represent u01 and sdc represent asm-disk1 disk!
Let's configure them. First one that will be for ASM storage:
fdisk /dev/sdcIn each case, the sequence of answers is "n", "p", "1", "Return", "Return" and "w".
[root@centos5x64 ~]# fdisk /dev/sdc Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 5221. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-5221, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-5221, default 5221): Using default value 5221 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@centos5x64 ~]#Leave disk unformatted. Repeat the same for second disk (sdb):
[root@centos5x64 ~]# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 10443. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-10443, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-10443, default 10443): Using default value 10443 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@centos5x64 ~]#Check current status of partition (sdb1 and sdc1 should be there new)
ls -ltr /dev/sd*
[root@centos5x64 ~]# ls -ltr /dev/sd* brw-r----- 1 root disk 8, 2 Mar 11 13:26 /dev/sda2 brw-r----- 1 root disk 8, 0 Mar 11 13:26 /dev/sda brw-r----- 1 root disk 8, 1 Mar 11 13:26 /dev/sda1 brw-r----- 1 root disk 8, 32 Mar 11 13:30 /dev/sdc brw-r----- 1 root disk 8, 33 Mar 11 13:30 /dev/sdc1 brw-r----- 1 root disk 8, 16 Mar 11 13:31 /dev/sdb brw-r----- 1 root disk 8, 17 Mar 11 13:31 /dev/sdb1 [root@centos5x64 ~]#Create file system for sdb1 partition with label "/u01"
/sbin/mkfs.ext3 -L /u01 /dev/sdb1
[root@centos5x64 ~]# /sbin/mkfs.ext3 -L /u01 /dev/sdb1 mke2fs 1.39 (29-May-2006) Filesystem label=/u01 OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 10485760 inodes, 20970841 blocks 1048542 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=4294967296 640 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 28 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@centos5x64 ~]#Mount new partition (sdb1):
mkdir -p /u01 mount /dev/sdb1 /u01
[root@centos5x64 ~]# mkdir /u01 [root@centos5x64 ~]# mount /dev/sdc1 /u01Make mount permanent, append to /etc/fstab
cp -p /etc/fstab /etc/fstab_org echo 'LABEL=/u01 /u01 ext3 defaults 0 0' >> /etc/fstab cat /etc/fstab
[root@centos5x64 ~]# cp -p /etc/fstab /etc/fstab_org [root@centos5x64 ~]# echo 'LABEL=/u01 /u01 ext3 defaults 0 0' >> /etc/fstab [root@centos5x64 ~]# cat /etc/fstab /dev/VolGroup00/LogVol00 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/VolGroup00/LogVol01 swap swap defaults 0 0 LABEL=/u01 /u01 ext3 defaults 0 0 [root@centos5x64 ~]#Now we create two directories into which the oracle software will be installed.
- /u01/app->Oracle software installation
- /u01/install->installation and patches directory (not needed if you plan to install software from some mounting point)
mkdir -p /u01/app mkdir -p /u01/app/oracle mkdir -p /u01/app/install chown -R oracle:oinstall /u01/app chmod -R 755 /u01/app ls -l /u01 ls -l /u01/app
[root@centos5x64 ~]# mkdir -p /u01/app [root@centos5x64 ~]# mkdir -p /u01/app/oracle [root@centos5x64 ~]# mkdir -p /u01/app/install [root@centos5x64 ~]# chown -R oracle:oinstall /u01/app [root@centos5x64 ~]# chmod -R 755 /u01/app [root@centos5x64 ~]# ls -l /u01 total 20 drwxr-xr-x 4 oracle oinstall 4096 Mar 8 21:19 app drwx------ 2 root root 16384 Mar 8 21:13 lost+found [root@centos5x64 ~]# ls -l /u01/app total 8 drwxr-xr-x 2 oracle oinstall 4096 Mar 8 21:19 install drwxr-xr-x 2 oracle oinstall 4096 Mar 8 21:19 oracle [root@centos5x64 ~]#
UDEV Steps
In /etc/scsi_id.config addoptions=-g
cp -p /etc/scsi_id.config /etc/scsi_id.config_org echo 'options=-g' >> /etc/scsi_id.config tail -1 /etc/scsi_id.config
[root@centos5x64 ~]# cp -p /etc/scsi_id.config /etc/scsi_id.config_org [root@centos5x64 ~]# echo 'options=-g' >> /etc/scsi_id.config [root@centos5x64 ~]# tail -1 /etc/scsi_id.config options=-g [root@centos5x64 ~]#Add SCSI support by SCSI ID:
[root@centos5x64 ~]# scsi_id -g -u -s /block/sdc 36000c29f432c73ccd476317a05260dba [root@centos5x64 ~]#36000c29f432c73ccd476317a05260dba is SCSI string (in your example this will be different!) which identify that device. Place that value in next expression to /etc/udev/rules.d/99-oracle-asmdevices.rules file:
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36000c29f432c73ccd476317a05260dba", NAME="asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"
echo 'KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36000c29f432c73ccd476317a05260dba", NAME="asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"' > /etc/udev/rules.d/99-oracle-asmdevices.rulesReload rules and look for result:
udevtest /block/sdc/sdc1 /sbin/udevcontrol reload_rules ls -l /dev/sdc1*
[root@centos5x64 ~]# udevtest /block/sdc/sdc1 main: looking at device '/block/sdc/sdc1' from subsystem 'block' udev_rules_get_name: add symlink 'disk/by-id/scsi-36000c29f432c73ccd476317a05260dba-part1' udev_rules_get_name: add symlink 'disk/by-path/pci-0000:02:05.0-scsi-0:0:0:0-part1' run_program: '/lib/udev/vol_id --export /dev/.tmp-8-33' run_program: '/lib/udev/vol_id' returned with status 4 run_program: '/sbin/scsi_id -g -u -s /block/sdc' run_program: '/sbin/scsi_id' (stdout) '36000c29f432c73ccd476317a05260dba' run_program: '/sbin/scsi_id' returned with status 0 udev_rules_get_name: rule applied, 'sdc1' becomes 'asm-disk1' udev_device_event: device '/block/sdc/sdc1' already in database, validate currently present symlinks udev_node_add: creating device node '/dev/asm-disk1', major = '8', minor = '33', mode = '0660', uid = '500', gid = '500' udev_node_add: creating symlink '/dev/disk/by-id/scsi-36000c29f432c73ccd476317a05260dba-part1' to '../../asm-disk1' udev_node_add: creating symlink '/dev/disk/by-path/pci-0000:02:05.0-scsi-0:0:0:0-part1' to '../../asm-disk1' main: run: 'socket:/org/kernel/udev/monitor' main: run: '/lib/udev/udev_run_devd' main: run: 'socket:/org/freedesktop/hal/udev_event' main: run: '/sbin/pam_console_apply /dev/asm-disk1 /dev/disk/by-id/scsi-36000c29f432c73ccd476317a05260dba-part1 /dev/disk/by-path/pci-0000:02:05.0-scsi-0:0:0:0-part1' main: run: '/bin/sh -c 'echo 180 >/sys/block/sdc/sdc1/timeout'' [root@centos5x64 ~]#Place proper permission on sdc1:
ls -ltr /dev/sdc* chmod 660 /dev/sdc chmod 660 /dev/sdc1 ls -ltr /dev/sdc
[root@centos5x64 ~]# ls -l /dev/sdc* brw-r----- 1 root disk 8, 32 Mar 11 13:30 /dev/sdc brw-r----- 1 root disk 8, 33 Mar 11 13:30 /dev/sdc1 [root@centos5x64 ~]# chmod 660 /dev/sdc [root@centos5x64 ~]# chmod 660 /dev/sdc1 [root@centos5x64 ~]# ls -l /dev/sdc* brw-rw---- 1 root disk 8, 32 Mar 11 13:30 /dev/sdc brw-rw---- 1 root disk 8, 33 Mar 11 13:30 /dev/sdc1 [root@centos5x64 ~]#reboot!
Now, previously created asmdevices rule must be active:
[root@centos5x64 ~]# ls -l /dev/asm* brw-rw---- 1 oracle dba 8, 33 Mar 11 13:52 /dev/asm-disk1 [root@centos5x64 ~]#
AsmLib
AsmLib is the easiest way to implement ASM supported database. Keep in mind that with RHEL 5.x, Oracle is providing a full support for ASM disks through AsmLib. With RHEL 6.x this is no longer available so other methods must be applied (ASM is still supported only on OEL 6.x!). This is why I love to stay on CentOS 5x version as far as I can (not to mention other new "features" like huge pages in 6 version which work differently than in 5 version).Drivers may be downloaded from link. Here you choose OS and kernel version (uname -r). For mine case (2.6.18-371.4.1.el5) I needed to download next three files in group "Intel EM64T (x86_64) Architecture", which were in time of writing this:
- oracleasm-support-2.1.8-1.el5.x86_64.rpm
- oracleasmlib-2.0.4-1.el5.x86_64.rpm
- oracleasm-2.6.18-371.4.1.el5-2.0.5-1.el5.x86_64.rpm
ls -ltr /mnt/hgfs/Downloads/*.rpm rpm -Uvh /mnt/hgfs/Downloads/oracleasm-support-2.1.8-1.el5.x86_64.rpm /mnt/hgfs/Downloads/oracleasm-2.6.18-371.4.1.el5-2.0.5-1.el5.x86_64.rpm /mnt/hgfs/Downloads/oracleasmlib-2.0.4-1.el5.x86_64.rpm
[root@centos5x64 ~]# rpm -Uvh /mnt/hgfs/Downloads/oracleasm-support-2.1.8-1.el5.x86_64.rpm /mnt/hgfs/Downloads/oracleasm-2.6.18-371.4.1.el5-2.0.5-1.el5.x86_64.rpm /mnt/hgfs/Downloads/oracleasmlib-2.0.4-1.el5.x86_64.rpm warning: /mnt/hgfs/Downloads/oracleasm-support-2.1.8-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159 Preparing... ########################################### [100%] 1:oracleasm-support ########################################### [ 33%] 2:oracleasm-2.6.18-371.4.########################################### [ 67%] 3:oracleasmlib ########################################### [100%] [root@centos5x64 ~]#
Initialization ASM disk part
After AsmLib is installed, Oracle needs to initialize deamon process as well as disks by writing some information in their header./etc/init.d/oracleasm configure i
[root@centos5x64 ~]# /etc/init.d/oracleasm configure i Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets ('[]'). HittingMark disk as shared with label DATA and do other initializationwithout typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: oracle Default group to own the driver interface []: dba Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: Writing Oracle ASM library driver configuration: done Initializing the Oracle ASMLib driver: [ OK ] Scanning the system for Oracle ASMLib disks: [ OK ] [root@centos5x64 ~]#
/usr/sbin/oracleasm createdisk DATA /dev/asm-disk1 /usr/sbin/oracleasm scandisks /usr/sbin/oracleasm listdisks /usr/sbin/oracleasm querydisk DATA ls -l /dev/oracleasm/disks
[root@centos5x64 disks]# /usr/sbin/oracleasm createdisk DATA /dev/asm-disk1 Writing disk header: done Instantiating disk: done [root@centos5x64 disks]# /usr/sbin/oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks... [root@centos5x64 disks]# /usr/sbin/oracleasm listdisks DATA [root@centos5x64 ~]# /usr/sbin/oracleasm querydisk DATA Disk "DATA" is a valid ASM disk [root@centos5x64 ~]# ls -l /dev/oracleasm/disks total 0 brw-rw---- 1 oracle dba 8, 33 Mar 9 09:00 DATAASM disk with label DATA has correct permissions and it is ready for use.
Installing Oracle 11.1.0.6, update to 11.1.0.7 and place 11.1.0.7.18 Patch Set Update software
Installing software to latest PSU (Patch Set Update) is the quickest way when making certain environment from the scratch. This will shorten upgrade and post upgrades parts which will be present in a case of running any kind of Oracle database.Oracle 11.1.0.7 is not able to be installed as new installation but only as upgrade. Otherwise, you'll attempt will fail with message:
Checking for Oracle Home incompatibilities ... Actual Result: NEW_HOME Check complete. The overall result of this check is: Failed <<<< Problem: This software can only be installed into an existing Oracle Database 11g Oracle Home. Recommendation: Choose an existing Oracle Database 11g Oracle Home for installing this software. ========================================================
Installing Oracle 11.1.0.6
Download "11gRelease 1 (11.1) for Linux B28263-01-linux.x64_11gR1_database.zip"Log in as oracle user (software owner)
unpack from Windows share directly to CentOS
If any of the following environment variables are set, then remove/unset them. ORACLE_HOME ORACLE_SID TNS_ADMIN. Remove any other Oracle Home references in PATH variable LD_LIBRARY_PATH, Java References (like JAVA_HOME..etc)
su - oracle cd /u01/app/install ls -l /mnt/hgfs/Downloads/linux.x64_11gR1_database.zip mkdir 11.1.0.6 cd 11.1.0.6 unzip /mnt/hgfs/Downloads/linux.x64_11gR1_database.zip
[root@centos5x64 ~]# su - oracle [root@centos5x64 ~]# ls -l /mnt/hgfs/Downloads/linux.x64_11gR1_database.zip -rwxrwxrwx 1 root root 1844533232 Mar 2 05:49 /mnt/hgfs/Downloads/linux.x64_11gR1_database.zip [oracle@centos5x64 install]# cd /u01/app/install [oracle@centos5x64 install]# mkdir 11.1.0.6 [oracle@centos5x64 install]# cd 11.1.0.6 [oracle@centos5x64 11.1.0.6]$ unzip /mnt/hgfs/Downloads/linux.x64_11gR1_database.zip Archive: /mnt/hgfs/Downloads/linux.x64_11gR1_database.zip creating: database/ .. .. creating: database/stage/prereq/common/ inflating: database/stage/prereq/common/rulemap.xml inflating: database/stage/prereq/prerequisite.properties inflating: database/welcome.html [oracle@centos5x64 11.1.0.6]$If you downloaded cpio.gz" then
gunzip filename.cpio.gz cpio -idcmv < filename.cpiowhere "filename" is what you get by gunzip.
start cygwin x in a previously described way and go to /u01/app/install/11.1.0.6/database directory and start installation by ./runInstaller
startxwin ... --move to opened xterm: export DISPLAY=:0.0 ssh -Y oracle@192.168.254.132 cd /u01/app/install/11.1.0.6/database/ unset ORACLE_HOME unset ORACLE_BASE unset ORACLE_SID unset TNS_ADMIN ./runInstaller
[oracle@centos5x64 database]$ unset ORACLE_HOME [oracle@centos5x64 database]$ unset ORACLE_BASE [oracle@centos5x64 database]$ unset ORACLE_SID [oracle@centos5x64 database]$ unset TNS_ADMIN [oracle@centos5x64 database]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 120 MB. Actual 14578 MB Passed Checking swap space: must be greater than 150 MB. Actual 2015 MB Passed Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<< Some requirement checks failed. You must fulfill these requirements before continuing with the installation,at which time they will be rechecked. Continue? (y/n) [n] y Rechecking installer requirements.... Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-03-09_12-27-39PM. Please wait ...[oracle@centos5x64 database]$If you get after executing "ssh" message like:
DamirV@PCDAMIR ~ $ ssh -Y oracle@192.168.254.132 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is 85:e4:dc:58:5b:8a:2c:73:e6:bc:d5:e0:55:00:ee:2e. Please contact your system administrator. Add correct host key in /home/DamirV/.ssh/known_hosts to get rid of this message. Offending RSA key in /home/DamirV/.ssh/known_hosts:1 RSA host key for 192.168.254.132 has changed and you have requested strict checking. Host key verification failed. DamirV@PCDAMIR ~This means that previously saved key is now different (different virtual guest). YOu solve that by deleting the file or removing line where IP of current server is placed.
DamirV@PCDAMIR2 ~ $ rm -f /home/DamirV/.ssh/known_hostsDo not wory about this warning "Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed" if blue window shows. On Product-Specific Prerequisite Checks window, there might be several warnings:
- Checking for ip_local_port_range=1024 - 65000; ip_local_port_range=9000 - 65500.
- Checking for rmem_default=4194304; rmem_default=262144. Failed < < < <
@per Bug 7507772 The runInstaller (OUI) checks may expect this to be the old guidance of 1024 65000. The new guidance from Oracle development is 9000 65500. Please allow the runInstaller (OUI) to proceed with the new guidance from Oracle development.net.core.rmem_default = 262144You may ignore them. When all is set, get final pre install form. last step is run as root user:
/u01/app/oraInventory/orainstRoot.sh /u01/app/oracle/product/11.1.0/db_1/root.sh
[root@centos5x64 ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory to 770. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete [root@centos5x64 ~]# /u01/app/oracle/product/11.1.0/db_1/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.1.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Finished product-specific root actions. [root@centos5x64 ~]#Finally last screen is:
Post install part
Add missing parts for oracle user environment (as oracle user)cd ~ echo 'ORACLE_OWNER=oracle; export ORACLE_OWNER' >> .bash_profile echo 'ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_HOME' >> .bash_profile echo 'PATH=$ORACLE_HOME/bin:$PATH; export PATH' >> .bash_profile tail -6 .bash_profile
[oracle@centos5x64 database]$ cd ~ [oracle@centos5x64 ~]$ echo 'ORACLE_OWNER=oracle; export ORACLE_OWNER' >> .bash_profile [oracle@centos5x64 ~]$ echo 'ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_HOME' >> .bash_profile [oracle@centos5x64 ~]$ echo 'PATH=$ORACLE_HOME/bin:$PATH; export PATH' >> .bash_profile [oracle@centos5x64 ~]$ tail -6 .bash_profile fi fi umask 0022 ORACLE_OWNER=oracle; export ORACLE_OWNER ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_HOME PATH=$ORACLE_HOME/bin:$PATH; export PATH [oracle@centos5x64 ~]$Reread new profile
. ~/.bash_profileCheck that all is assigned by calling sqlplus
sqlplus /nolog
[oracle@centos5x64 ~]$ sqlplus /nolog SQL*Plus: Release 11.1.0.6.0 - Production on Sun Mar 9 13:27:44 2014 Copyright (c) 1982, 2007, Oracle. All rights reserved. SQL>
Upgrade to 11.1.0.7
Current software status:cd /u01/app/oracle/product/11.1.0/db_1/OPatch/ ./opatch lsinventory
[oracle@centos5x64 ~]$ cd /u01/app/oracle/product/11.1.0/db_1/OPatch/ [oracle@centos5x64 OPatch]$ ./opatch lsinventory Invoking OPatch 11.1.0.6.0 Oracle Interim Patch Installer version 11.1.0.6.0 Copyright (c) 2007, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.1.0/db_1 Central Inventory : /u01/app/oraInventory from : /etc/oraInst.loc OPatch version : 11.1.0.6.0 OUI version : 11.1.0.6.0 OUI location : /u01/app/oracle/product/11.1.0/db_1/oui Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2014-03-09_08-30-09AM.log Lsinventory Output file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-03-09_08-30-09AM.txt -------------------------------------------------------------------------------- Installed Top-level Products (1): Oracle Database 11g 11.1.0.6.0 There are 1 products installed in this Oracle Home. There are no Interim patches installed in this Oracle Home. -------------------------------------------------------------------------------- OPatch succeeded. [oracle@centos5x64 OPatch]$Download "11g Release 1 (11.1.0.7) Patch Set 1 for Linux x86-64 Part Number E12582-01-p6890831_111070_Linux-x86-64.zip"
Log in as oracle Software owner
unpack from Windows share directly to CentOS
su - oracle ls -l /mnt/hgfs/Downloads/p6890831_111070_Linux-x86-64.zip cd /u01/app/install mkdir 11.1.0.7 cd /u01/app/install/11.1.0.7 unzip /mnt/hgfs/Downloads/p6890831_111070_Linux-x86-64.zip
[root@centos5x64 ~]# su - oracle [oracle@centos5x64 ~]$ ls -l /mnt/hgfs/Downloads/p6890831_111070_Linux-x86-64.zip -rwxrwxrwx 1 root root 1613366248 Mar 3 00:57 /mnt/hgfs/Downloads/p6890831_111070_Linux-x86-64.zip [oracle@centos5x64 ~]$ cd /u01/app/install [oracle@centos5x64 install]$ mkdir 11.1.0.7 [oracle@centos5x64 install]$ cd 11.1.0.7/ [oracle@centos5x64 11.1.0.7]$ unzip /mnt/hgfs/Downloads/p6890831_111070_Linux-x86-64.zip Archive: /mnt/hgfs/Downloads/p6890831_111070_Linux-x86-64.zip creating: Disk1/ inflating: Disk1/patch_note.htm creating: Disk1/response/ inflating: Disk1/response/patchset.rsp inflating: Disk1/11107_buglist.htm creating: Disk1/install/ ... ... inflating: Disk1/stage/install1.jar inflating: README.html [oracle@centos5x64 install]$Now, it is OK to have environment (ORACLE_HOME) so after that start cygwin xterm and go to /u01/app/install/11.1.0.7 directory where you'll start installation by executing ./runInstaller
startxwin export DISPLAY=:0.0 ssh -Y oracle@192.168.254.132 cd /u01/app/install/11.1.0.7/Disk1/ ./runInstaller
[oracle@centos5x64 11.1.0.7]$ cd /u01/app/install/11.1.0.7/Disk1/ [oracle@centos5x64 Disk1]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 80 MB. Actual 14733 MB Passed Checking swap space: must be greater than 150 MB. Actual 2015 MB Passed Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<< Some requirement checks failed. You must fulfill these requirements before continuing with the installation,at which time they will be rechecked. Continue? (y/n) [n] y Rechecking installer requirements.... Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-03-09_09-33-17AM. Please wait ...[oracle@centos5x64 Disk1]$ Oracle Universal Installer, Version 11.1.0.7.0 Production Copyright (C) 1999, 2008, Oracle. All rights reserved.Finalize as root:
sh /u01/app/oracle/product/11.1.0/db_1/root.sh
[root@centos5x64 app]# /u01/app/oracle/product/11.1.0/db_1/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.1.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying dbhome to /usr/local/bin ... The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying oraenv to /usr/local/bin ... The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Finished product-specific root actions. [root@centos5x64 app]#Check current Oracle version
cd /u01/app/oracle/product/11.1.0/db_1/OPatch/ ./opatch lsinventory
[oracle@centos5x64 ~]$ cd /u01/app/oracle/product/11.1.0/db_1/OPatch/ [oracle@centos5x64 OPatch]$ ./opatch lsinventory Invoking OPatch 11.1.0.6.2 Oracle Interim Patch Installer version 11.1.0.6.2 Copyright (c) 2007, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.1.0/db_1 Central Inventory : /u01/app/oraInventory from : /etc/oraInst.loc OPatch version : 11.1.0.6.2 OUI version : 11.1.0.7.0 OUI location : /u01/app/oracle/product/11.1.0/db_1/oui Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2014-03-09_09-55-06AM.log Lsinventory Output file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-03-09_09-55-06AM.txt -------------------------------------------------------------------------------- Installed Top-level Products (2): Oracle Database 11g 11.1.0.6.0 Oracle Database 11g Patch Set 1 11.1.0.7.0 There are 2 products installed in this Oracle Home. There are no Interim patches installed in this Oracle Home. -------------------------------------------------------------------------------- OPatch succeeded. [oracle@centos5x64 OPatch]$
OPatch patch
To be able to install latest 11.1.0.7 patch set updadte, certain level of opatch is required. According Oracle, patch of version 11.1.0.10.2 for Oracle software releases 11.1.0.x (OCT 2013) is needed.Download it and extract with oracle user in $ORACLE_HOME directory.
unzip p6880880_111000_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@centos5x64 app]$ unzip p6880880_111000_Linux-x86-64.zip -d $ORACLE_HOME Archive: p6880880_111000_Linux-x86-64.zip creating: /u01/app/oracle/product/11.1.0/db_1/OPatch/crs/ creating: /u01/app/oracle/product/11.1.0/db_1/OPatch/crs/log/ creating: /u01/app/oracle/product/11.1.0/db_1/OPatch/jlib/fa/ creating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oms/ creating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/ creating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/ creating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/apache-commons/ creating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/jaxb/ creating: /u01/app/oracle/product/11.1.0/db_1/OPatch/scripts/ creating: /u01/app/oracle/product/11.1.0/db_1/OPatch/wlskeys/ inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/README.txt inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/crs/auto_patch.pl inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/crs/crsconfig_lib.pm inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/crs/crsdelete.pm inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/crs/crspatch.pm inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/crs/oracss.pm inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/crs/patch112.pl inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/crs/s_crsconfig_defs inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/crs/s_crsconfig_lib.pm replace /u01/app/oracle/product/11.1.0/db_1/OPatch/docs/FAQ? [y]es, [n]o, [A]ll, [N]one, [r]ename: A inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/docs/FAQ inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/docs/Prereq_Users_Guide.txt inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/docs/Users_Guide.txt inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/docs/operr_readme.txt inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/emdpatch.pl inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/jlib/fa/oracle.opatch.fa.classpath.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/jlib/fa/oracle.opatch.fa.classpath.unix.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/jlib/fa/oracle.opatch.fa.classpath.windows.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/jlib/opatch.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/jlib/opatchsdk.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/jlib/oracle.opatch.classpath.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/jlib/oracle.opatch.classpath.unix.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/jlib/oracle.opatch.classpath.windows.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oms/generateMultiOMSPatchingScripts.pl inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatch inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatch.bat inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatch.ini inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatch.pl inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatchauto inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatchauto.bat inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatchdiag inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatchdiag.bat inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatchprereqs/opatch/opatch_prereq.xml inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatchprereqs/opatch/rulemap.xml inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatchprereqs/opatch/runtime_prereq.xml inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatchprereqs/opatch_prereq.sh inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatchprereqs/oui/knowledgesrc.xml inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/opatchprereqs/prerequisite.properties inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/operr inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/operr.bat inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/README.html inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/README.txt inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/CRSProductDriver.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/EMrepoDrivers.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/JMXDrivers.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/OsysModel.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/OuiDriver.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/Validation.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/ValidationRules.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/apache-commons/commons-cli-1.0.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/automation.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/bundle.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/jaxb/activation.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/jaxb/jaxb-api.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/jaxb/jaxb-impl.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/jaxb/jsr173_1.0_api.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/oplan.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/oracle.oplan.classpath.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/osysmodel-utils.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/jlib/patchsdk.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/oplan inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/oplan/oplan.bat inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/scripts/opatch_crs inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/scripts/opatch_fa inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/scripts/opatch_fmw inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/version.txt inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/wlskeys/createkeys.cmd inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/wlskeys/createkeys.sh inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/ocm.zip inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/bin/emocmrsp inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/emocmclnt-14.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/emocmclnt.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/emocmcommon.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/http_client.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/jcert.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/jnet.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/jsse.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/log4j-core.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/osdt_core3.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/osdt_jce.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/regexp.jar inflating: /u01/app/oracle/product/11.1.0/db_1/OPatch/ocm/lib/xmlparserv2.jar [oracle@centos5x64 app]$Check new Opatch is properly installed:
> cd /$ORACLE_HOME/OPatch ./opatch version
> [oracle@centos5x64 OPatch]$ ./opatch version OPatch Version: 11.1.0.10.2 OPatch succeeded. [oracle@centos5x64 OPatch]$
Patch 17465583 - 11.1.0.7.18 Patch Set Update
Download patch p17465583_111070_Linux-x86-64.zip, unzip as oracle user.unzip p17465583_111070_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@centos5x64 install]$ unzip p17465583_111070_Linux-x86-64.zip Archive: p17465583_111070_Linux-x86-64.zip creating: 17465583/ creating: 17465583/files/ creating: 17465583/files/olap/ creating: 17465583/files/olap/admin/ ... creating: 17465583/custom/ creating: 17465583/custom/scripts/ inflating: 17465583/custom/scripts/pre inflating: 17465583/patchmd.xml [oracle@centos5x64 install]$Whenever you deal with any kind of patch set update, the way to be sure that all should go smoothly is to determine whether any currently installed one-off patches conflict with the PSU patch as follows.
PATH=$ORACLE_HOME/OPatch:$PATH; export PATH cd /u01/app/install opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./17465583
[oracle@centos5x64 ~]$ PATH=$ORACLE_HOME/OPatch:$PATH; export PATH [oracle@centos5x64 ~]$ cd /u01/app/install [oracle@centos5x64 install]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./17465583 Oracle Interim Patch Installer version 11.1.0.10.2 Copyright (c) 2013, Oracle Corporation. All rights reserved. PREREQ session Oracle Home : /u01/app/oracle/product/11.1.0/db_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.1.0/db_1/oraInst.loc OPatch version : 11.1.0.10.2 OUI version : 11.1.0.7.0 Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2014-03-09_15-13-17PM_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. [oracle@centos5x64 install]$This was expected (no patchset until now) but very good habit indeed. Install patch:
cd 17465583 opatch apply
[oracle@centos5x64 install]$ cd 17465583 [oracle@centos5x64 17465583]$ opatch apply Oracle Interim Patch Installer version 11.1.0.10.2 Copyright (c) 2013, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.1.0/db_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.1.0/db_1/oraInst.loc OPatch version : 11.1.0.10.2 OUI version : 11.1.0.7.0 Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/17465583_Mar_09_2014_15_18_33/apply2014-03-09_15-18-32PM_1.log Applying interim patch '17465583' to OH '/u01/app/oracle/product/11.1.0/db_1' Verifying environment and performing prerequisite checks... Patch 17465583: Optional component(s) missing : [ oracle.network.cman, 11.1.0.7.0 ] , [ oracle.rdbms.dv.oc4j, 11.1.0.7.0 ] , [ oracle.rdbms.dv, 11.1.0.7.0 ] All checks passed. Provide your email address to be informed of security issues, install and initiate Oracle Configuration Manager. Easier for you if you use your My Oracle Support Email address/User Name. Visit http://www.oracle.com/support/policies.html for details. Email address/User Name: You have not provided an email address for notification of security issues. Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: Y Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/u01/app/oracle/product/11.1.0/db_1') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Patching component oracle.network.listener, 11.1.0.7.0... Patching component oracle.rdbms.rsf, 11.1.0.7.0... Patching component oracle.network.rsf, 11.1.0.7.0... Patching component oracle.rdbms.rman, 11.1.0.7.0... Patching component oracle.sdo.locator, 11.1.0.7.0... Patching component oracle.sysman.console.db, 11.1.0.7.0... Patching component oracle.sysman.repository.core, 10.2.0.4.1... Patching component oracle.sysman.oms.core, 10.2.0.4.1... Patching component oracle.sysman.console.db, 11.1.0.7.0... Patching component oracle.rdbms.dbscripts, 11.1.0.7.0... Patching component oracle.javavm.server, 11.1.0.7.0... Patching component oracle.precomp.common, 11.1.0.7.0... Patching component oracle.rdbms, 11.1.0.7.0... Patching component oracle.oraolap, 11.1.0.7.0... Patching component oracle.xdk.parser.java, 11.1.0.7.0... Patching component oracle.xdk, 11.1.0.7.0... Patching component oracle.xdk.rsf, 11.1.0.7.0... Patching component oracle.ldap.rsf, 11.1.0.7.0... Patching component oracle.ldap.rsf.ic, 11.1.0.7.0... Patching component oracle.ctx, 11.1.0.7.0... Patching component oracle.rdbms.rsf, 11.1.0.7.0... Patching component oracle.rdbms.util, 11.1.0.7.0... Patching component oracle.network.rsf, 11.1.0.7.0... Patching component oracle.network.client, 11.1.0.7.0... Patching component oracle.ordim.jai, 11.1.0.7.0... Patching component oracle.ordim.client, 11.1.0.7.0... Patching component oracle.dbjava.ic, 11.1.0.7.0... Patching component oracle.dbjava.jdbc, 11.1.0.7.0... Verifying the update... Patch 17465583 successfully applied Log file location: /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/17465583_Mar_09_2014_15_18_33/apply2014-03-09_15-18-32PM_1.log OPatch succeeded. [oracle@centos5x64 17465583]$Check current status of patchset:
opatch lsinventory
[oracle@centos5x64 17465583]$ opatch lsinventory Oracle Interim Patch Installer version 11.1.0.10.2 Copyright (c) 2013, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.1.0/db_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.1.0/db_1/oraInst.loc OPatch version : 11.1.0.10.2 OUI version : 11.1.0.7.0 Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2014-03-09_15-22-25PM_1.log Lsinventory Output file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-03-09_15-22-25PM.txt -------------------------------------------------------------------------------- Installed Top-level Products (2): Oracle Database 11g 11.1.0.6.0 Oracle Database 11g Patch Set 1 11.1.0.7.0 There are 2 products installed in this Oracle Home. Interim patches (1) : Patch 17465583 : applied on Sun Mar 09 15:21:36 EDT 2014 Unique Patch ID: 17098187 Created on 1 Jan 2014, 08:06:48 hrs PST8PDT Bugs fixed: 9068088, 16946580, 16946581, 16946582, 16946583, 7207654, 8865718 7835247, 7648406, 9054253, 6851110, 7206858, 9744252, 7497788, 9956713 14275623, 8251486, 12984377, 6434104, 8851675, 7502237, 8211920, 9352179 7013124, 7643188, 7135702, 7529174, 7196532, 8300793, 9049725, 7705669 16867278, 7119382, 9001453, 7424804, 7408621, 7426336, 8856696, 6843972 10264680, 14841452, 8437213, 7028779, 8836375, 8216875, 7527650, 7454752 8290478, 9499302, 7412296, 6805009, 8318050, 13621679, 7185113, 7639602 8539335, 9711859, 15890514, 9011088, 15890515, 15890516, 14390384 15890517, 7131291, 15890518, 9109536, 12780098, 15890519, 13561951 8199266, 9114072, 8230457, 7420394, 8914979, 9713537, 14459552, 8876094 15890520, 15890521, 7348847, 9311909, 8408887, 15890522, 7183523, 7441663 7329252, 8622613, 16308394, 10249534, 7719668, 8577450, 9458811, 8534338 9272086, 8339404, 8517426, 9458814, 9458816, 7384419, 7690421, 9458819 12565867, 8419383, 14023636, 7447559, 8247855, 8394351, 6772911, 7175513 7417614, 9143376, 8243648, 13490818, 8367827, 8365141, 8761101, 7350127 8462173, 9027691, 11724999, 9485429, 7572069, 14841558, 9458829, 8825048 8328853, 7585314, 8341623, 8409848, 10358019, 6988517, 8860821, 9830111 8306933, 8306934, 16306019, 9166322, 6840740, 12828097, 9563951, 9458831 6981690, 8304329, 8281906, 7480809, 8339352, 7340448, 7393258, 10165083 6599920, 7630416, 8342506, 8717461, 6407486, 7416901, 7281382, 8599477 7475055, 8217795, 8982191, 8362693, 12687462, 9702142, 7436152, 7680907 9702143, 8481935, 7657365, 7345543, 10046072, 7670135, 10187168, 10648873 7708340, 8499043, 12419265, 14258925, 8224083, 6983384, 7385253, 7225720 8354686, 8399549, 9118620, 6856345, 9118622, 9209238, 9311954, 16359931 7484102, 16359932, 7661251, 13813945, 8771916, 6991626, 5552232, 14488890 14488891, 9229631, 14488892, 7022234, 7462112, 8248911, 13358127 7296258, 13737031, 9369783, 13737032, 13737033, 13737034, 13737035 13737036, 13737037, 6812439, 13737038, 13737039, 6870937, 7828187 7263842, 8287680, 8870559, 9488887, 13503598, 8990527, 9242411, 9448311 7500792, 8352304, 13737040, 13737041, 8352309, 13737042, 13737043 8565359, 8324760, 7019313, 8775066, 14145193, 8686128, 7486595, 7643632 9032717, 8658581, 7499911, 6734871, 7411865, 10094989, 7111196, 16450169 7276960, 8890026, 8360192, 7522002, 7613481, 12748240, 7452373, 14586023 9267837, 8763922, 10399808, 6770443, 17019974, 7334226, 11856395 8284438, 13015379, 8232287, 7318049, 8214576, 9021155, 6679303, 8815639 8740993, 7516536, 7675269, 8244734, 13343453, 8490879, 7646055, 8268330 9255542, 8496830, 9095091, 12419384, 6647480, 9473270, 8416414, 6858062 7189645, 8476517, 7497251, 7436280, 5970301, 13343461, 9363145, 9312879 7506785, 16382448, 13791364, 6977167, 6445948, 10426994, 5929055, 7298982 8348464, 6522654, 8737065, 9774756, 8833297, 6016633, 7606362, 8332021 9188470, 8502963, 14141300, 14141301, 12710774, 8285404, 8391256 9399991, 13630102, 9776431, 6798427, 11829892, 7138523, 6971433, 7829321 7311601, 8433270, 11829897, 8563941, 8563942, 8563943, 8563944, 8563945 8563946, 7345904, 8563947, 12827740, 8563948, 17352830, 12899066 17352831, 17352832, 6870994, 14038803, 17352833, 17352834, 7523787 9135679, 17352835, 16721594, 8528171, 7697360, 9210925, 7378322, 13596521 17088068, 8348481, 9081430, 8974548, 7331867, 17841015, 17841016 17841017, 17841018, 17841019, 7273819, 16619896, 7254221, 7036284 8847439, 7515779, 13632731, 9434549, 9637033, 8402548, 8608377, 7510766 9066130, 8364676, 7628387, 7553884, 7694979, 8565708, 8813142, 6972189 17841021, 7682745, 10209232, 6598432, 6768362, 6501490, 9841005, 9672816 7719143, 8402551, 16710324, 7484261, 8402555, 7719148, 8284633, 10009222 7307821, 8613137, 7650993, 9714832, 8940197, 6970731, 12560400, 10009229 7589862, 12560402, 9170608, 14273397, 12560404, 8263441, 12560405 7586451, 6709070, 7446163, 7460818, 6618461, 7451927, 7373196, 16703112 7336031, 7338648, 9399090, 8413059, 13504767, 8402562, 8402637, 7393804 7190092, 6196748, 7627743, 8834425, 16212405, 8531282, 16338983, 9145541 10411618, 7720494, 13000884, 8645846, 8539923, 8236851, 7602341, 7036453 7610362, 8855553, 16462834, 8855559, 8543737, 10336518, 10009241, 7626014 9654987, 10009173, 10009246, 8649055, 7341598, 7706138, 7292503, 6797677 8603465, 17082366, 8946311, 8342923, 8549480, 7356443, 7593835, 8483871 8242410, 7044551, 7639121, 9275072, 8855565, 9795214, 7253531, 10336525 6851669, 16742110, 14205448, 7318276, 14141297, 8257122, 7013817 14141298, 14141299, 7309458, 8450529, 17082374, 11807302, 13923474 16279211, 8855570, 8499600, 8501439, 8588540, 8855575, 8790767, 7652915 7426959, 8855577, 13554409, 16710363, 6980601, 9857702, 6452375, 16056268 8607693, 7653579, 9341448, 7535429, 13353523, 8582594, 12560374, 16864562 14546638, 7409110, 7432514, 9655014, 9581240, 8764031, 9689310, 7332001 8240762, 7707103, 9084111, 9007102, 10336548, 7013835, 16362358, 17465583 12564597, 8361398, 6784747, 7524944, 6780602, 7496908, 7662620, 12880299 12560385, 14546575, 12560386, 10127716, 9189647, 12560459, 7417140 6941717, 7122161, 8668823, 8898852, 7377810, 7477246, 8363210, 6798650 7299153, 12796518, 8213302, 8909984, 8755082, 14739378, 8702276, 14263036 14469008, 7497640, 12560461, 7630874, 12560390, 12560464, 7133740 9368549, 7311909, 7614692, 9703463, 12560393, 7432601, 8650719, 7213937 7352414, 7516867, 12560398, 8199107, 16372203, 7662491, 12371955 8856478, 10336560, 7041254, 9549042, 10336565, 14671238, 7219752, 17551415 9952228, 6900214, 8981059, 6882739, 11807271, 8546332, 8813366, 8296070 11807278, 7508788, 12531263, 7538000, 9165206, 7242222, 8834636, 7652888 10336577, 7330434, 7113299, 7307972, 8592394, 8487273, 8660422, 7462709 14546673, 16279401, 8650661, 11807283, 11699057, 8244217, 7515145 13483152, 7202451, 7432556, 10019218, 7022905, 8674263, 8221425, 7694273 8211733, 9074535, 9188010, 7438445, 16344758, 9197917, 11807291, 8803762 11807293, 7494333, 7834195, 8250643, 11807297, 7298601, 13561750, 8277580 7172752, 7326645, 7171015, 7715244, 7461921, 9241202, 14263073, 6980597 7499353, 8301559, 9532911, 7357609, 7462589, 8768374, 7610592, 10248531 7830065, 7203349, 8702535, 8669679, 9768907, 8268775, 6955744, 7366290 9952269, 8433693, 7702085, 10145558, 8570572, 7185872, 11724936, 8625762 6059178, 7257038, 7336280, 6690853, 9744092, 8595043, 8542307, 8578132 7330611, 8226397, 7628866, 16610144, 7278231, 10324526, 6903819, 7676737 9620202, 9231605, 8636407, 16946578, 8782971, 16946579, 7258928, 9264021 10169304, 7511040, 7434194, 8315482, 12984367, 8369094, 12984369 7716219, 14035825, 9246245, 7556778, 8220734, 7597354, 13916709, 7710260 -------------------------------------------------------------------------------- OPatch succeeded. [oracle@centos5x64 17465583]$Now we are in point where many updates may fall into-latest Oracle 11.1.0.7 version with latest patch set update. So this would be a good starting point for any upgrade testing to 11.2.0.x version.
Install ASM database instance
ASM is semi normal Oracle instance which replace file system fro Oracle based objects. Now when software is installed we have to initialize it./u01/app/oracle/product/11.1.0/db_1/bin/localconfig add ps -ef|grep oracle|grep ocssd
[root@centos5x64 ~]# /u01/app/oracle/product/11.1.0/db_1/bin/localconfig add /etc/oracle does not exist. Creating it now. Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. Configuration for local CSS has been initialized Cleaning up Network socket directories Setting up Network socket directories Adding to inittab Startup will be queued to init within 30 seconds. Checking the status of new Oracle init process... Expecting the CRS daemons to be up within 600 seconds. Cluster Synchronization Services is active on these nodes. centos5x64 Cluster Synchronization Services is active on all the nodes. Oracle CSS service is installed and running under init(1M) [root@centos5x64 ~]# ps -ef|grep oracle|grep ocssd oracle 6311 6159 0 19:23 ? 00:00:00 /u01/app/oracle/product/11.1.0/db_1/bin/ocssd.bin [root@centos5x64 ~]#
cssd start/stop
If you ever have a need to stop/start cssd deamon do in this way:/etc/init.d/init.cssd stop css
[root@centos5x64 ~]# /etc/init.d/init.cssd stop css Shutting down CRS daemon. Shutting down EVM daemon. Shutting down CSS daemon. Shutdown request successfully issued. Shutdown has begun. The daemons should exit soon. [root@centos5x64 ~]#to start just execute
/etc/init.d/init.cssd start css
dbca and ASM
With dbca create ASM instancedbcaWhen installation is over, check ASM instance is running
ps -ef|grep +ASM
[root@centos5x64 ~]# ps -ef|grep +ASM oracle 8339 1 0 19:33 ? 00:00:00 asm_pmon_+ASM oracle 8341 1 0 19:33 ? 00:00:00 asm_vktm_+ASM oracle 8345 1 0 19:33 ? 00:00:00 asm_diag_+ASM oracle 8347 1 0 19:33 ? 00:00:00 asm_psp0_+ASM oracle 8349 1 0 19:33 ? 00:00:00 asm_dia0_+ASM oracle 8351 1 0 19:33 ? 00:00:00 asm_mman_+ASM oracle 8353 1 0 19:33 ? 00:00:00 asm_dbw0_+ASM oracle 8355 1 0 19:33 ? 00:00:00 asm_lgwr_+ASM oracle 8357 1 0 19:33 ? 00:00:00 asm_ckpt_+ASM oracle 8359 1 0 19:33 ? 00:00:00 asm_smon_+ASM oracle 8361 1 0 19:33 ? 00:00:00 asm_rbal_+ASM oracle 8363 1 0 19:33 ? 00:00:00 asm_gmon_+ASM root 8851 5529 0 19:35 pts/0 00:00:00 grep +ASM [root@centos5x64 ~]#To have automatic ASM instance startup, as root, edit vi /etc/oratab and place "Y" in the end (instead of "N)
+ASM:/u01/app/oracle/product/11.1.0/db_1:N <---- change= !!!!Regardless dbora exists, I want to replace that file with mine version of dbora, placed in /etc/init.d and add content. This is because when you later add real Oracle database this file will do the work as well. Here is source of dbora script
#!/bin/sh # chkconfig: 345 99 10 # description: Oracle auto start-stop script. # # Change the value of ORACLE_HOME to specify the correct Oracle home # directory for your installation. ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 ASM_HOME=/u01/app/oracle/product/11.1.0/db_1 AGENT_HOME=/u01/app/oracle/product/em/agent # # Change the value of ORACLE to the login name of the # oracle owner at your site. # ORACLE_OWNER=oracle # # Need to sleep for a while so that the CSS service can start-however timeout in ASM starting mus not occur! # SLEEP_TIMER=10 # check for startup script if [ ! -f $ORACLE_HOME/bin/dbstart ]; then echo "----------------------------" echo "Oracle startup: cannot start" exit fi # Source function library. if [ -f /etc/init.d/functions ] ; then . /etc/init.d/functions elif [ -f /etc/rc.d/init.d/functions ] ; then . /etc/rc.d/init.d/functions else exit 1 fi # Adopt script by your instances on server. LISTENER and ASM should be here anyway! orastatus() { ps -ef|grep LISTENER|grep -v "grep LISTENER" > /dev/nul RETVAL1=$? #echo $RETVAL1; ps -ef|grep oracle|grep asm_pmon_+ASM|grep -v "grep grep asm_pmon_+ASM" > /dev/nul RETVAL2=$? #echo $RETVAL2; ps -ef|grep oracle|grep ora_pmon_ORCL|grep -v "grep ora_pmon_ORCL" > /dev/nul RETVAL3=$? #echo $RETVAL3; if [ $RETVAL1 -ne 0 ] ; then echo "LISTENER down!" else echo "LISTENER OK" fi if [ $RETVAL2 -ne 0 ] ; then echo "ASM down!" else echo "ASM OK" fi if [ $RETVAL3 -ne 0 ] ; then echo "ORCL down!" else echo "ORCL OK" fi X1=$(($RETVAL1>$RETVAL2?$RETVAL1:$RETVAL2)) exit $(($X1>$RETVAL3?$X1:$RETVAL3)) } case "$1" in start) # Start the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values # # sleep for a short while to let CSS service start echo "Going to sleep for $SLEEP_TIMER seconds..." sleep $SLEEP_TIMER echo "Starting Oracle ASM and Database " # The listener will start with this script also su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" # Now startup iSQLPlus and the console #su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/isqlplusctl start" #su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole" # Now start the GRID agent #su - $ORACLE_OWNER -c "$AGENT_HOME/bin/emctl start agent" touch /var/lock/subsys/dbora ;; stop) # Stop the Oracle databases: # Now stop the GRID agent #su - $ORACLE_OWNER -c "$AGENT_HOME/bin/emctl stop agent" # Stop iSQLPlus and the console #su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/isqlplusctl stop" #su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole" # The following command assumes that the oracle login # will not prompt the user for any values su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" rm -f /var/lock/subsys/dbora ;; status) orastatus ;; *) echo $"Usage: $0 {start|stop|status}" exit 1 esac echo "----------------------------" echo "Oracle dbora script finished regularly."usage of this script has three parameters: start|stop|status (status is mine add):
/etc/init.d/dbora start /etc/init.d/dbora status /etc/init.d/dbora stop
[root@centos5x64 ~]# /etc/init.d/dbora start Going to sleep for 10 seconds... Starting Oracle ASM and Database Processing ASM instance "+ASM": log file /u01/app/oracle/product/11.1.0/db_1/startup.log Processing Database instance "ORCL": log file /u01/app/oracle/product/11.1.0/db_1/startup.log ---------------------------- Oracle dbora script finished regularly. [root@centos5x64 ~]# /etc/init.d/dbora status LISTENER OK ASM OK ORCL OK [root@centos5x64 ~]# /etc/init.d/dbora stop Processing Database instance "ORCL": log file /u01/app/oracle/product/11.1.0/db_1/shutdown.log Processing ASM instance "+ASM": log file /u01/app/oracle/product/11.1.0/db_1/shutdown.log ---------------------------- Oracle dbora script finished regularly. [root@centos5x64 ~]#chkconfig level part
chkconfig --add dboraCheck status:
chkconfig --list dbora
[root@centos5x64 ~]# chkconfig --list dbora dbora 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@centos5x64 ~]#Change the group of the dbora file to the OSDBA group (typically dba), and set the permissions to 750:
chgrp dba /etc/init.d/dbora chmod 755 /etc/init.d/dboraCreate symbolic links to the dbora script in the appropriate run-level script directories
ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora
[root@centos5x64 init.d]# ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora [root@centos5x64 init.d]# ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora [root@centos5x64 init.d]# ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora [root@centos5x64 init.d]#edit /etc/initab and move last line
h1:35:respawn:/etc/init.d/init.cssd run </dev/null 2>&1 >/dev/nullto line between l2: and l3:. All after editing, file should looks like
# System initialization. si::sysinit:/etc/rc.d/rc.sysinit l0:0:wait:/etc/rc.d/rc 0 l1:1:wait:/etc/rc.d/rc 1 l2:2:wait:/etc/rc.d/rc 2 h1:35:respawn:/etc/init.d/init.cssd run </dev/null 2>&1 >/dev/nullReboot server to see ASM is automatically started. Check file that reflect auto boot actions /u01/app/oracle/product/11.1.0/db_1/startup.log
less /u01/app/oracle/product/11.1.0/db_1/startup.log
Failure 1 contacting Cluster Synchronization Services daemon logger: Waiting for Oracle CSS service to be available before starting logger: ASM instance +ASM. Wait 1. Cluster Synchronization Services appears healthy /u01/app/oracle/product/11.1.0/db_1/bin/dbstart: Starting up database "+ASM" Tue Mar 11 22:45:26 CET 2014 SQL*Plus: Release 11.1.0.7.0 - Production on Tue Mar 11 22:45:26 2014 Copyright (c) 1982, 2008, Oracle. All rights reserved. SQL> Connected to an idle instance. SQL> ASM instance started Total System Global Area 283930624 bytes Fixed Size 2158992 bytes Variable Size 256605808 bytes ASM Cache 25165824 bytes ASM diskgroups mounted SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options /u01/app/oracle/product/11.1.0/db_1/bin/dbstart: ASM instance "+ASM" warm started."Failure 1 contacting Cluster Synchronization Services daemon" log entry is OK because ASM instance has to wait until /etc/init.d/init.cssd comes alive. If this is too long (or timeout occur with message "logger: Timed out waiting to start ASM instance +ASM") then change in dbora SLEEP_TIMER value.
Install Oracle 11.1.0.7 database with ASM
This part is not covered here because this step is really well documented around net and if you come to this point then no problem will exist installing 11.1.0.7 Oracle database.The End
As always, errors may arise in this post as well. So if you spot it, please let me know so I can change it.Hope this helps someone ...
Cheers!