1. Modify core operating system parameters
Perform the following steps under the root user:
1) modify the user's shell restrictions and modify the/etc/security/limits. conf file
Enter the command VI/etc/security/limits. conf, press the I key to enter the editing mode, and add the following content to the file.
oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536
After editing, Press ESC and enter ": WQ" to save the disk and exit.
2) 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.sosession required pam_limits.so
After editing, Press ESC and enter ": WQ" to save the disk and exit.
3) modify the Linux kernel, modify 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 = 6815744fs.aio-max-nr = 1048576kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 4194304net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576
After editing, Press ESC and enter ": WQ" to save the disk and exit.
4) to make the/etc/sysctl. conf change take effect immediately, run the following command. Input: sysctl-P:
linux:~ # sysctl -pnet.ipv4.icmp_echo_ignore_broadcasts = 1net.ipv4.conf.all.rp_filter = 1fs.file-max = 6815744fs.aio-max-nr = 1048576kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 4194304net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576
5) edit/etc/profile, 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" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi
After editing, Press ESC and enter ": WQ" to save the disk and exit.
6) Create related users and groups as owners of software installation and support groups.
Create a user and enter the following command:
groupadd oinstallgroupadd 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.
7) Create a database software directory, a data file storage directory, and a directory location based on your needs. Pay attention to the disk space. Here I will put it under the Oracle user, for example:
Enter the following command:
mkdir /home/oracle/appmkdir /home/oracle/app/oraclemkdir /home/oracle/app/oradatamkdir /home/oracle/app/oracle/ product
8) change the directory owner to be owned by an oracle user and enter the following command:
Chown-r ORACLE: oinstall/home/Oracle/APP
9) configure the environment variables of oracle users. First, switch to the newly created Oracle user,
Input: su-Oracle, and then directly enter: vi. bash_profile
Press I to edit. bash_profile, enter the editing mode, and add the following content:
umask 022export ORACLE_BASE=/home/oracle/appexport ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1export ORACLE_SID=orclexport PATH=$PATH:$HOME/bin:$ORACLE_HOME/binexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
After editing, Press ESC and enter ": WQ" to save the disk and exit.
Installation Process
1) After all the required operations are completed, log out of the system and log in as an oracle user on the graphic interface. First, copy the downloaded Oracle Installation Package to Linux. We recommend that you use xmanager or other ftp tools.
Open a terminal and run the unzip command to decompress the Oracle Installation File, for example:
Enter the following command:
Unzip linux.x64_11gr2_database_1of2.zip
Unzip linux.x64_11gr2_database5of2.zip
After decompression, the CD enters the decompressed directory database.
Enter the following command:
CD database
Run the LS command to view the files contained in the decompressed database, for example:
2) execute the installation and enter the command:./runinstaller
After installing this step, we can see that many rpm packages are not available. We can find the missing packages from the Linux installation CD or ISO and upload them to Linux using FTP, then run rpm-ivh xxx. rpm-nodeps-force is used for installation (add-nodeps-force to force installation, and directly use rpm-ivh xxx. if the RPM installation fails, the installation process is omitted.
When all the packages are installed, execute installation process 2 in the Oracle graphical interface again. Then, the installation will pass the Environment check.
After the installation is complete, the system prompts you to use the root permission to execute two shell scripts. Locate the location according to the prompted path, for example, in/home/Oracle/APP/Oracle/product/11.2.0/dbhome_1/root. Sh.
And/home/Oracle/APP/orainventory/orainstroot. Sh to open a new terminal, enter the command:
Su-Root
CD/home/Oracle/APP/Oracle/product/11.2.0/dbhome_1
Sh root. Sh
CD/home/Oracle/APP/orainventory
Sh orainstroot. Sh
Database creation
1) in Oracle user graphical interface (GUI), a new terminal is opened. The following interface is displayed when you directly enter the command dbca. Here we use a custom database.
Enter the unified password (you can also set the password separately)
Database storage location, which is used by default here
Quick Recovery and archiving are not specified.
Remove uncommon modules
Memory Allocation and specified Character Set
After a long wait, when you see this interface, the Oracle database creation is complete.
You can use sqlplus to check whether a new command window is opened, enter sqlplus, and then enter the user name and password. If you can test the window, we will not introduce it too much here.