ZENworks Linux Management (ZLM) requires either a PostgreSQL or Oracle database for storing ZENworks-related data. This Appnote explains how to extend the oracle schema to configure the ZLM server with Oracle database. It also describes how to set up Oracle database on SLES9x server.
2: Installation of ZLM
- Refer to this section of the documentation for information about installing ZLM server on any given server.
Ensure the ZLM installation is successful on the server.
- Make sure that the following Oracle drivers are installed on the above ZLM server.
Download the Oracle drivers from here.
3: Oracle 9i R2 (184.108.40.206) Installation Procedure on Linux (SLES9x)
The following procedure helps you to set up Oracle 9i on a SLES9x server.
- Download the following gunzip files from here.
- Download the latest orarun.rpm from here.
- Ensure gcc packages are installed on the server.
3.2: Pre-installation steps
- Copy the latest orarun.rpm package to the linux machine and run the rpm as root user.
rpm ?i /root/orarun.rpm
- Edit the file /etc/passwd. For the "oracle" user, change the shell value from /bin/false to /bin/bash
- Set new password for the user "oracle" using /usr/bin/passwd oracle.
- Run /usr/sbin/rcoracle start to set the kernel parameters.
- Get the software downloaded from the web (Prerequisite.1). Copy them to /opt/oracle directory and do the following:
- Run the following command to create the cpio files:
gunzip <file name>
- Run the following cpio command command to create three directories - Disk1,Disk2, Disk3.
cpio ?idmv < <filename>
- Login to linux as oracle user and check if the following two environment variables are set. These are set by the orarun.rpm.
- $ echo $LD_ASSUME_KERNEL
- $ echo $LD_PRELOAD
If echo displays the value then the variables are set. Otherwise, export these variables for the "oracle" user.
3.3: Installation steps
- Login as "oracle" user.
- Run Oracle Installer from Disk1 directory:
- Click "Next" and proceed as instructed by the installer in all the screens except for the screens shown below.
- Enter the Unix group name as "dba" in the following screen
- For ZLM, enter "orcl" as value for Global database name and SID. The product expects them to have same value.
- Click on "Exit" and exit from the install once it is done.
- Login as "oracle" user. Run "echo $ORACLE_SID" and check the value returned.
- If the value returned is "orcl" move on to next step. Otherwise "vi /etc/profile" and insert the following to the file and save.
- Export ORACLE_SID
Log off and login as "oracle" user for the changes to take effect.
- Check if the file "initorcl.ora" is present in "/opt/oracle/products/9ir2/dbs". This file is necessary for Oracle to start.
- If the file is not present in the above path, copy the file
"initorcl.ora.<some number>" from "/opt/oracle/admin/orcl/pfile" to the "/opt/oracle/products/9ir2/dbs" and rename it to "initorcl.ora".
3.5: Login as Oracle user
- Login as "oracle" user.
- Type "sqlplus /nolog"
- On sql prompt type the following:
connect / as sysdba
- startup (to start the oracle instance that would mount the orcl db)
- shutdown immediate
4: Extending Schema
Use the following steps to extend the schema on the Oracle Server before running zlm-config.
- After bringing up the Oracle database, create the following directory structures on the Oracle server:
- Change the group by using the command
chown -R oracle:root /opt/oracle/novell/zenworks/database
- Copy the oracle initialization file from ZLM server
(/opt/novell/zenworks/share/datamodel/linux-init-oracle.ora) to /opt/oracle/novell/zenworks/database folder
- Copy linux-createdb-oracle.sql from ZLM server
(/opt/novell/zenworks/share/datamodel/linux-createdb-oracle.sql )to $HOME/schema
- Launch SQLPLUS and at the prompt, connect as sysdba and shutdown previous instance by typing:
- connect / as sysdba;
- shutdown immediate;
- Here are modifications to the scripts, if the above assumption/default settings need to be modified.
- If you need to modify the default database name and user,
then please refer in this file, to the section on Default Database Name and modify the same, as well as the db_name parameter in linux-init-oracle.ora
- If you need to modify the default user and password, then please refer in this file to the section on Default user and modify the same.
- If you need to change the directory structure, then please modify in this file all references to /opt/oracle/novell/zenworks/database in this file and linux-init-oracle.ora. Also, you will need to create the new directory structure and place the linux-init-oracle.ora appropriately.
- If you need to bypass the zlm install for creating the schema into the database,
Copy these sql files from zlm server from /opt/novell/zenworks/share/datamodel
to a folder $HOME/schema on Oracle server
Uncomment the above line in the linux-createdb-oracle.sql and save the file.
- Enter the following command to create the database and wait till the database gets created.
- Start the database with the following commands whenever the db is shutdown:
connect / as sysdba;
- Login as oracle and start the listener
- Run zlm-config on the ZLM server and provide the required information to configuration with Oracle database.
5: Troubleshooting Tips
Following are some of the common problems faced while setting up Oracle on a Linux server.
- Error: ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Solution : Check if the oracle engine is running. Otherwise, start the engine .
Type "startup" in the sql prompt
- Issue : Not able to run any scripts
Solution : check if the "oracle" user has the necessary rights and permissions for the files/folders.
At this point you have setup Oracle on a Linux server and configured ZENworks Linux Management to store data in an Oracle database.
For additional information, consult the ZENworks Linux Management documentation.
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.