The below was carried out on VirtualBox
Note: Second Attempt can be found below...
First Attempt
Install
1) First, we must get the source:: OracleLinux-R6-U10-Server-x86_64-dvd.iso
wget home.d..../oracle/OracleLinux-R7-U9-Server-x86_64-dvd.iso
2) Install the pre installation suite: yum install -y oracle-rdbms-server-11gR2-preinstall
3) Install net-tools and wget if required.
yum install net-tools
yum install wget
4) Download the following files:
wget home.d..../oracle/V17530-01_1of2.zip
wget home.d..../oracle/V17530-01_2of2.zip
5) Unzip the installation files;
unzip V17530-01_1of2.zip
unzip V17530-01_2of2.zip
6) Create DATA directory;
mkdir /var/DATA
chmod 777 /var/DATA
7) Change the file ownership to oracle
chown -R oracle:oinstall ./database
8) Move database directory to /var/DATA
mv database /var/DATA/
9) Change the oracle user password: passwd oracle
10) Run the following:
mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
12) Log out and back in as oracle and run the installer:
cd /var/DATA/database
./runInstaller -ignoreSysPrereqs (optional) ./runInstaller -ignoreSysPrereqs
13) Add the following to .bash_profile, the logout and back in or source ~/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=ORCL # Change ORCL to your database SID if different
export PATH=$PATH:$ORACLE_HOME/bin
14) To check the status do lsnrctl status
15) To connect, do sqlplus / as sysdba
16) to start and stop, do lsnrctl start and lsnrctl stop
Database testing and basics
Import Database
1) Copy and unzip the FULLDB.DMP file to the server, then do:
chown oracle:oinstall /var/DATA/FULLDB.DMP
chmod 666 /var/DATA/FULLDB.DMP
chmod 777 /var/DATA
2) Log in to the Oracle database; sqlplus / as sysdba and run the following to create a directory;
CREATE OR REPLACE DIRECTORY MY_DATA_DIR AS '/var/DATA';
GRANT READ, WRITE ON DIRECTORY MY_DATA_DIR TO system;
GRANT READ, WRITE ON DIRECTORY MY_DATA_DIR TO PUBLIC;
3) Verify the directory exists in the database catalog;
SELECT directory_name, directory_path FROM dba_directories WHERE directory_name = 'MY_DATA_DIR';
4) Import the data as follows:
impdp system/password@orcl DIRECTORY=MY_DATA_DIR DUMPFILE=FULLDB.DMP FULL=Y LOGFILE=fulldb_import.log
Note: password will be the password used when installing the database software, not the oracle user password.
UPDATE: The above (step 4) resulted in user missing errors, so...
4a) The following creates a text sql file from the dump file;
impdp system/password@orcl DIRECTORY=MY_DATA_DIR DUMPFILE=FULLDB.DMP FULL=Y SQLFILE=dump_metadata.sql
Second Attempt
Install
1) First, we must get the source:: OracleLinux-R6-U10-Server-x86_64-dvd.iso
and complete basic Linux installation, then do yum install -y oracle-rdbms-server-11gR2-preinstall
2) Create Installation Directories and Set Permissions
mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
3) Create DATA directory;
mkdir /var/DATA/
chmod 777 /var/DATA
mkdir /var/DATA/ORACLE
chmod -R 775 /var/DATA/ORACLE
chown -R oracle:oinstall /var/DATA/ORACLE
4) Setup user;
su - oracle
vim ~/.bash_profile and add the following;
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
then source ~/.bash_profile
5) Download the following files into /var/DATA:
wget home.d..../oracle/V17530-01_1of2.zip
wget home.d..../oracle/V17530-01_2of2.zip
6) Unzip the installation files;
unzip V17530-01_1of2.zip
unzip V17530-01_2of2.zip
which should create a database directory, then cd into this directory and run the installer ./runInstaller which ideally should be done in the desktop environment. Click through the pages of options and then pray to your God.
7) Run the installer
cd database
./runInstaller
No comments:
Post a Comment
Note: only a member of this blog may post a comment.