Preparing the operating system for installation. Software packages that are required while installing Linux (first check to see whether the server’s BIOS has the latest firmware).
Desktop Environment |
|
Applications |
|
Development |
|
Servers |
|
Base System |
|
Gerekli RPM’ ler |
|
Once the CD/DVD has been inserted into the drive, the command shown below starts installation
1 |
rpm –Uvh compat-db-4.2.52-5.1.i386.rpm sysstat-7.0.2-3.el5.i386.rpm libaio-devel-0.3.106-5.i386.rpm libXp-1.0.0-8.1.el5.i386.rpm |
Both x86 and 64bit versions of libXp need to be loaded on 64bit systems.
The “yum” tool on licensed versions of RHEL can be used to install any missing packages.
If using an unlicensed version if the (open source) yum package manager has been installed, required packages can be accessed by adding this repository
1 |
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm |
1 |
Yum install package_name |
Various Settings
The commands below: Checks to see whether the default Linux firewall is active. If it is active we shut it down and stop it automatically starting upon system boot-up. (“systemctl” command should be used on RHEL 7)
1 2 3 4 5 6 7 8 9 |
service iptables status firewall To check to see if the firewall is active service iptables stop Shuts down the firewall chkconfig --list |grep iptables Checks its status n startup chkconfig iptables off Shuts it down chkconfig --level 345 iptables off Switches off startup modes 3, 4 and 5 |
To send the Oracle setup files from a Windows environment to a Linux system we can use the freely available WinSCP (www.winscp.net) utility.
In order to use WinSCP, the SSH service needs to be running and iptables needs to be configured to accept requests from TCP port 22. However an easier, and less safe way, to transfer the files would be to shutdown iptables as shown in the above syntax.
1 |
[root@rhel ~]#echo "rhel4" > /etc/redhat-release alternatively |
1 |
$sh runInstaller -ignoreSysPrereqs (Prevents version and other controls. Care should be taken when using this parameter in a development environment. https://support.oracle.com -> .) |
Alternatively, connect to the server using PuTTY or any other SSH client.
To connect as a root user, in the /etc/ssh/sshd_config directory.
1 |
PermitRootLogin yes < configure as shown |
Creating the groups that are required for Oracle:
1 2 3 4 5 |
[root@rhel ~]#groupadd oinstall [root@rhel ~]#groupadd dba [root@rhel ~]#groupadd oper |
First, create an Oracle user and change their password using oinstall
1 2 3 |
useradd -g oinstall -G dba oracle [root@rhel ~]#passwd oracle |
After entering the command, the dbms will prompt you to enter a password twice. (On a Unix system the passwords are masked.)
Enter the following values or change the current ones in the /etc/sysctl.conf file.
# Controls the maximum number of shared memory segments, in pages
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 net.ipv4.tcp_wmem = 262144 262144 262144 net.ipv4.tcp_rmem = 4194304 4194304 4194304 [root@rhel ~]#/sbin/sysctl -p |
The changes get activated by the command on line 15.
Enter the lines in the code show below into the /etc/security/limits.conf file.
There are 2 ways of doing this: By opening and manually changing the limits.conf file, alternatively by using the ‘cat’ syntax as a root user in the terminal.
1 2 3 4 5 6 7 |
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 |
Making directories to install Oracle
It is recommended that Oracle and Datafiles are kept in separate physical disks, in fact for optimal performance keep datafiles, archivelogs, redo logs in separate physical disks. If there aren’t enough physical disks available, prioritizing the storage of the index tablespace’s datafiles would increase performance.
The disk count and RAID architecture varies according to the volume of data and service life of the database.
In our example, the disk architecture and mountable directories are as shown in this diagram.
Data | Mount Point |
OS | / |
Oracle | /u01 |
Datafile | /u01/app/oracle/ < The enclosed oradata directory |
Index Datafile | /u02 (creates the IndexData/SID_Name folders) |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@rhel Server]# fdisk -l Disk /dev/sda: 16.1 GB, 16106127360 bytes 255 heads, 63 sectors/track, 1958 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 1958 15623212+ 8e Linux LVM |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@rhel ~]# sfdisk -l Disk /dev/sda: 1958 cylinders, 255 heads, 63 sectors/trackUnits = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sda1 * 0+ 12 13- 104391 83 Linux /dev/sda2 13 1957 1945 15623212+ 8e Linux LVM /dev/sda3 0 - 0 0 0 Empty /dev/sda4 0 - 0 0 0 Empty |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@rhel ~]# /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 |
We configure the system after having added 8 disks, 2 x RAID 1 and 1 x RAID 10.
(As this is a test environment 2 x 5Gb disks have been used for RAID 1, a single 10Gb disk was used for RAID 10).
To check:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
[root@rhel ~]# fdisk -l Disk /dev/sda: 16.1 GB, 16106127360 bytes 255 heads, 63 sectors/track, 1958 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 1958 15623212+ 8e Linux LVM Disk /dev/sdb: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdb doesn't contain a valid partition table Disk /dev/sdc: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table Disk /dev/sdd: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdd doesn't contain a valid partition table |
Once its clear that the disks have been recognized by the system; We create partitions and mount them on to the system & check to see if they have been mounted permanently by restarting.
1 |
[root@rhel ~]#fdisk /dev/sdb « This command starts the fdisk Linux utility |
m : « Loads the help menu
n : « Used to start a new partition
p : « Configures the new partition as a primary partition. Enter “1” as the partition number, “1” for the cylinder (it is “1” by default anyway). The default last cylinder value is the last cylinder number, just press Enter.
P : « Checks to see whether the operations have been successful.
w : « Once confirmed “w” or write saves the changes to disk.
1 |
mkfs.ext3 /dev/sdx ile ext3 formati atilir. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@rhel ~]# fdisk -l Disk /dev/sda: 16.1 GB, 16106127360 bytes 255 heads, 63 sectors/track, 1958 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda2 14 1958 15623212+ 8e Linux LVM Disk /dev/sdb: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdb doesn't contain a valid partition table Disk /dev/sdc: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdc doesn't contain a valid partition table Disk /dev/sdd: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdd doesn't contain a valid partition table |
To mount.
1 |
[root@rhel ~]#mount –t ext3 /dev/sdc /u01 |
The previous commant mounts the disk, however we would need to run the same command whenever the system starts.
By configuring /etc/fstab as shown below, the system would automatically mount the disk upon boot up.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[root@rhel ~]# 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/sdc /u01 ext3 defaults 1 2 /dev/sdb /u01/app/oracle/oradata ext3 defaults 1 2 /dev/sdd /u02 ext3 defaults 1 2 /dev/VolGroup00/LogVol01 swap swap defaults 0 0 |
1 2 3 4 5 |
[root@rhel ~]# mount /dev/sdb [root@rhel ~]# mount /dev/sdc [root@rhel ~]# mount /dev/sdd |
To check.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@rhel /]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 12G 3.4G 8.1G 30% / /dev/sda1 99M 13M 81M 14% /boot tmpfs 643M 0 643M 0% /dev/shm /dev/sdc 5.0G 139M 4.6G 3% /u01 /dev/sdb 9.9G 151M 9.2G 2% /u01/app/oracle/oradata /dev/sdd 5.0G 139M 4.6G 3% /u02 |
1 2 3 4 5 6 7 |
[root@rhel ~]#mkdir -p /u01/app/oracle/product/10.2.0/db_1 [root@rhel ~]#mkdir -p /u02/IndexData [root@rhel ~]#chown -R oracle.oinstall /u01 [root@rhel ~]#chown -R oracle.oinstall /u02 |
The -R option operates recursively on file systems. It allows ownership over the directories and files shown below.
The -p parameter creates the folder if there isn’t one.
1 2 3 |
[root@rhel /]# mkdir /Downloads/tmp [root@rhel /]# chown -R oracle:dba /Downloads/tmp |
The following lines should be entered into /home/oracle/.bash_profile to automatically enter Oracle directory paths and user environment variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<span style="font-size: 0.9em; line-height: 1.3em;">ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE</span> ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME ORACLE_SID=smp; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib/oracle/10.2.0.4/client/lib/; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:/opt/SDK1/jdk/; export CLASSPA JAVA_HOME=/opt/SDK1/jdk/; export JAVA_HOME PATH=$PATH:/opt/SDK1/jdk/bin;export PATH NLS_LANG=TURKISH_TURKEY.WE8ISO8859P9; export NLS_LANG |
1 2 3 |
[root@rhel ~]#su « uses Oracle to switch to an Oracle User [root@rhel ~]#source ~/.bash_profile « Ensures that the changes made to the profile file are activated. |
The previous syntax activates the environment variables. Logging in as an Oracle user validates the settings.
Change paths to the directory that contains the installation files and open the zipped file.
As required by the type of archive containing the source code:
1 2 3 4 5 |
[root@rhel /]# gunzip file_name.gz [root@rhel /]# cpio -idmv < file_name.cpio [root@rhel /]# unzip –d file_name.zip |
Logging off as the root user and the logging back on as an Oracle user.
1 |
[oracle@rhel ~]$./runInstaller « Used to load the installer. |
This example describes the steps in making a database. The recommended sequence of installation would first be to install Oracle, followed by its patches and creating the database last.
(The options circled in red in the images below, would only setup Oracle DBMS. The database itself could be created afterwards.)
In this example we have created the database during the installation process, however it is recommended that creating the database is left until the final stage.
Assuming that only the application was installed, we can continue by first creating a Listener. The netca command loads the “network configuration assistant”.
At this stage the Listener is running.
Entering the dbca command loads the Database Configuration Assistant, that creates the database. (Alternatively the database can be created using the command prompt, for further details please read the creating a database manually article.)
Finding an SQL...
13 March 2019