Linux_x64 install Oracle11g (full version), linux_x64oracle11g

Source: Internet
Author: User

Linux_x64 install Oracle11g (full version), linux_x64oracle11g

1. 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. conf, press 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, 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, Press EscKey, enter ": wq"Save disk and exit

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, 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, 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 related users and groups as owners of software installation and support groups.

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.

7) Create a database software directory, a data file storage directory, and a directory location based on your needs. Pay attention to the disk space. Here I will 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 ownerOracleAll users. Enter the following command:

Chown-R oracle: oinstall/home/oracle/app

9)Configure oracleFirst, switch to the newly created oracleUser,

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:

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 

Ii. Installation Process

1)After all the operations required by the above system are completed, log out of the system and useOracleUser login. First, downloadOracleCopy the installation packageLinuxMedium, useSSHOthersFtpTool copy.

Open a terminal and runUnzipCommand DecompressionOracleInstallation files, such:

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

Install this step. We can see that there are many rpm packages not available. We can install linux from the CD or ISO (or D: \ linux_oracle11g_Package) find the missing package, upload it to linux using ftp, and then use rpm-ivh xxx. rpm -- nodeps-force is used for installation (add -- nodeps -- force indicates forced installation, and rpm-ivh xxx is used directly. when all the packages are installed properly, run the installation process 2 in the oracle graphical interface again. During the Environment check, it is passed.

During installation, 86% may encounter errors such as errors (error in invoking target 'mkldflags ntcontab. o nnfgt. o' of makefile.

Upload and install image rhel-server-6.1-x86_64-dvd.iso,

Then mount the image 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 gcc installation sequence is correct.

**************************************** **

# 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 of gcc-c ++

The error is solved according to this method.

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/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

Iii. 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.

 

After a long wait, when you see this interface, the oracle database creation is complete.

4. 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 YES to test

Click change Login and enter a user name and password (oracle and the password) of the connected oracle Server. Then, 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

In this way, the installation and configuration of the oracle server are basically complete.

Note:

 

1. Storage path of Linux oracle Database listener. ora

Cd/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora

2. Storage path of Linux oracle Database tnsnames. ora

Cd/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames. ora

3. ORACLE startup listener
(1) switch to oracle Installation user (generally oracle)
Su-oracle
(2) Start the listener
Lsnrctl start
(3) Stop the listener
Lsnrctl stop

4. Start oracle testing:
[Oracle @ oracle ~] $ Sqlplus/nolog
SQL * Plus: Release 11.2.0.1.0 Production on Fri Jul 27 02:12:12 2012
Copyright (c) 1982,200 9, Oracle. All rights reserved.
SQL> quit
Another method for testing: Find a windows platform computer and telnet the IP address of the oracle host to 1521. If the connection is successful, a black screen will pop up and the cursor will flash.

5. open port 1521 in Linux to allow network connection to Oracle Listener
Symptoms:
(1) TCP/IP connection is successful. You can use the ping command to test.
(2) Oracle Listener is enabled on the server.
Lsnrctl status view listener status
Lsnrctl start Oracle listener
(3) Client errors are usually: ORA-12170: TNS: Connection timeout
At this time, we can basically say that the server has not opened port 1521 (assuming you use the default settings)
Solution:
(1) assume that you have configured a firewall in a LAN environment. You can disable the Linux firewall.
Sudo service iptables stop
(2) EDIT iptables and open port 1521:
Sudo vi/etc/sysconfig/iptables
-A input-p tcp-m state -- state NEW-m tcp -- dport 1521-j ACCEPT
: Wq
Restart Firewall
Sudo service iptables restart
Save the configuration so that the configuration is valid after linux is restarted.
Sudo service iptables save
View firewall rules:
Sudo iptables-L-n

6. Create oracle user tablespace in linux
Creates a new account on an existing database instance to access some new tables.
The procedure is as follows:
(1) log on to linux and Log On As an oracle user (if logged on as a root user, use the su-oracle command to switch to an oracle user)
(2) Open sqlplus in sysdba mode. The command is as follows: sqlplus "/as sysdba"
(3) Check the location where the user tablespace is normally placed: execute the following SQL statement:
Select name from v $ datafile
(4) create a user tablespace:
Create tablespace policydb DATAFILE '/home/oracle/app/oradata/orcl/scsdb. dbf' SIZE 200 m autoextend on extent management local segment space management auto;
(5) create a user and specify the password and the user tablespace created above
Create user scs identified by scs default tablespace policydb;
(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 the above operations, we can use scs/scs to log on to the specified instance and create our own table.

 


Where does the RPM package required to install Oracle11g on Linux need to go?

The Oracle installer does not provide rpm. If it is a related support software package, it should be available on the Linux CD. For more information, see the installation instructions for Oracle on Linux.

In linux, can I use commands on the oracle11g installation interface?

Install it silently on your Baidu oracle.

Related Article

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.