First, hardware detection
1, Memory detection oracle11g minimum 1GB memory required
Command: grep memtotal/proc/meninfo
2, swap space detection usually swap space is 1.5 times times the memory
Command: grep swaptotal/proc/meninfo
3. Temporary directory/temp Check
Command: Df-k/temp
Second, the configuration process
1. create users and user groups
[Email protected] home]#/usr/sbin/groupadd Oinstall
[[email protected] home]#/usr/sbin/groupadd DBA
To create an Oracle user and password, enter the command:
[Email protected] home]#/usr/sbin/useradd-g oinstall-g dba-m Oracle
[Email protected] home]# passwd Oracle
2. Create database software directory and data file storage directory
Mkdir/home/oracle/app
Mkdir/home/oracle/app/oracle
Mkdir/home/oracle/app/oradata
Mkdir/home/oracle/app/oracle/product
Change directory owner is owned by Oracle user
Chown-r Oracle:oinstall/home/oracle/app
3, modify the user's shell restrictions
Modify the/etc/security/limits.conf file
Input command: vi/etc/security/limits.conf, press I to enter edit mode, add the following content to the file.
Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536
Press ESC when editing is complete and enter ": Wq" to eject
Modify the/etc/pam.d/login file, enter the command: Vi/etc/pam.d/login, press the I key to enter the editing mode, add the following content to the file.
Session required/lib/security/pam_limits.so
Session Required Pam_limits.so
Edit/etc/profile, enter command: Vi/etc/profile, press I to enter edit mode, 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
4, modify the Linux kernel, modify the/etc/sysctl.conf file
Input command: vi/etc/sysctl.conf, press I to enter edit mode, add the following content to the article
Thing
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
To make the/etc/sysctl.conf change take effect immediately, execute the following command
[Email protected] Home]#/sbin/sysctl-p
5. Configuring environment Variables for Oracle users
First, switch to the newly created Oracle user,
Input: Su–oracle, and then directly in the input: Vi. bash_profile
Press I to edit. Bash_profile, enter edit mode to add the following:
Umask 022
Export Oracle_base=/home/oracle/app
Export Oracle_home= $ORACLE _base/oracle/product/11.2.0/dbhome_1
Export ORACLE_SID=ORCL
Export path= $PATH: $HOME/bin: $ORACLE _home/bin
Export Ld_library_path= $ORACLE _home/lib:/usr/lib
Press ESC when editing is complete and enter ": Wq" to eject
Third, install the database
1, when the above system requires the operation of all completed, logout system, in the graphical interface to the Oracle user login.
2. Open a terminal and run the unzip command to extract the Oracle installation files
Enter the command:
Unzip Linux_11gr2_database_1of2.zip
Unzip Linux_11gr2_database_2of2.zip
3, to prevent the occurrence of Chinese garbled execute the following command export lang=en
4, perform the installation, enter the command:./runinstaller
Initial interface:
Choose to install only the database software
Installing a Single Instance
Select language, add Simplified Chinese
Installs the Enterprise Edition, the function is complete
The home directory and the base directory are automatically read according to the environment variables set
Select User Group
Check Package
In this step, you can see that a lot of RPM packages are not available, we can find the missing packages from the CD or ISO installed on Linux, and then use RPM–IVH xxx.rpm--nodeps–force to install them (with--nodeps-Force on behalf of the mandatory Ann Installed in the case of direct use of RPM–IVH xxx.rpm installation is unsuccessful.
Wait until the package is all installed, again in the Oracle graphical interface, the installation process, down in the environmental inspection process, passed.
After the installation is complete, you will be prompted to execute 2 shell scripts with root privileges. Follow the path to its prompt to find its location, such as: my
In/home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh
And/home/oracle/app/orainventory/orainstroot.sh 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
Iv. Creating a Database
Switch to the Oracle account, enter DBCA in the terminal, and start the graphical creation.
Select a custom database
Enter the instance name and global database name
If you want to manage the database through the Web, then configure Enterprise Manager, otherwise do not select
Enter password
Database storage location Select File System
Enable fast recovery and archiving
Configuring the database components, with an indeterminate selection of all
Memory settings, enabling automatic memory management
Sizing, setting block size and number of processes
Set character sets
When you see this interface, the Oracle Build library is complete
Installing Oracle 11g under Fedora