First, modify the operating system core parameters
Under root user, perform the following steps:
1 Modify the user's shell restrictions, modify the/etc/security/limits.conf file
Enter command: vi/etc/security/limits.conf, press I to enter edit mode and add the following 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, enter ": Wq" Save exit
2 Modify/etc/pam.d/login file, enter the command: Vi/etc/pam.d/login, press i key to enter edit mode, add the following content to the file.
Session required/lib/security/pam_limits.so session
required pam_limits.so
Press ESC when editing is complete, enter ": Wq" Save exit
3 Modify the Linux kernel, modify the/etc/sysctl.conf file, enter the command: vi/etc/sysctl.conf, press i key into edit mode, 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 = 32000 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
Press ESC when editing is complete, enter ": Wq" Save exit
4 to make the/etc/sysctl.conf change take effect immediately, execute the following command. Input: Sysctl-p appears as follows:
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 = 32000 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, enter command: Vi/etc/profile, press i key to enter edit mode, add the following content to this file.
if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; then
ulimit-p 16384 ulimit-n 65536
else
ulimit-u 16384-n />fi
fi
Press ESC when editing is complete, enter ": Wq" Save exit
6 Create related users and groups as owners of software installation and support groups.
To create an Oracle user and password, enter a command:
Useradd-g oinstall-g dba-m Oracle
passwd Oracle
Then you can enter the password, the password entered at any time 2, but must be consistent, carriage return confirmation.
7 Create database software directory and data file storage directory, directory location, according to their own situation, pay attention to disk space can be, here I put it under the Oracle user, for example:
Enter 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 for Oracle user all, enter the command:
Chown-r Oracle:oinstall/home/oracle/app
9 Configure the Oracle user's environment variable, first, switch to the newly created Oracle user,
Input: Su–oracle, then directly in the input: Vi. bash_profile
Press I edit. bash_profile, enter edit mode, add the following:
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, enter ": Wq" Save exit
Second, the installation process
1 when the above system requires complete operation, logout system, in the graphical interface to the Oracle user landing. First copy the downloaded Oracle installation package to Linux and copy it with an SSH other FTP tool.
Open a terminal and run the unzip command to extract the Oracle installation files, such as:
Enter command:
Unzip Linux.x64_11gR2_database_1of2.zip
Unzip Linux.x64_11gR2_database_2of2.zip
After decompression completes the CD into its unpacked directory database
Enter command:
CD Database
Use the LS command to view the files that the database contains after decompression, as shown in the following figure:
2 perform installation, enter command:./runinstaller
Loaded into this step, you can see that there are a lot of RPM package does not, we can from the installation of Linux CD or ISO (or to D:\linux_oracle11g_Package) to find the missing packages, use FTP upload to Linux, and then use RPM–IVH xxx.rpm--nodeps–force for installation (plus--nodeps-Force on behalf of forced installation, is in direct use RPM–IVH XXX.RPM installation is not successful when the package is all installed in the case, again in the Oracle graphical interface, the implementation of the installation process 2, down in the environmental inspection process, passed.
An error occurred during installation 86% (error in invoking target ' mkldflags ntcontab.o NNFGT.O ' makefile) is executed in the following order.
Upload and install mirror Rhel-server-6.1-x86_64-dvd.iso,
Then hang the mirrored file, such as/mnt
# Mount-o Loop rhel-server-6.1-x86_64-dvd.iso/mnt
# cd/mnt/packages
# RPM-IVH Glibc-common-2.12-1.25.el6.x86 _64.rpm
# RPM-IVH kernel-headers-2.6.32-131.0.15.el6.x86_64.rpm
# RPM-IVH libgcc-4.4.5-6.el6.x86_64.rpm #
RPM-IVH glibc-2.12-1.25.el6.x86_64.rpm
# RPM-IVH libgomp-4.4.5-6.el6.x86_64.rpm
# RPM-IVH nscd-2.12-1.25.el6.x86_64.rpm
# RPM-IVH glibc-headers-2.12-1.25.el6.x86_64.rpm
# RPM-IVH glibc-devel-2.12-1.25.el6.x86_64.rpm
# RPM-IVH mpfr-2.4.1-6.el6.x86_64.rpm
# RPM-IVH ppl-0.10.2-11.el6.x86_64.rpm
# RPM-IVH cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
# RPM-IVH Cpp-4.4.5-6.el6.x86 _64.rpm
# RPM-IVH gcc-4.4.5-6.el6.x86_64.rpm
Note: The above is installed GCC, software installation sequence can not be wrong.
# RPM-IVH libstdc++-4.4.5-6.el6.x86_64.rpm
# RPM-IVH libstdc+ +-devel-4.4.5-6.el6.x86_64.rpm
# RPM-IVH gcc-c++-4.4.5-6.el6.x86_64.rpm
Note: The above is installed gcc-c++
The error was resolved according to this method.
After the installation is complete, you will be prompted to execute 2 shell scripts with root privileges. Follow the path it prompts to find where it is located, such as: mine is in/home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh.
and/home/oracle/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/orainventory
SH orainstroot.sh
Third, the database builds the storehouse
1 or in the Oracle user's graphical interface Oracle users, the new open a terminal, direct input command DBCA will eject the following interface. We use a custom database here.
After a long wait, when you see this interface, the Oracle build library is completed
Iv. Configuring monitoring and local network services
1 in the Oracle user's graphical interface Oracle users, a new terminal, input command NETCA will eject the following interface.
2 Create a listening service (acting as an Oracle server to enable other Oracle clients to connect to this Oracle server)
3 Configure the local network service name (to act as an Oracle client and to connect to other Oracle servers)
Enter the instance name of the database for the connected Oracle server
Enter the IP address of the Oracle server
Check Yes test
Click Change Login to enter one of the username and password (username Oracle and set password) for the connected Oracle server, click OK
See this interface to show that the test was successful (if unsuccessful, see if the network is unblocked, whether the Oracle server you are connected to starts, listens for startup, and so on)
Name the local network service you set up
The Oracle Server installation configuration is basically complete
Attention:
1, Linux Oracle database Listener.ora Storage Path
Cd/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
2, Linux Oracle database Tnsnames.ora Storage Path
Cd/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
3. Oracle Start Listener
(1) Switch to Oracle installation user (typically Oracle)
Su-oracle
(2) Start the Listener
Lsnrctl start
(3) Stop the Listener
Lsnrctl stop
4. Launch Test Oracle:
[Oracle@oracle ~]$ Sqlplus/nolog
Sql*plus:release 11.2.0.1.0 Production on Fri June 27 02:12:12 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Sql> quit
Another way to test: Find a Windows platform computer, Telnet Oracle host IP address: 1521, if so, there will be a black screen, the cursor flashes.
5, Linux open 1521 ports allow network connection Oracle Listener
Symptoms:
(1) The TCP/IP connection is a pass. You can use the ping command to test.
(2) Oracle Listener has been started on the server.
Lsnrctl Status View Listener state
Lsnrctl Start Oracle Listener
(3) The error message received by the client is usually: Ora-12170:tns: Connection Timeout
At this point, we basically can be sure that the server is not open 1521 ports (assuming you use the default settings)
Workaround:
(1) If you are in a LAN environment, configure the firewall. Then you can turn off the Linux firewall.
sudo service iptables stop
(2) Edit iptables, open 1521 ports:
sudo vi/etc/sysconfig/iptables
-A input-p tcp-m state--state new-m TCP--dport 1521-j ACCEPT
: Wq
Reboot firewall
sudo service iptables restart
Save configuration so that Linux is still active after reboot
sudo service iptables Save
To view firewall rules:
sudo iptables-l–n
6. Create Oracle User table space under Linux
is to create a new account on an existing database instance and access some new tables
steps as follows:
(1) Log on to Linux, log on as an Oracle user (if the root user is logged in, switch to Oracle with su-oracle command after login) The
(2) opens the Sqlplus in a sysdba manner, as follows: Sqlplus "/as sysdba"
(3) View our General place user table space: Execute sql:
Select name from V$datafile
(4) Create user tablespace:
Create tablespace notifydb datafile '/home/oracle/app/oradata/orcl/scsdb.dbf ' SIZE 200M autoextend On EXTENT MANAGEMENT The SEGMENT space MANAGEMENT AUTO;
(5) Create user, specify password and user tablespace created above
Create user SCS identified by SCS DEFAULT Tablespace Notifydb;
(6) Grant permissions
Grant Connect,resource to SCS;
Grant Unlimited tablespace to SCS;
Grant CREATE DATABASE link to scs; Grant Select any sequence,create materialized view to SCS;
--After that, we can create our own table using Scs/scs login to the specified instance.