Related references:
http://www.techienote.com/how-to-install-oracle-database-11g-r2-on-ubuntu-12-04/
http://www.linuxidc.com/Linux/2011-12/48931.htm
http://www.cnblogs.com/dyllove98/archive/2013/06/16/3138761.html
http://blog.csdn.net/idber/article/details/9039857
System environment:
64 Ubuntu operating system 12.4.0
sudo apt-get update
sudo apt-get install gcc make binutils gawk x11-utils rpm build-essential libaio1 libaio-dev libmotif4 libtool expat alien ksh pdksh unixODBC unixODBC-dev sysstat elfutils libelf-dev binutils lesstif2 lsb-cxx libstdc++5
sudo ln -sf /bin/bash /bin/sh
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/libc_nonshared.a
sudo ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/libpthread_nonshared.a
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib64/libstdc++.so.6
sudo ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib64/libgcc_s.so.1
sudo addgroup oinstall
sudo addgroup dba
sudo addgroup nobody
sudo usermod -g nobody nobody
sudo useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
sudo mkdir /home/oracle
sudo chown -R oracle:dba /home/oracle
mkdir /etc/rc.d
for i in 0 1 2 3 4 5 6 S
do ln -s /etc/rc
done
Note: Steps 2 and 4 create file links to make Ubuntu’s directory structure consistent with Red Hat (because Oracle officially supports Red Hat but not Ubuntu).
vim /etc/init/rc-sysinit.conf
Set env DEFAULT_RUNLEVEL=2
Change to env DEFAULT_RUNLEVEL=5
Note: After installation, you can modify it back to the original default value 2. You can use the command "runlevel" to view the current run level, or use the command "sudo init 5" to temporarily change the run level to 5.
Add the following line to /etc/sysctl.conf:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
Then execute sudo sysctl -p
Remarks:
fs.file-max --> The maximum number of file handles, indicating the number of files that can be opened in the Linux system, the default is 98063
kernel.shmall --> indicates the total amount of shared memory that the system can use at one time, the default value is 2097152, usually no need to modify
kernel.shmmax --> defines the maximum size of the shared memory segment (in bytes), the default is 32M, for oracle, the default value is too low
kernel.shmmni = 4096 -->(4K) Set the maximum number of shared memory segments system-wide, the default value is 4096, usually do not need to be changed.
kernel.sem --> 4 data respectively correspond to SEMMSL SEMMNS SEMOPM SEMMNI, indicating the set semaphore, the default is 250 32000 32 128 (cat /proc/sys/kernel/sem)
net.core.rmem_default -->The default is 126976
net.core.rmem_max -->The largest TCP data receiving buffer, the default is 131071
net.core.wmem_default -->The default is 126976
net.core.wmem_max --> The largest TCP data sending buffer, the default is 131071
net.ipv4.ip_local_port_range -->ipv4 port value range, the default is 32768 61000
fs.aio-max-nr --> 65536 by default
Add the following lines to /etc/security/limits.conf
oracle soft nproc 2048
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
sudo vim /etc/RedHat-release
The file content is set to the following line to trick the installer into thinking that the system is RedHat:
Red Hat Linux release 4.1
Place the two downloaded installation files in the /home/oracle directory
cd /home/oracle
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
su oracle
cd /home/oracle
chmod 777 -R database
cd database
. /runInstaller -ignoreSysPrereqs
After executing the oracle installation command
The first step is Configure Security Updates, remove I wish to receive security updates via My Oracle Support. Click Next.
The second step is Installation Option. Select Create and configure a database in Selection Installation Option.
The third step is to select Server Class in System Class.
The fourth step is to select Single instance database installation in Grid Selection.
The fifth step is to select Advanced install in Install Type.
Then the language is set, here is English.
Select the version, here select Standard Edition.
Choose the installation path and keep the default here (/home/oracle/app/oracle).
Create Inventory keeps the default.
Select General Purpose / Transaction Processing in Select Configure Type.
Keep the Database Identifier by default.
Configure as follows in Specify Configuration Options:
Memory -> Enable Automatic Memory Management: TRUE
Character sets: Use Unicode (AL32UTF8)
Select the default Use Database Control for database management in Specify Management Options.
Select the default File System in Specify Database Storage Options, and keep the default path.
Backup and Recovery keep the default.
Schema Password sets the password.
Privileged Operating System Groups keep the default, namely:
Database Administrator (OSDBA) Group: dba
Database Operator (OSOPER) Group: oinstall
Then there is Preform Prerequisite Checks. (There may be some errors, don’t bother about them, because we are using Debian system, which is not supported by Oracle official website, so some errors are normal)
Then there is Summary
Encountered an error reference:
http://my.oschina.net/farces/blog/279434
http://lvstone.blog.163.com/blog/static/1773601512012102914439982/
My errors are:
Solution:
sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk
Solution:
sed -i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mk
sed -i 's/^\(ORACLE_LINKLINE.*\$(ORACLE_LINKER)\) \(\$(PL_FLAGS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/rdbms/lib/env_rdbms.mk
sed -i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdksh
sed -i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/ins_srvm.mk
Solution:
vim $ORACLE_HOME/network/lib/ins_net_server.mk
The revised content is:
itnslsnr:
Recommended Posts