Linux System (X64) installation oracle11g Complete installation graphics tutorial with basic operation

Source: Internet
Author: User
Tags iptables ssh ftp sqlplus

First, modify the operating system core parameters

Under root user, perform the following steps:

1) Modify the user's shell limit, 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.

?
1234567 oracle soft nproc 2047oracle hard nproc 16384 oracle soft nofile 1024oracle hard nofile 65536

Press ESC when editing is complete and enter ": Wq" to eject

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, the following content to join the file.

?
123 session required /lib/security/pam_limits.sosession required pam_limits.so

Press ESC when editing is complete and enter ": Wq" to eject

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, add the following content to the file

?
123456789101112131415161718192021 fs.file-max = 6815744fs.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 = 262144net.core.wmem_max = 1048576

Press ESC when editing is complete and enter ": Wq" to eject

4) to make the/etc/sysctl.conf change take effect immediately, execute the following command. Input: Sysctl-p display as follows:

?
123456789101112131415161718192021222324252627 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"  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 the command: Vi/etc/profile, press the I key to enter the editing mode, the following content to join the file.

?
123456789101112131415 if [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fifi

Press ESC when editing is complete and enter ": Wq" to eject

6) Create the relevant users and groups as the owner of the software installation and Support group.

To create an Oracle user and password, enter the command:

?
123 useradd-g oinstall -g dba -m oracle passwdoracle

Then will let you enter the password, the password any input 2 times, but must be consistent, enter the confirmation.

7) Create database software directory and data file directory, directory location, according to their own situation, pay attention to disk space, here I put it under the Oracle user, for example:

Enter the command:

?
1234567 mkdir/home/oracle/app mkdir /home/oracle/app/oracle mkdir /home/oracle/app/oradata mkdir/home/oracle/app/oracle/product

8) Change Directory owner is owned by Oracle user, enter command:

?
1 chown-R oracle:oinstall /home/oracle/app

9) Configure the environment variables for the Oracle user, 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:

?
123456789 export ORACLE_BASE=/home/oracle/appexport ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1 export ORACLE_SID=orcl export PATH=$PATH:$HOME/bin:$ORACLE_HOME/binexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

Press ESC when editing is complete and enter ": Wq" to eject

Second, the installation process

1) When the above system requires that the operation is complete, log off the system and log in with the Oracle user on the graphical interface. First copy the downloaded Oracle installation package to Linux and copy it with other SSH FTP tools.

Open a terminal and run the unzip command to extract the Oracle installation files, such as:

Enter the command:

?
123 unzip linux.x64_11gR2_database_1of2.zipunzip linux.x64_11gR2_database_2of2.zip

After the decompression is complete, the CD enters its extracted directory.

Enter the command:

CD Database

Use the LS command to view the files contained in the extracted database, such as:

2) Perform the installation, enter the command:./runinstaller

In this step, you can see that there are a lot of RPM packages available, we can find the missing packages from the Linux CD or ISO (or go to D:\linux_oracle11g_Package), use FTP to upload to Linux, and then use RPM–IVH xxx.rpm--nodeps–force to install (with the addition of--nodeps-Force on behalf of the mandatory installation, is in direct use RPM–IVH XXX.RPM installation is unsuccessful) wait until the package is all installed, again in the Oracle graphical interface, perform the installation process 2, down in the environmental inspection process, passed.

During the installation process 86% may encounter errors such as error (Error in invoking target ' mkldflags ntcontab.o nnfgt.o ' of makefile) executed in the following sequence of steps.

Upload the installation image Rhel-server-6.1-x86_64-dvd.iso,

Then hang the image file, such as/mnt

?
1234567891011121314151617181920212223242526272829 # 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 the installation of GCC, the software installation sequence can not be wrong.

?
1234567 ******************************************# 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 the installation 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 to its prompt to find its location, such as: Mine is/home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh.

And/home/oracle/orainventory/orainstroot.sh a new terminal, enter the command:

?
123456789 su– root cd /home/oracle/app/oracle/product/11.2.0/dbhome_1 sh root.sh cd /home/oracle/oraInventorysh orainstRoot.sh

Third, database Building library

1) or in Oracle user's graphical interface Oracle user, a new terminal, the direct input command DBCA will pop up the following interface. We use a custom database here.

After a long wait, when you see this interface, the Oracle Build library is complete

Iv. Configuring monitoring and local network services

1) in Oracle User's graphical interface Oracle user, the new terminal is opened, the input command NETCA will pop up the following interface.

2) Create a listening service (acting as an Oracle Server for other Oracle clients to connect to this Oracle server)

3) Configure the local Network service name (acting as Oracle client, connecting 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 to test

Click Change Login to enter one of the user names and passwords for the connected Oracle Server (user name Oracle and password set), click OK

See this interface to show that the test was successful (if unsuccessful, see if the network is unblocked, whether the connected Oracle server is started, whether the listener is started, etc.)

Name a local network service name you set

This makes the Oracle Server installation configuration 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 Boot Listener
(1) Switch to Oracle installation user (typically Oracle)
Su-oracle
(2) Start listener
Lsnrctl start
(3) Stop the Listener
Lsnrctl stop

4. Start Test Oracle:
[Email protected] ~]$ Sqlplus/nolog
Sql*plus:release 11.2.0.1.0 Production on Fri Jul 27 02:12:12 2012
Copyright (c) 1982, Oracle. All rights reserved.
Sql> quit
Another way to test: Find a Windows platform computer, Telnet Oracle host IP address: 1521, if so, a black screen will appear, the cursor flashes.

5. Linux Open 1521 port allows network connection Oracle Listener

Symptoms:
(1) TCP/IP connections are on-pass. You can test with the ping command.
(2) The Oracle listener on the server has been started.
Lsnrctl Status View Listener state
Lsnrctl Start Oracle Listener
(3) The error message that the client gets is usually: Ora-12170:tns: Connection timed out
At this point, we can basically be sure that the server is not open 1521 port (assuming you use the default settings)

Workaround:
(1) If you are in a LAN environment, configure a firewall. Then you can turn off the Linux firewall.
sudo service iptables stop
(2) Edit iptables, open 1521 port:
sudo vi/etc/sysconfig/iptables
-A input-p tcp-m state--state new-m TCP--dport 1521-j ACCEPT
: Wq

Restarting the firewall
sudo service iptables restart
Save the configuration so that it still works after the Linux 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 the existing DB instance and access some new tables
The procedure is as follows:
(1) Log in to Linux, log in as an Oracle user (if the root user is logged in, switch to Oracle using the su-oracle command after logging in)
(2) to open Sqlplus in SYSDBA mode, the command is as follows: Sqlplus "/as sysdba"
(3) View our general placement of user table spaces: Execute the following sql:
Select name from V$datafile
(4) Create user table space:
CREATE tablespace notifydb datafile '/home/oracle/app/oradata/orcl/scsdb.dbf ' SIZE 200M autoextend on EXTENT MANAGEMENT L ocal SEGMENT SPACE MANAGEMENT AUTO;
(5) Create user, specify password and user table space created on top
CREATE USER SCS identified by SCS DEFAULT Tablespace Notifydb;
(6) Giving permission
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 doing so, we can use Scs/scs to login to the specified instance and create our own table.

Transferred from: http://www.jb51.net/article/53769.htm

Linux System (X64) installation oracle11g Complete installation graphics tutorial with basic operation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.