Oracle is one of the most (if not the most) famous DMBS, in many places you are going to be asked to develop using Oracle for the persistence.
But the installation of oracle is big, and also slow, I have installed Oracle on my Linux box every time I install a fresh Linux Version and its fine, if you don't start the enterprise manager it can moderate on resources, so to resolve the problem I am going to install Oracle 10gR2 on a Ubuntu Server 7.04 on a VMware virtual machine.
I have choose Ubuntu Server because of it size and the package manager that makes install the minimal X requirements easy.
Installation of Ubuntu Server 7.04
I am going to install ubuntu from the ubuntu dvd, this dvd can install a command line system, a sever and the default ubuntu.
change your language hitting F2, and your keyboard with F3, after hitting on the option "Install a server", the installation for the server is console based, the steps are:
- Selection of the language for the installation process
- Selection of a country
- Enter a hostname
- Partition of the disk: you can do this step in 3 ways
- Guided (take all disk)
- Guided and use LVM
- Manual
- After you setup your partition layout the installer ask you about your timezone
- Select if your time its set to UTC or not.
- Enter the full name of the default user, this is not the login name but the full name.
- Enter the login name, the one that you are going to be asked for in the login of the system
- Enter the user password
- Re-enter the user password
- After 7 minutes of software installation, the installer told me that only the base system was installed, that if I want to install ubuntu desktop, lamp server or dns, I didn't choose anything and hit enter
- After the reboot, in the first boot you will need to install x packages to install oracle, I choose fluxbox because of it's size and footprint.
$sudo apt-get install fluxbox xserver-xorg xfonts-base fluxbox xterm
this will give you a very lightweight server - you can start the X environment with startx now.
Installation of Oracle 10gR2
note: this process installation is highly based on Akshay Mehta's tutorial
now it's time for the installation of oracle, but for a perfect installation it will be necessary to do some previous steps:
- update package repository
$sudo apt-get update - install some necesary packages
$sudo apt-get install build-essential libaio rpm lesstif2-dev alien libstdc++6-dev - Create the users and groups oracle needs:
$sudo groupadd oinstall
$sudo groupadd dba
$sudo groupadd nobody
$sudo useradd -g oinstall -G dba,nobody -d /opt/oracle -m -s /bin/bash oracle - Set oracle user’s password
$sudo passwd oracle - Append user oracle’s .bashrc with PATH and ORACLE:BASE,HOME and SID information as oracle user
$sudo su oracle
$nano .bashrc
and append to the file
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10gR2
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin
return to your normal user
$exit - Make sure the correct kernel parmeters are appended to /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000 - Set the kernel parameters or reboot
$sudo /sbin/sysctl -p - Set /etc/security/limits.conf
$sudo nano /etc/security/limits.conf
and append to the file
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536 - Create symbolic links this is because the location of some commands are hard codded on oracle scripts, so ubuntu would look more like an enterprise rpm based distro.
$sudo ln -s /usr/bin/awk /bin/awk
$sudo ln -s /usr/bin/rpm /bin/rpm
$sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so
$sudo ln -s /usr/lib/libstdc++.so.6 /lib/libstdc++.so.5
$sudo ln -s /usr/bin/basename /bin/basename - Mount the Oracle10g CD and run the installer
/runInstaller -ignoreSysPrereqs
note: I have had problems running the installer as another user than oracle, if you have kde installed, you can try with sudo, or start a konsole with kdesudo -u oracle konsole, or log as oracle user and run the installer from there.
Installation of oracle is: next, next, next..... only take care of assign a password when you are prompted to. - Enable the orcl database to start when you call dbstart
$sudo nano /etc/oratab
and change :N to :Y - to start the services as oracle user do:
$dbstart
$lsnrctl start
if you want to start the isqlplus web console do:
$isqlplusctl start
if you want to start the enterprise web console do:
$emctl start dbconsole - remember to stop the services before shut down the machine.
No hay comentarios:
Publicar un comentario