Odi's astoundingly incomplete notes
New entries | CodeInstalling Oracle 11g on x86_64 Gentoo
The normal quick install guide applies. Additionally:
Oracle needs some 32bit versions of packages. So we need to use the abi_x86_32 USE flag on some packages.
Set USE flags in
1. emerge the following packages:
4.
5. /etc/sysctl.conf: Always overcommit seems to be the only working solution with dozens of GB SGA.
6. If remote installing:
7. On link errors during install (or during copying files in a different shell if you are quick), edit
In
8. Disable password expiry
9. Enable automatic startup in
10. Add an init script
See also Gentoo forum entry.
Oracle needs some 32bit versions of packages. So we need to use the abi_x86_32 USE flag on some packages.
Set USE flags in
/etc/portage/package.use
:
- dev-libs/libaio abi_x86_32
/etc/portage/package.keywords
:
- =app-shells/ksh-93.20140606
1. emerge the following packages:
- ksh
- rpm
- xdpyinfo
- libaio
- sysstat
- elfutils
- ln -s /usr/bin/rpm /bin/rpm
- ln -s /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.5/libgcc_s.so.1 /lib64/libgcc_s.so.1
- ln -s /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.5/libstdc++.so.6 /usr/lib/libstdc++.so.6
- ln -s /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.5/32/libgcc_s.so.1 /lib32/libgcc_s.so.1
- ln -s /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.5/32/libstdc++.so.6 /usr/lib32/libstdc++.so.6
/bin/gcc
wrapper script:
#!/bin/bash if [ "$1" = "-m32" ]; then /usr/bin/gcc -L/usr/lib32 $* else /usr/bin/gcc $* fiand make it executable:
chmod 755 /bin/gcc
4.
/dev/shm
mount options need to be default and the size needs to be set to accomodate your SGA. NB that more shm is required than the size of your SGA. This seems to be due to busg in Oracle. The required additional space can be a lot. To be safe, just set it to all available memory:/etc/fstab
:shm /dev/shm tmpfs defaults,size=64g 0 0Then:
mount -o remount,defaults,size=64g /dev/shm
5. /etc/sysctl.conf: Always overcommit seems to be the only working solution with dozens of GB SGA.
# there is no swap really vm.swappiness=0 # 0: default overcommit # 1: always overcommit # 2: never overcommit. max = swap + ratio% * RAM vm.overcommit_memory=1 # commit limit = (swap + ratio% * RAM) vm.overcommit_ratio=100 # Oracle fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 5368709120 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 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 = 1048586Then
sysctl -p
6. If remote installing:
- /etc/ssh/sshd_config: X11Forwarding yes
- use
ssh -Y user@host
./runInstaller -ignoreSysPrereqs
7. On link errors during install (or during copying files in a different shell if you are quick), edit
$ORACLE_HOME/lib/sysliblist
and add -lrt
In
$ORACLE_HOME/sysman/lib
run manually make -f ins_emagent.mk "agent"
then copy the last failed gcc commandline and add -lnnz11
and execute it. Hit the Retry button.8. Disable password expiry
9. Enable automatic startup in
/etc/oratab
by setting the last column to Y
.10. Add an init script
/etc/init.d/oracle
:
#!/sbin/runscript depend() { need net logger hostname clock after sshd } start() { ebegin "Oracle" cat <<-"EOF"|su - ${ORACLE_OWNER:-oracle} lsnrctl start dbstart emctl start dbconsole EOF eend $? } stop() { ebegin "Oracle" cat <<-"EOF"|su - ${ORACLE_OWNER:-oracle} emctl stop dbconsole dbshut lsnrctl stop EOF eend $? }11. If running without swap, make sure to size the SGA appropriately.
See also Gentoo forum entry.
Add comment