Friday, February 1, 2019

How to Configure Automounter AUTOFS to access Windows Share Folder


How to Configure Automounter AUTOFS

Applies to:
            Oracle Enterprise Linux – Version: 7
            Oracle Database 11.2.0.4

Description:
I need to access Windows Shared Folder from Oracle Enterprise Linux 7 through AUTOFS.

Solution:
To configure AUTOFS follow the simple steps:
           
Following two rpm’s required:

yum install autofs -y
yum install cifs-utils -y

mkdir /sep

Edit /etc/auto.master file and add the following line under /misc:
/sep    /etc/auto.sep

Save and exit

Now create or edit /etc/auto.sep file and add the following line:
Backups -fstype=cifs,rw,noperm,user=<username>, pass=<password>://192.168.1.2/<winshare>

Save and exit

<username> = windows user name
<password> = windows password
<winshare> = windows share folder

Service autofs restart

Now try to access your share:

Cd /sep/Backups/

df -h




Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ

Wednesday, January 9, 2019

Error in invoking target agent nmhs of makefile


Error in invoking target agent nmhs of makefile

Applies to:
            Oracle Enterprise Linux – Version: 7
            Oracle Database 11.2.0.4

Description:
After successful installation of Oracle Linux 7, when I start the installation of Oracle Database 11.2.0.4 it is going to hang on 70%, installation log file show the following error:

Exception Name: MakefileException
Exception String: Error in invoking target ‘agent nmhs’ of makefile

Solution:
To fix the above problem follow the simple steps:
           
Edit this file:
-       /d01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk
-       Change the following:
OLD: $(MK_EMAGENT_NMECTL)
NEW: $(MK_EMAGENT_NMECTL) –lnnz11

Restart the Database installation, now it is completed successfully.




Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ

Wednesday, January 2, 2019

How to Change the Boot Sequence of Oracle Linux 7


How to Change the Boot Sequence of Oracle Linux 7

Applies to:
            Oracle Enterprise Linux – Version: 7

Description:
After successful installation of Oracle Linux 7, when I restart the Linux I should select the second option from boot sequence within 3 second to start up the Oracle Linux.

Solution:
            To change the boot sequence in Oracle Linux 7 follow the simple steps:
           
GRUB2 count the menu entries in the configuration file starting at 0 for the first entry.

To display the menu entries that are defined in the configuration file:

[root@khi]# cd /boot/grub2

[root@khi grub2]# grep '^menuentry' /boot/grub2/grub.cfg

menuentry 'Oracle Linux Server (4.1.12-61.1.18.el7uek.x86_64 with Unbreakable Enterprise Kernel) 7.3' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.1.12-61.1.18.el7uek.x86_64-advanced-8898f753-92f7-4919-9b33-a389fbeceae9' {

menuentry 'Oracle Linux Server (3.10.0-514.el7.x86_64 with Linux) 7.3' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-514.el7.x86_64-advanced-8898f753-92f7-4919-9b33-a389fbeceae9' {

menuentry 'Oracle Linux Server (0-rescue-6cd2d0dcb059426f838f676d4963ff2d with Linux) 7.3' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-6cd2d0dcb059426f838f676d4963ff2d-advanced-8898f753-92f7-4919-9b33-a389fbeceae9' {

I need to boot Oracle Linux from second menuentry, to set the second menuentry for default boot execute the following command:

[root@khi grub2]# grub2-set-default 1

You must run the grub2-mkconfig command to re-generate the /boot/grub2/grub.cfg file:

[root@khi grub2]# grub2-mkconfig -o /boot/grub2/grub.cfg




Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ

Wednesday, December 12, 2018

How to Configure Tiger VNC Server on Linux 7

How to Configure Tiger VNC Server on Linux 7

Applies to:
            Oracle Enterprise Linux – Version: 7

Description:
            After successful installation of Oracle Linux 7, I need to configure VNC for remote access.

Solution:
            To configure Tiger VNC server on Oracle Linux 7 follow the simple steps:
           
To check the required rpm’s:
[root@testora ~]# rpm –qa |grep tigervnc

Install tigervnc-server
[root@testora ~]# yum install tigervnc-server –y
             
To create a user for VNC:
[root@testora ~]# adduser vncuser
[root@testora ~]# passwd vncuser
 
[root@testora ~]# su - vncuser
[vncuser@testora ~]$ vncpasswd
Password:
Verify:
[vncuser@testora ~]$ exit
[root@testora ~]#

Copy the following file:
[root@testora ~]# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@\:1.service

Edit the copied file.
[root@testora ~]# vi /etc/systemd/system/vncserver@\:1.service
At the end of the file, you will find the lines like below.

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target

Replace <USER> with your real user, in my case, i replaced with a user called “vncuser”

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l vncuser -c "/usr/bin/vncserver %i"
PIDFile=/home/vncuser/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target

Add TCP Port in Firewall config:
[root@testora ~]# firewall-cmd --permanent --zone=public --add-port=5901/tcp
[root@testora ~]# firewall-cmd --reload

Reload the systemctl daemon as root
[root@testora ~]# systemctl daemon-reload

Start the VNC service as root.
[root@testora ~]# systemctl start vncserver@\:1.service

To check the status of vncserver:
[root@testora ~]# systemctl status vncserver@\:1.service
â vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2018-12-11 10:58:07 PKT; 6s ago
  Process: 9681 ExecStart=/usr/sbin/runuser -l vncuser -c /usr/bin/vncserver %i (code=exited, status=0/SUCCESS)
  Process: 9673 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
 Main PID: 9723 (Xvnc)
   CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
           ⣠9723 /usr/bin/Xvnc :1 -desktop testora.test.org:1 (vncuser)...

Dec 11 10:58:04 testora.test.org systemd[1]: Starting Remote desktop ser...
Dec 11 10:58:07 testora.test.org systemd[1]: Started Remote desktop serv...
Hint: Some lines were ellipsized, use -l to show in full.


Enable it on system startup as root.
[root@testora ~]# systemctl enable vncserver@\:1.service

If the above procedure did not work, do the following:
[root@testora ~]# rm –rf /tmp/.X*-lock
[root@testora ~]# rm –rf /tmp/.X11-unix/X*
[root@testora ~]# systemctl restart vncserver@\:1.service

OR do the following:
[root@testora ~]# vncserver
You will require a password to access your desktops.
Password:
Verify:
xauth:  file /root/.Xauthority does not exist

New 'testora.test.org:1 (root)' desktop is testora.test.org:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/testora.testt.org:1.log

Now you can access your Linux server from any client using VNC Viewer.






Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ

Thursday, November 29, 2018

How to Recreate Oracle Enterprise Manager - Database Control Repository


How to Recreate Oracle Enterprise Manager - Database Control Repository

Applies to:
            Enterprise Linux – Version: 5
            Oracle Database 11gR1
            Oracle EBS R12.1

Description:
            After Cloning of EBS, Oracle Enterprise Manager is not started.

Solution:
            To recreate the Database Control Repository do the following simple steps:
           
            Make sure that the Database environment is properly set.
            To check ORACLE_HOME and ORACLE_SID values properly set:
           
            [oraprod@ebsdev ~]$ echo $ORACLE_HOME
            /d01/oracle/TEST/db/tech_st/11.1.0

            [oraprod@ebsdev ~]$ echo $ORACLE_SID
            TEST
            
[oraprod@ebsdev ~]$ sqlplus / as sysdba
SQL> drop user sysman cascade;
SQL> drop role mgmt_user;
SQL> drop user mgmt_view cascade;
SQL> drop public synonym mgmt_target_blackouts;
SQL> drop public synonym setemviewusercontext;
SQL> drop public synonym mgmt_availability;

SQL> DECLARE
CURSOR c1 IS
SELECT owner, synonym_name name
FROM dba_synonyms
WHERE table_owner = 'SYSMAN';
BEGIN
FOR r1 IN c1 LOOP
IF r1.owner = 'PUBLIC' THEN
EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
ELSE
EXECUTE
IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
END IF;
END LOOP;
END;
/
exit

Remove the following directories:
[oraprod@ebsdev ~]$ rm -rf $ORACLE_HOME/host_sid/
[oraprod@ebsdev ~]$ rm –rf $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_host_sid

  
To create the DB control and repository:

[oraprod@ebsdev ~]$ emca -config dbcontrol db -repos create

STARTED EMCA at Nov 28, 2018 11:38:28 AM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: TEST
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Password for SYSMAN user: Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /d01/oracle/TEST/db/tech_st/11.1.0

Local hostname ................ ebsdev.karachi.org
Listener port number ................ 1521
Database SID ................ TEST
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Nov 28, 2018 11:39:53 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /d01/oracle/TEST/db/tech_st/11.1.0/cfgtoollogs/emca/TEST/emca_2018_11_28_11_38_28.log.
Nov 28, 2018 11:39:54 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Nov 28, 2018 11:47:34 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Nov 28, 2018 11:47:39 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Nov 28, 2018 11:48:24 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Nov 28, 2018 11:48:26 AM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Nov 28, 2018 11:48:26 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Nov 28, 2018 11:48:32 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Nov 28, 2018 11:48:33 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Nov 28, 2018 11:48:43 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Nov 28, 2018 11:48:44 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 28, 2018 11:49:04 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 28, 2018 11:49:05 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://ebsdev.karachi.org:1158/em <<<<<<<<<<<
Nov 28, 2018 11:49:07 AM oracle.sysman.emcp.EMDBPostConfig invoke
***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Nov 28, 2018 11:49:07 AM
[oraprod@ebsdev ~]$ 

Oracle Enterprise Manager is working fine now.

             


Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ


Friday, November 2, 2018

Error Message PRVF-7532 Missing Packages elfutils-libelf-devel and pdksh


Error Message PRVF-7532 Missing Packages elfutils-libelf-devel and pdksh

Applies to:
            Oracle Enterprise Linux – Version: 7 64-bit
            Oracle Database 11gR2 11.2.0.4

Description:
            I am going to install Oracle Database 11gR2 on OEL-7 64-bit but Oracle Universal Installer going to fail with following error messages in installAction.log file:
Error Message: PRVF-7532: Package “elfutils-libelf-devel” is missing
Error Message: PRVF-7532: Package “pdksh” is missing

Solution:
            You can resolved the above issue by following simple steps:
·         Copy the Oracle Database source media from DVD to local Disk <path>/database
·         Go to the path:
cd <path>/database/stage/cvu/cv/admin
·         Backup cvu_config file:
cp cvu_config cvu_config_bak
·         Edit the cvu_config file and change the following line:
CV_ASSUME_DISTID=OEL4
To
CV_ASSUME_DISTID=OEL6
·         Save the cvu_config file
·         cd <path>/database
·         ./runInstaller

Now it is working fine and complete the installation successfully.






Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ



How to Extend Swap space on LVM Disk Linux

How to Extend Swap space on LVM Disk Linux   Applies to:             Oracle Database 12.2             Oracle Linux 7 Description: ...