1. installation environment:
Linux: Redhat Enterprise Linux 6.3 64-bit
Oracle: Oracle Database 11 GB for Linux x86-64 64-bit
2. Modify core operating system parameters
Perform the following steps under the Root user:
- Modify the user's SHELL restrictions and modify the/etccuritymits. conf file.
Enter the command vi/etccuritymits. conf, press the I key to enter the editing mode, and add the following content to the file.
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
After editing, Press Esc and enter ": wq" to save the disk and exit.
- Modify the/etc/pam. d/login file
Enter the command vi/etc/pam. d/login, press the I key to enter the editing mode, and add the following content to the file.
Session required/lib/security/pam_limits.so
Session required pam_limits.so
After editing, Press Esc and enter ": wq" to save the disk and exit.
- Modify the Linux kernel and the/etc/sysctl. conf file.
Enter the command vi/etc/sysctl. conf, press the I key to enter the editing mode, and add the following content to the file.
Fs. file-max = 6815744
Fs. aio-max-nr = 1048576
Kernel. shmall = 2097152
Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Net. ipv4.ip _ local_port_range = 9000 65500
Net. core. rmem_default = 4194304
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048576
After editing, Press Esc and enter ": wq" to save the disk and exit.
- Input: sysctl-p, which takes effect immediately after sysctl. conf is modified.
- Edit the/etc/profile file
Enter the command vi/etc/profile, press the I key to enter the editing mode, and add the following content to the file.
If [$ USER = "oracle"]; then
If [$ SHELL = "/bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
After editing, Press Esc and enter ": wq" to save the disk and exit.
- Generally, the host name has been set for the system during system installation. If no host name is set, you can edit it in the/etc/sysconfig/network file.
For example:
Enter the command vi/etc/hosts, press the I key to enter the editing mode, and edit the file.
The host name after installing Oracle will be the host name you set.
3. Create corresponding users and user groups
- Create a user and enter the following command:
Groupadd oinstall
Groupadd dba
- Create an Oracle user and password, and enter the following command:
Useradd-g oinstall-g dba-m oracle
Passwd oracle
The password will be entered twice, but the password must be consistent. Press enter to confirm.
- Create a database software directory and a data file storage directory. The directory location depends on your situation.
Mkdir/home/u01
Mkdir/home/u01/oracle/app
Mkdir/home/u01/oracle/app/oracle
Mkdir/home/u01/oracle/app/oracle/product
Mkdir/data/oradata
This/data is the disk mount point.
- Change the directory owner to Oracle user. Enter the following command:
Chown-R oracle: oinstall/home/u01/oracle/
Chown-R oracle: oinstall/data/oradata
- Configure oracle user environment variables
Enter su-oracle and press vi. bash_profile to enter the editing mode and add the following content to the file.
Umask 022 export ORACLE_BASE =/home/u01/oracle/app
Export ORACLE_HOME = $ ORACLE_BASE/oracle/product/11.2.0home _ 1 export ORACLE_SID = orcl export PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin
Export LD_LIBRARY_PATH = $ ORACLE_HOMEb:/usrb after editing, Press Esc and enter ": wq" to log out. 4. Start Oracle database installation.
- After the preceding settings are complete, switch to the Oracle user graphical interface and copy the downloaded Oracle database file to the system. Here I use the pscp tool for file transmission.
The puttyfile package contains the pscp tool, which is slow for wireless networks.
- After decompression, the./runInstaller script has insufficient permissions because the file permission has been changed after being copied from windows.
- Chmod-R 755 database/, the permission for the database file is changed to: 755.
- Garbled characters may occur during the installation process. Enter export LANG = en_US to switch to the English version. Then install.
- Run the installation command:./runInstaller
- Select installation options
Create and configure a database
Server class
Single instance database installation
- Select installation method
Advanced install
- Select the installation Language
Select English and simplified Chinese as needed.
- Select the installation version
Enterprise Edition
- Select the installation path
Select/home/u01/oracle/app/oracle as needed.
- Select the installation type
General Purpose
- Enter the global database name
Simplified Chinese ZHS16GBK
- Select the path for creating a database
- By checking the installation conditions, some packages are usually missing and put under a file for uniform installation. rpm-ivh *. rpm -- nodeps -- force (root User)
- Error in invoking target 'mkldflags ntcontab. o nnfgt. o' of makefile'.../ins_net_client.mk '-- 68% Error may occur during the installation of the 64-bit RedHat system.
The reason is that the gcc package is not fully installed. Install the tool in sequence. (Rpm-ivh XXX. rpm -- nodeps -- force)
Glibc-common-2.12-1.80.el6.x86_64.rpm
Kernel-headers-2.6.32-279.el6.x86_64.rpm
Libgcc-4.4.6-4.el6.x86_64.rpm
Glibc-2.12-1.80.el6.x86_64.rpm
Libgomp-4.4.6-4.el6.x86_64.rpm
Nscd-2.12-1.80.el6.x86_64.rpm
Glibc-headers-2.12-1.80.el6.x86_64.rpm
Glibc-devel-2.12-1.80.el6.x86_64.rpm
Mpfr-2.4.1-6.el6.x86_64.rpm
Ppl-0.10.2-11.el6.x86_64.rpm
Cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
Cpp-4.4.6-4.el6.x86_64.rpm
Gcc-4.4.6-4.el6.x86_64.rpm
NOTE: If gcc is installed, the software installation sequence cannot be incorrect.
Libstdc ++-4.4.6-4. el6.x86 _ 64.rpm
Libstdc +-devel-4.4.6-4.el6.x86_64.rpm
Gcc-c ++-4.4.6-4. el6.x86 _ 64.rpm
Note: The above is the installation of gcc-c ++
- After the installation is complete, some installation configurations such as EM and database instances are prompted.
The system will prompt you to use the root permission to execute two shell scripts.
Switch to the root user and enter sh/home/u01/oracle/app/oracle/product/11.2.0/dbhome_1/root. sh.
Sh/home/u01/oracle/app/oraInventory/orainstRoot. sh
- Automatically Start Oracle database upon startup
Log On As an oracle user and open the "$ ORACLE_HOME/bin/dbstart" file.
Line
ORACLE_HOME_LISTNER = $1
Modify
ORACLE_HOME_LISTNER = $ ORACLE_HOME
- Make the startup script take effect
Log On As an oracle user and open the "/etc/oratab" file.
Set:
Orcl:/home/u01/oracle/app/oracle/product/11.2.0/dbhome_1: N
Modify:
Orcl:/home/u01/oracle/app/oracle/product/11.2.0/dbhome_1: Y
- Configure Oracle to start automatically
Log on as a root user, open the "/etc/rc. d/rc. local" file, and add the following lines at the end of the file:
Su-oracle-c 'dbstart'
Su-oracle-c 'lsnrctl start'
Su-oracle-c 'emctl start dbconsole'
Note: If you have installed anti-virus software, you may not be able to use the EM. I have encountered this problem before. The McAfee Anti-Virus Software installed on the server cannot log on to the EM normally and has been loading, at first, I thought it was a problem during the installation process. After the installation was re-installed, I couldn't find many solutions. Later I found it was the McAfee Anti-Virus Software nails service, and there was a problem. Once this service is disabled, EM can be opened normally. After communicating with McAfee engineers, the specific cause is that many files are opened when you log on to EM. As long as McAfee opens a file, it will scan the file for viruses, after excluding all Oracle installation directory exclusion and database storage locations, after the nails service is started, EM can be used normally. McAfee seems to be too performance-consuming, and McAfee's cma and nails services will be directly disabled later.