Installing Oracle on Ubuntu in the past two days has ruined people. Even if you follow the tutorial on the Internet, there are still many problems. Fortunately, we finally got it done. Write a summary to avoid
Installing Oracle on Ubuntu in the past two days has ruined people. Even if you follow the tutorial on the Internet, there are still many problems. Fortunately, we finally got it done. Write a summary to avoid
Installing Oracle on Ubuntu in the past two days has ruined people. Even if you follow the tutorial on the Internet, there are still many problems. Fortunately, we finally got it done. Write a summary to avoid forgetting it later.
The 32-bit title indicates that almost all online tutorials are based on 64-bit installation. If you follow the instructions in a 32-bit system, the installation will definitely fail.
There are two main problems: one is encountered during the installation process, and the other is after the installation is complete.
Installation Process (the main process is to directly copy others' tutorials) and problems:
1. Update the system to the latest version:
Sudo apt-get update
Sudo apt-get dist-upgrade
2. If Ubuntu is not a desktop version (such as Ubuntu server), you need to install the desktop program because the GUI is required for Oracle installation:
Sudo apt-get install gnome-core
I believe that many of them are using the desktop version, so this step is not required.
3. Install the dependency packages required by Oracle:
Sudo apt-get install automake
Sudo apt-get install autotools-dev
Sudo apt-get install binutils
Sudo apt-get install bzip2
Sudo apt-get install elfutils
Sudo apt-get install expat
Sudo apt-get install gawk
Sudo apt-get install gcc
Sudo apt-get install gcc-multilib
Sudo apt-get install g ++-multilib
Sudo apt-get install ia32-libs
Sudo apt-get install ksh
Sudo apt-get install less
Sudo apt-get install lesstif2
Sudo apt-get install lesstif2-dev
Sudo apt-get install lib32z1
Sudo apt-get install libaio1
Sudo apt-get install libaio-dev
Sudo apt-get install libc6-dev
Sudo apt-get install libc6-dev-i386
Sudo apt-get install libc6-i386
Sudo apt-get install libelf-dev
Sudo apt-get install libltdl-dev
Sudo apt-get install libmotif4
Sudo apt-get install libodbcinstq4-1 libodbcinstq4-1: i386
Sudo apt-get install libpth-dev
Sudo apt-get install libpthread-stubs0
Sudo apt-get install libpthread-stubs0-dev
Sudo apt-get install libstdc ++ 5
Sudo apt-get install lsb-cxx
Sudo apt-get install make
Sudo apt-get install openssh-server
Sudo apt-get install pdksh
Sudo apt-get install rlwrap
Sudo apt-get install rpm
Sudo apt-get install sysstat
Sudo apt-get install unixodbc
Sudo apt-get install unixodbc-dev
Sudo apt-get install unzip
Sudo apt-get install x11-utils
Sudo apt-get install zlibc
Many of them come with Ubuntu, so proceed with caution.
4. Create a user (this step can be omitted and you can directly use the current user. The following installation process is based on the failure to perform this step)
Sudo groupadd oinstall
Sudo groupadd dba
Sudo useradd-g oinstall-G dba-d/opt/oracle-s/bin/bash oracle
Sudo passwd oracle
5. Check System Variables
/Sbin/sysctl-a | grep sem
/Sbin/sysctl-a | grep shm
/Sbin/sysctl-a | grep file-max
/Sbin/sysctl-a | grep aio-max
/Sbin/sysctl-a | grep ip_local_port_range
/Sbin/sysctl-a | grep rmem_default
/Sbin/sysctl-a | grep rmem_max
/Sbin/sysctl-a | grep wmem_default
/Sbin/sysctl-a | grep wmem_max
Then add the corresponding data in/etc/sysctl. conf according to the parameter value obtained in the preceding command, for example:
Fs. aio-max-nr = 1048576
Fs. file-max = 6815744
Kernel. shmall = 20 97152kernel. shmmax = 536870912
Kernel. shmmni = 4096kernel. 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 = 1048586
Run the following command to update the kernel parameters:
Sysctl-p
6. Add the following data in the/etc/security/limits. conf file to the oracle user's kernel restrictions.
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
Oracle is the user created in Step 4. Skip step 4 and write the current user
7. Check/etc/pam. d/login and add the following lines (you don't need to add them if you have them ):
Session required pam_limits.so
Check/etc/pam. d/su as well. Add the following lines as needed:
Session required pam_limits.so
7. Create a required folder (for installing oracle) and set its ownership:
Mkdir-p/opt/oracle
Mkdir-p/opt/oraInventory
Chown-R oracle: oinstall/opt/oracle
Chown-R oracle: oinstall/opt/oraInventory
Similarly, if you skip step 4, change the user oracle and group oinstall in the ownership settings command to your current user and group (usually the two are the same ), of course, you can also choose not to execute these two chown commands. The original directory creator is the owner. In addition, the root permission is required to execute these commands (sudo, the same below)
8. If JRE is not installed on Ubuntu, install JRE (I have installed JDK directly here. Take JDK as an example ):
Download JDK 6 from the Oracle official website (the latest version is 7. For compatibility issues, install JDK 6 ):
Download the jdk-6u45-linux-i586.bin file. Put it in the home directory and enter the terminal:
$ Sudo chmod 777 jdk-6u37-linux-x64.bin // grant run permissions to files
$ Sudo-s./jdk-6u37-linux-x64.bin/usr/lib/jdk // install JDK under the/usr/lib/jdk directory.
Note: After the installation is complete, it may be installed in the main folder. You can use the command to copy all the files to the/usr/lib/jdk directory. (If you do not have the permission, use sudo chmod 777 to obtain the permission and then copy it)
Configure the JDK environment variables, use the editor to open the. bashrc configuration file (hidden) in the main folder, and add the following content to it: