Installation environment
Linux Server: SuSe10 sp2 64-bit
Oracle Server: Oracle11gR2 64-bit
System Requirements
- Requirements for installing Oracle in Linux
System Requirements |
Description |
Memory |
Physical memory must be higher than 1 GB |
Swap space |
Generally, it is twice the memory size. For example, you can set the swap partition size to 3 GB for 1 GB memory. |
Hard Disk |
5G or above |
2. 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. confPress 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, pressEscKey, enter": Wq"Save disk and exit
2) modify the/etc/pam. d/login file and 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, pressEscKey, enter": Wq"Save disk and exit
3) ModifyLinuxKernel, modify/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, pressEscKey, enter": Wq"Save disk and exit
4)To make the/etc/sysctl. conf change take effect immediately, run the following command. Input: sysctl-p:
Linux :~ # Sysctl-p Net. ipv4.icmp _ echo_ignore_broadcasts = 1 Net. ipv4.conf. all. rp_filter = 1 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 |
5) edit/etc/profile and 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, pressEscKey, enter": Wq"Save disk and exit
6) Create relevant users and groups,As the owner of the software installation and support group.
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. |
7Create the Database Software Directory and data file storage directory and directory location, depending on your situation, pay attention to the disk space, here I put it under the oracle user, for example:
Enter the following command: Mkdir/home/oracle/app Mkdir/home/oracle/app/oracle Mkdir/home/oracle/app/oradata Mkdir/home/oracle/app/oracle/ Product |
8)Change the directory owner to Oracle user. 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 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 |
After editing, pressEscKey, enter": Wq"Save 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)Run the following command to install the SDK:./RunInstaller
Installed in this step, you can see that there are a lot of rpmThe package does not exist. We can installCD or ISOFind the missing package, use ftpUpload to linuxRun rpm-ivh xxx. rpm -- nodeps-force(Add -- nodeps -- forceIndicates forced installation. You can directly use rpm-ivh xxx. rpm.The installation process is omitted.
When all the packages are installedIn the graphical interface, execute installation process 2.And passed 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.
Configure listeners and Local Network Services
1) open a new terminal in the oracle user graphical interface (GUI) of the oracle user. Enter the command netca to bring up the following interface.
2) create a listening service (Act as an oracle Server and connect other oracle clients to the local oracle Server)
3) configure the local network service name (Act as the oracle client and connect to other oracle servers)
Enter the database instance name of the connected oracle Server
Enter the IP address of the oracle server
Select Test
Click change Login, enter a user name and password of the connected oracle Server, and click OK.
If the test is successful, check whether the network is smooth, whether the connected oracle Server is started, and whether the listener is started)
Name your local network service name
Next, click Next.
In this way, the installation and configuration of the oracle server are basically complete.
(Forward please indicate the source: http://www.cnblogs.com/zhangyongli2011/ if found errors, please leave a message Thank you)