detailed steps
1. Hardware requirements
1、 Memory & swap
Check the memory
2、 hard disk
Since the CentOS installation is almost 4~5G, plus the installation of Oracle, etc., please prepare at least 10G of hard disk space.
Check the disk condition
2. Software
**System platform: **CentOS 6.3(x32)
CentOS-6.3-i386-bin-DVD1.iso
**Oracle version: **Oracle 10g R2
10201_ database_linux32.zip
Three, system installation attention
The desktop mode must be installed when the system is installed, otherwise Oracle cannot be installed. In addition, do not enable SELinux. Oracle officially does not recommend using SELinux. Please temporarily turn off the firewall of CentOS to reduce the trouble during installation. To prevent garbled characters during Oracle installation, it is recommended to use English as the system language to install Oracle. The system commands described in this article, without special signs, are "#" for root authority, and "$" for oracle authority.
4. System preparation before installing Oracle
First of all, please log in as the root account and do some pre-settings first.
1、 Turn off the firewall, disable SELinux
Modify SELINUX=disabled, and then restart. If you do not want to restart the system, use the command setenforce 0
2、 Install dependencies
Installation package required by Oracle official documentation:
Check whether Oracle related packages have been installed:
Use yum to install the required packages:
Finally, you need to install the library libXp, this must be installed, otherwise java Exception will occur when installing Oracle.
3、 Create Oracle users and groups
Only the single-host environment is discussed here, and the configuration of the RAC environment is not considered.
Execute the following commands to add the users and groups required for oracle installation.
(1) Create a group oinstall # groupadd oinstall
(2) Create group dba# groupadd dba
(3) Add user oracle and add it to oinstall and dba groups# useradd -m -g oinstall -G dba oracle
(4) Test whether the oracle account is established # id oracle
(5) Create a new password for oracle# passwd oracle
4、 Add oracle user to sudo group
5、 Configure system kernel parameters
And enter the following:
//Indicates the total amount of shared memory (in pages) that the system can use at one time. The default value is 2097152, usually no need to modify
kernel.shmall = 2097152
//Defines the maximum size of the shared memory segment (in bytes). The default is 32M, for oracle, the default value is too low, usually set to 2
kernel.shmmax = 2147483648
//Used to set the maximum number of shared memory segments in the system. The default value of this parameter is 4096. Usually no need to change
Gkernel.shmmni = 4096
kernel.sem = 250 32000 100 128 //Indicates the set semaphore net.ipv4.ip_local_port_range = 102465000
net.core.rmem_default=4194304 //The default receiving window size net.core.rmem_max=4194304 //The maximum receiving window size net.core.wmem_default=262144 //The default sending window size net.core.wmem_max=262144 / /Maximum size of sending window
After editing: wq save, and then execute: # sysctl -p
Activate the changes just made.
6、 Edit /etc/security/limits.conf
7、 Edit /etc/pam.d/login
8、 Modify /etc/profile
Add the following code to the profile file.
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
9、 Modify Linux release version information
Since CentOS6 was not released when Oracle10g was released, Oracle10g did not confirm support for CentOS6, and the file needs to be modified to allow Oracle10g to support CentOS6.
Edit the /etc/redhat-release file
Change the content of CentOS release 6.3 (Final) to redhat 4
10、 Create Oracle installation folder and data storage folder
11、 Configure Linux host
Check whether there is a localhost record in the /etc/hosts file (point to 127.0.0.1). If not, there will be some problems when configuring Oracle monitoring later, causing the monitoring to be unable to start. Add this record manually here. .
The content is as follows:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
This is the end of the first stage. Next, after completing these settings, please log out of the root account and log in to the system again with the oracle account.
12、 Configure oracle user environment variables
$ cd /home/oracle$ vi .bash_profile modify and add the following
ORACLE_BASE=/opt/oracle //Oracle installation folder created above ORACLE_HOME=
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH
After saving, use the following command to make the setting effective:
$ source /home/oracle/.bash_profile
5. Install Oracle and make related settings
1、 Unzip the installation file
Put the downloaded 10201_database_linux32.zip into the folder /opt/oracle where oracle will be installed, return to terminal mode and enter the oracle folder:
$ cd /opt/oracle
Unzip 10201_database_linux32.zip
$ unzip 10201_database_linux32.zip
Then you will see a series of decompression actions.
=========================================
How to decompress .gz files
tar –zxvf xxx.cpio.gz –C /opt/oracle/
=========================================
**Unzip the 10201_database_linux_x86_64.cpio file **gunzip 10201_database_linux_x86_64.cpio.gzcpio -idmv <10201_database_linux_x86_64.cpio
After decompression, you will see the database folder in the same folder, please enter the database folder:
$ cd database
Prepare to perform database installation. If your centos is in a Chinese environment, Chinese garbled characters will appear during installation, please follow the instructions below
$ export
Then execute
$ ./runInstaller
If you cannot see the installation interface, please use the root account to execute the following commands before running the installation program:
Start the installation procedure............>>>>
Since the related pre-work has been done before, in this step, you only need to select the UNIX DBA Group as dba and enter the database password shared by accounts such as SYS and SYSTEM. Then select Next.
Similarly, select the group as the dba group and press Next
In this step, please click Checking Network Configuration requirements as User Verified, and then click Next
Finally, the Install Summary screen appears. At this time, just press the Install button, and the system will begin installation.
Installation process.......................................>>>>
Database setup assistant, you can select password management here to modify the password. If you don’t need to modify it, just press the ok button.
Before the installation is complete, the following setup script appears:
Open a new terminal and su to root.
The two scripts required to be executed are executed in sequence.
/opt/oracle/oraInventory/orainstRoot.sh/opt/oracle/102/root.sh
The execution screen is as shown above. After execution, return to the installation window and press OK to complete all oracle installation. After installation, the following screen will appear.
At this time, you can enter the following address to test, login account: sys or system
http://CentOS-Oracle:5560/isqlplus
http://CentOS-Oracle:5560/isqlplus/dba
http://CentOS-Oracle:1158/em
The following screens all successfully represent that oracle has been installed normally.
Recommended Posts