Centos6.5 Oracle 11g R2 installation process

Source: Internet
Author: User
Tags ssh secure file transfer ssh secure shell

1 Preparation
Centos-6.5-x86_64-bin-dvd1
Linux_11gr2_database_1of2
Linux_11gr2_database_2of2
VMware Workstation 10.0.2
SSH Secure Shell Client
Instantclient_11_2
plsqldev1005
2 Installing virtual machines and CentOS
(1) Installing VMware Workstation
(2) Install CentOS, host named: OracleDB
(3) disk needs to be greater than 30G (experience value)
(4) memory must be greater than 1G (official requirements)
(5) The operating system swap partition greater than 2G (if the physical memory is less than 2G, you need to set the value of 1-2 times the physical memory, if the physical memory is greater than 2G, there is no need to set. )
(6) Virtual Machine Network connection mode: Bridging mode (B) direct connection to physical network
(7) Set the virtual machine Network (IPv4) to a fixed IP address (system-config-network) after installation is complete
(8) Network test OK, the operating system environment is ready to complete
(9) Be sure to select the virtual machine when you install it: Install the operating system after you first create the VM
(10) In order to install Oracle, select the installation type: Desktop version.
(11) Installing the SSH Secure Shell client and connecting to the host
3Oracle Pre-installation Preparation
"Special Instructions":
(1) The commands in the following steps are too long to be passed: SSH Secure Shell Client is copied directly
(2) VI Basic command: i--Edit Status Exit Edit and save the ESC key, and then press the ": Wq" or ": X" to
(3) Note the current user at each step, root or Oracle

step-1# modifying host names
[Email protected] ~]# sed-i "s/hostname=localhost.localdomain/hostname=oracledb/"/etc/sysconfig/network
[Email protected] ~]# hostname oracledb

step-2# Add host name and IP correspondence record
[Email protected] ~]# vi/etc/hosts
192.168.1.8 OracleDB

step-3# shutting down the firewall SELinux
[Email protected] ~]# sed-i "s/selinux=enforcing/selinux=disabled/"/etc/selinux/config
[Email protected] ~]# Setenforce 0

step-4# Install dependent packages
[Email protected] ~]#
Yum-y install gcc gcc-c++ make binutils compat-libstdc++-33 elfutils-libelf \
Elfutils-libelf-devel glibc Glibc-common glibc-devel \
Libaio libaio-devel libgcc libstdc++ libstdc++-devel \
UnixODBC Unixodbc-devel

"Special Instructions":
(1) pdksh-5.2.14-37.el5.x86_64.rpm: This installation package is not in the Yum source, but must be, can be downloaded by other means after manual installation;
(2) Although a dependent package is installed, when the Oracle process is installed, you will still verify that one of the above packages is not installed, you will need to pass: Rpm-qa gcc (check the failed package name) check each verification.

step-5# modifying kernel parameters

[Email protected] ~]# vi/etc/sysctl.conf #末尾添加如下

net.ipv4.ip_local_port_range= 9000 65500fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 10523004kernel.shmmax = 6465333657kernel.shmmni = 4096kernel.sem = 32000 128net.core.rmem_default= 262144net.core.wmem_default=262144net.core.rmem_max=4194304net.core.wmem_max=1048576

[[email protected] ~]# sysctl-p (note: For output configuration results, if there are errors will prompt)


step-6# Modifying system resource limits (number of open processes and files)
[Email protected] ~]# vi/etc/security/limits.conf #末尾添加如下

Oracle Soft Nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536grid soft nproc 2047grid Hard Nproc 16384grid soft nofile 1024grid hard Nofile 65536

[Email protected] ~]# Vi/etc/pam.d/login
Session required pam_namespace.so #下面添加一条pam_limits. So
Session required/lib64/security/pam_limits.so
Session required/lib/security/pam_limits.so
Session Required Pam_limits.so

step-7# creating users and Groups
[Email protected] ~]# Groupadd Oinstall
[[email protected] ~]# Groupadd DBA
[Email protected] ~]# Groupadd oper
[Email protected] ~]# useradd-u600-g Oinstall Oracle
[Email protected] ~]# usermod-g dba,oper Oracle
[[email protected] ~]# ID Oracle
[Email protected] ~]# passwd Oracle

step-8# Creating the installation directory and empowering
[Email protected] ~]# mkdir/u01
[Email protected] ~]# mkdir/u02
[Email protected] ~]# chown-r oracle:oinstall/u01
[Email protected] ~]# chown-r oracle:oinstall/u02
[[email protected] ~]# su Oracle
[Email protected] ~]# mkdir-p/u01/app/oracle/product/11.2.0/db_1
[Email protected] ~]# mkdir-p/u02/oradata
[Email protected] ~]# mkdir-p/u02/oradata/oracledb #oracledb为你数据库实例名

step-9# Set the Oracle environment variable (log in to the desktop using an Oracle account and open the Terminal window file and finally add the settings line for the following environment variable)
[Email protected] ~]# Vi/home/oracle/.bash_profile
Oracle_base=/u01/app/oracle; Export Oracle_baseoracle_home= $ORACLE _base/product/11.2.0/db_1; Export oracle_homeld_library_path= $ORACLE _home/lib; Export Ld_library_pathoracle_sid=oracledb; Export oracle_sidora_nls33= $ORACLE _home/nls/admin/data; Export Ora_nls33nls_lang=american_america.zhs16gbk;export nls_langpath= $ORACLE _home/bin: $PATH; Export PATH
[[email protected] ~]# Source/home/oracle/.bash_profile (make configuration effective immediately)
[[Email protected] ~]# env (check environment variable settings OK)

step-10# uploading installation files
(1) Login with Oracle account: SSH Secure File Transfer Client
(2) Upload the installation package to:/home/oracle/downloads directory

step-11# extracting Oracle installation files (enter:/home/oracle/downloads directory)
[Email protected]~]# unzip-o-d/home/oracle/downloadsLinuxamd64_12c_database_1of2.zip
[Email protected]~]# unzip-o-d/home/oracle/downloadsLinuxamd64_12c_database_2of2.zip
4 Installing Oracle
[Email protected] ~]# Xhost +
[[email protected] ~]# su Oracle
[[Email protected] ~] Cd/home/oracle/downloads/database
[Email protected] ~]#./runinstaller

Description: The installation screen will then pop up and then installed according to an illustrated article on the Internet.

5 Changes
The download is: linuxamd64_12c error occurred during installation, so the change is: LINUX.X64_11GR2 in order to completely uninstall Oracle, using the official website provided: Oracle De-install Utility

6 Questions and Answers
(1) Modify the Linux kernel file sysctl-p error
Error: "Net.bridge.bridge-nf-call-ip6tables" is an unknown key
Error: "Net.bridge.bridge-nf-call-iptables" is an unknown key
Error: "Net.bridge.bridge-nf-call-arptables" is an unknown key

Here's how to fix it:
[Email protected] ~]# Modprobe Bridge
[Email protected] ~]# Lsmod|grep Bridge

(2) When installing the system, the swap partition is created too small, dynamic adjustment. So when installing the operating system, set the swap partition and allocate a good size can

Method: Use the file as the swap partition, the operation is as follows
1. Create a file to be a swap partition: increase the 1GB size of the swap partition, the command is written as follows, where count equals the number of blocks you want (bs*count= file size).
# dd If=/dev/zero of=/root/swapfile bs=1m count=1024

2. Format the swap partition file:
# Mkswap/root/swapfile #建立swap的文件系统

3. Enable the Swap partition file:
# Swapon/root/swapfile #启用swap文件

4. Make the system self-enabled when booting, add a line in file/etc/fstab:
/root/swapfile swap swap defaults 0 0

(3) Yum installation source can not find a package, the results of the Yum source is not found, wasted effort
There are two ways to modify the Yum source, many friends like to modify YUM.REPOS.D this file to make changes, Deepvps feel this method is not too good, the following method is more convenient.
In the CentOS system, you can install the components directly through Yum, but the system default Yum source speed is often unsatisfactory, are connected overseas, in order to achieve rapid installation in the country, it is necessary to modify the Yum source, you can use
Http://mirrors.163.com/http://mirrors.sohu.com of these 2 domestic sources.
Execute the following command.
Cd/etc/yum.repos.d
MV Centos-base.repo Centos-base.repo.bak
wget Http://mirrors.163.com/.help/CentOS-Base-163.repo or wget Http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

Run the Yum Makecache build cache

4 Console page Some of the text on the button is garbled solution (such as login screen: Login button)

Workaround:

EM garbled is caused by Java, the EM button is generated by the Java diagram, Oracle 11g using the jdk1.5,jdk1.5 has a simple way to solve the problem.

Operations on the Oracle server are performed by an Oracle user with the following steps:
1. Get font files from Windows SIMSUN.TTC
2. Create a folder in the directory $oracle_home/jdk/jre/lib/fonts fallback
Command:mkdir fallback
3. Copy the font file SIMSUN.TTC to the fallback directory you just created, and rename it to Simsun.ttf (it cannot be used for business because the Windows fonts are copyrighted)

Command
MV SIMSUN.TTC Simsun.ttf
chmod 755 Simsun.ttf
4. Clear the Cache of EM
COMMAND:RM $ORACLE _home/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs/*.gif
5. Stop and restart Dbconsole
Command
Emctl Stop Dbconsole
Emctl Start Dbconsole
Go to the browser again to refresh the EM, found that the button is no longer garbled

5:1521 11,582 ports not open cause other machines to access the Web control side and not connect to Oracle
Reference: http://blog.csdn.net/jemlee2002/article/details/7042991

6:kdump failed to start
In a desktop environment, deactivate Kdump directly

7 Common operation methods and commands (for Linux novice)

(1) In the graphical interface can also be toggled in a number of interfaces: in the X-window graphical operator interface, press "alt+ctrl+ function key fn n=1~6" can enter the console character interface.
Just press "Alt+ctrl+f7" to go back to the X-window.
(2)
Rm-f Deleting files
RM-RF Deleting a folder
(3)
cp/u01/app/oracle/product/11.2.0/db_1/jdk/jre/lib/fonts/a.txt/home/oracle/(where to copy files from)

8Oracle Operation Management


(1) Start the database
[[Email Protected]~]sqlplus/nolog
Sql> Connect System/system as Sysdba
Sql> Startup

(2) Start monitoring
[[Email Protected]~]lsnrctl start

(3) Start the management platform
[[Email Protected]~]emctl start dbconsole

"Special Instructions"
(1) Best to manually stop Oracle when shutting down the server
(2) To make the server resource consumption small, Oracle boot server directly to the command line. If the operation is stable, directly modify the operating system default boot to the command line

(1) Stop the database
[[Email Protected]~]sqlplus/nolog
Sql> Connect System/system as Sysdba
sql> shutdown

(2) Stop monitoring
[[Email Protected]~]lsnrctl stop

(3) Stop management platform
[[Email Protected]~]emctl stop Dbconsole

9 Plsql Installation configuration (refer to the article, I was done at once)

1, first to Oracle website download Instant client:http://www.oracle.com/technology/global/cn/software/tech/oci/instantclient/ Index.html depending on your operating system
Select a different instant client version to download back is a compressed file, after extracting the folder called: D:/instantclient_11_2. Put it in the directory you like. For example: d:/instantclient_11_2
My download path (http://download.oracle.com/otn/nt/instantclient/112030/instantclient-basic-nt-11.2.0.3.0.zip)

2. Create a new directory network under the D:/instantclient_11_2 directory, create a new admin directory under the network directory, create a new file Tnsnames.ora in the Admin directory, and use a text editor to open and write the following:

mwdb=
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.58) (PORT = 1521))
)
(Connect_data =
(service_name = mwdb)
)
)

First mwdb: Represents the local hostname that defines the remote server
Second mwdb: Remote DB instance Name

3. Add an environment variable named Tns_admin and the value is the path where the Tnsnames.ora file is located. For example, my machine is: d:/instantclient_11_2/network/admin

4. Set the Oracle language, add the environment variable Nls_lang, and the value is simplified Chinese_china. Zhs16gbk

If you do not know the Oracle language of the remote database, you can ssh or telnet to the remote machine, enter it at the command interface, and connect to the database using the command line.
SELECT * from Nls_instance_parameters;
View the value of Nls_language
Nls_language
Nls_territory
5. Download and install the PL.SQL.Developer configuration app
Configure Tools->preferences->connection
Oracle Home d:/instantclient_11_2
OCI Library D:/instantclient_11_2/oci.dll

6, close PL/SQL Developer, restart Developer.

The hostname will appear in the PL/SQL developer list, enter the user name password, and you will be able to log in to the remote Oracle 11g database.

< finish >

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.