Complete installation of Oracle11g in Linux (X64) with basic operations, x64oracle11g

Source: Internet
Author: User

Complete installation of Oracle11g in Linux (X64) with basic operations, 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 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536

After editing, Press Esc and enter ": wq" to save the 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.sosession required pam_limits.so

After editing, Press Esc and enter ": wq" to save the 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 = 6815744fs.aio-max-nr = 1048576kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 4194304net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576

After editing, Press Esc and enter ": wq" to save the disk and exit.

4) to make the/etc/sysctl. conf change take effect immediately, run the following command. Input: sysctl-p:

linux:~ # sysctl -pnet.ipv4.icmp_echo_ignore_broadcasts = 1net.ipv4.conf.all.rp_filter = 1fs.file-max = 6815744fs.aio-max-nr = 1048576kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 4194304net.core.rmem_max = 4194304net.core.wmem_default = 262144net.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" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi

After editing, Press Esc and enter ": wq" to save the 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 oraclepasswd 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/appmkdir /home/oracle/app/oraclemkdir /home/oracle/app/oradatamkdir /home/oracle/app/oracle/product

8) change the directory owner to be owned by an Oracle user and 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:

export ORACLE_BASE=/home/oracle/appexport ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1export ORACLE_SID=orclexport PATH=$PATH:$HOME/bin:$ORACLE_HOME/binexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

After editing, Press Esc and enter ": wq" to save the disk and exit.

Ii. 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 and use other SSH 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.zipunzip linux.x64_11gR2_database_2of2.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) execute the installation and enter the command:./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 – rootcd /home/oracle/app/oracle/product/11.2.0/dbhome_1sh root.shcd /home/oracle/oraInventorysh 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.


The installation of Oracle11g on the W7 (64-bit) computer fails several times. Otherwise, the installation is illustrated by garbled characters when operating with the programming language and Oracle.

I have no problem.

The oracle11g is installed under _58_x 86_X64. the following error occurs during the installation.

Lost to you, clearly stated that the need for 1048576kB, and you only 1025960kB. You only need 30 mb more.
All failed detection. This problem is also estimated by swap. Mount another virtual hard disk.
 

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.