CentOS6.8 installation Oracle11.2.0.4

Source: Internet
Author: User
Tags chmod dba gpg oracle database installation iptables server memory

1. Install the operating system

When installing, select Chinese + English support
Note Partition: Swap
SDA Disk Making system disk
SDB Disk Making data disk

Configure the server partition path information after completion:
[Email protected] ~]# df-h
Filesystem Size used Avail use% mounted on
/dev/sda3 21G 9.4G 9.7G 50%/
Tmpfs 1.5G 412M 1.1G 28%/DEV/SHM
/DEV/SDA1 477M 39M 413M 9%/boot
/DEV/SDB1 30G 5.8G 23G 21%/Home

2. Configure the Network

[Email protected] ~]# More/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
Type=ethernet
Uuid=f5d780ab-63e6-4dd0-8ea3-e360803aa3cf
Onboot=yes
Nm_controlled=yes
Bootproto=static
hwaddr=00:0c:29:5d:e1:7e
ipaddr=192.168.1.211
Prefix=24
gateway=192.168.1.1
Defroute=yes
Ipv4_failure_fatal=yes
Ipv6init=no
Name= "System eth0"


3. Take a Snapshot


4.1. Operating system
Oracle's officially certified operating system does not have CentOS, support red Hat Enterprise Linux 6,centos 6 is actually the kernel of RHEL6; so change it.
Vim/etc/redhat-release
#CentOS Release 6.8 (Final) This line is commented out, plus the following
Red Hat Enterprise Linux 6


Installing Oracle requires that the kernel version be at least: 2.6.32-71.el6.x86_64 or later
# uname-r, check it out.
2.6.32-642.el6.x86_64

This piece is generally not a problem.


One, mount the local CD-ROM to the system: put the rhel6.5 installation CD into the CD-ROM drive, operate under the terminal command line
Mkdir/media/rhel #新建挂载目录
Mount/dev/cdrom/media/rhel #挂载光盘文件系统到/media/rhel Directory---Note here that/dev/cdrom is the form of a CD-ROM mount, the file system may be/dev/sr0
Cd/media/rhel #进入挂载目录
LS #查看挂载目录, disc mounted successfully
Second, configure local Yum source
Cd/etc/yum.repos.d/#进入yum配置目录
Before customizing the. repo file, create a backup directory bak_myself to move all files under the current directory to the backup directory;
V * bak_myself/

This name must be called in the touch Centos-local.repo #建立yum自定义配置文件--centos system.

VI Centos-local.repo #编辑配置文件, add the following:
[C6-local]
Name=centos-6-Local
Baseurl=file:///media/rhel
Enabled=1
Gpgcheck=1
Gpgkey=file:///media/rhel/rpm-gpg-key-centos-6


In the above parameters, 1 is on, 0 is off, no need to add gpgkey= ' path in case of closing!!!
If gpgcheck=1 authentication is turned on in the above configuration file, you need to execute the following command:
RPM--import/media/rhel/rpm-gpg-key-centos-6

Third, clear the Yum cache, use yum install to install the software automatically
Yum Clean all #清除yum缓存


Uninstall Related directory: Umount/media/rhel


4. Installing dependent Packages

Rpm-q binutils elfutils-libelf-devel compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel pdksh ksh libgcc li bstdc++ libstdc++-devel Libaio libaio-devel make Sysstat UnixODBC unixodbc-

Yum Install compat*
Yum Install libaio-devel*
Yum Install unixodbc*
Yum Install Elfutils-libelf-devel-this package needs to be installed when the CentOS6.8 is installed, and when the Oracle environment detects it, it is prompted to install the package.

RPM-IVH pdksh-5.2.14-37.el5.x86_64.rpm

To modify the operating system kernel parameters:
Vi/etc/sysctl.conf---Append the following to the end of the file

FS.AIO-MAX-NR = 1048576
Fs.file-max = 6815744
#kernel. Shmall = 2097152
#kernel. Shmmax = 536870912
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Net.ipv4.ip_local_port_range = 9000 65500
Net.core.rmem_default = 262144
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 1048586

Run the command to have the parameters take effect:
/sbin/sysctl-p


Add the following line to the/etc/security/limits.conf file:
Note: Here when installing the Oracle environment detection, if the server configuration is low, according to the following parameter value configuration, will be prompted beyond the server can provide hardware configuration, then just click Fix&check again can

vi/etc/security/limits.conf------Note: Oracle at the beginning of each line here represents a limitation on the Oracle user, and cannot be written as a document in the Web, written in *, and when the environment is pre-tested, there will be a problem when it is installed.

Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536


---vi/etc/pam.d/login
Session Required Pam_limits.so

---shutting down the Linux firewall:
Check firewall status-turn off firewall current status: Service iptables status
(1) Immediate effect, failure after restart:
Close: Service iptables stop
(2) Set the firewall to shut down permanently after reboot:
OFF: Chkconfig iptables off


Redhat System firewall releases a port, for example: 177
Iptables-a input-p UDP--dport 177-j ACCEPT

Modify the/etc/selinux/config file to close the Linux firewall and ensure that the SELinux settings are as follows:
Vi/etc/selinux/config

Switch
Selinux=disabled


3.1 Modifying host names
(1) Vi/etc/sysconfig/network

Networking=yes
Hostname=dbserver

Restart the operating system: reboot, let the changes take effect;

(2) [[email protected] ~]# vi/etc/hosts
127.0.0.1 dbserver Localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.211 DBServer


###################################
# Adjust the size of the TMPFS to control the size of the available shared memory---otherwise, when you install the Oracle software, when you select automatic memory management, you are prompted to set the SGA size above the TMPFS size
###################################
If the server memory is large, then our SGA target size is generally set to 80% of the physical memory multiplied by the 80% value
We need to adjust the size of the TMPFS to a value that is slightly larger than the SGA target

First look at the size of the current TMPFS:
[Email protected] ~]# df-h
Filesystem Size used Avail use% mounted on
/dev/sda3 21G 9.4G 9.8G 50%/
Tmpfs 996M 76K 996M 1%/DEV/SHM
/DEV/SDA1 477M 39M 413M 9%/boot
/DEV/SDB1 30G 44M 28G 1%/Home
/dev/sr0 3.7G 3.7G 0 100%/media/centos_6.8_final


Edit/etc/fstab Modify TMPFS Related line: add: ", size=1500m" 1500M according to the actual fill that is: slightly larger than the physical memory 80%*80%
[Email protected] rules.d]# Vi/etc/fstab
Tmpfs/dev/shm Tmpfs defaults,size=1500m 0 0

Re-mount/dev/shm/and see if the TMPFS changes take effect:
[Email protected] ~]# Mount-o REMOUNT/DEV/SHM
[Email protected] ~]# df-h
Filesystem Size used Avail use% mounted on
/dev/sda3 21G 9.4G 9.8G 50%/
Tmpfs 1.5G 76K 1.5G 1%/DEV/SHM
/DEV/SDA1 477M 39M 413M 9%/boot
/DEV/SDB1 30G 44M 28G 1%/Home
/dev/sr0 3.7G 3.7G 0 100%/media/centos_6.8_final


############################################################################

View swap space Size:----The relationship between swap and physical memory when installing Oracle
When physical memory is: Swap size is recommended:
1~2G set 1.5 times times the physical memory
2G~16G is the same size as physical memory
More than 16G when set to 16G on the line if there is enough space when the physical memory is greater than 32G, the swap space size can be set to 1 half of the physical memory


[[email protected] ~]# grep swaptotal/proc/meminfo
swaptotal:4194300 KB
[Email protected] ~]#

Or:
[[email protected] ~]# free
Total used free shared buffers Cached
mem:2038372 340796 1697576 1148 26764 138552
-/+ buffers/cache:175480 1862892
swap:4194300 0 4194300

#####################################################################

3.2root users, create Oracle groups and users
[Email protected] ~]# Groupadd Oinstall
[[email protected] ~]# Groupadd DBA
[Email protected] ~]# Groupadd oper
[Email protected] ~]# useradd-g oinstall-g dba Oracle
[Email protected] ~]# passwd Oracle


3.3 Creating the Oracle Database installation directory
Mkdir-p/home/oracle/u01/app/oracle/product/11.2.0/dbhome_1
Chown-r oracle:oinstall/home/oracle/u01/
Chmod-r 775/home/oracle/u01/


Environment variable configuration: Switch to Oracle User
[Email protected] ~]$ more. Bash_profile
#. Bash_profile

# Get the aliases and functions
If [-f ~/.BASHRC]; Then
. ~/.bashrc
Fi

# User specific environment and startup programs

Path= $PATH: $HOME/bin

Export PATH

Export Oracle_base=/home/oracle/u01/app/oracle
Export Oracle_home=${oracle_base}/product/11.2.0/dbhome_1
Export Oracle_home_listner=${oracle_home}
Export Oracle_path=${oracle_home}/rdbms/admin
Export ORACLE_SID=ORCL
Export Path=${path}:${oracle_home}/bin::~/local/bin
Export Ld_library_path= $ORACLE _home/lib:/lib:/usr/lib
Export Sqlpath=~/script
Export Nls_lang=american_america. Al32utf8
Export nls_date_format= "Yyyy-mm-dd HH24:MI:SS"
Umask 022


Save the exit and modify the finish to make it effective.
. /home/oracle/.bash_profile
Or
source. bash_profile

-----Note: umask 022 in the environment variables above means that the default creation of a new file is 755: rxwr-xr-x (owner All rights, group read and write, other people read and write) This parameter, can be selectively added


To install the database software:
Root, switch to the software upload directory, use the command unzip file name to extract the installation package
Cd/tmp
Unzip P10404530_112030_linux-x86-64_1of7.zip
Unzip P10404530_112030_linux-x86-64_2of7.zip

Root, set the Oracle account to operate the directory where the installation files are located
Go back to root user:
Chown-r Oracle:oinstall/tmp/database
Chmod-r 777/tmp/database
Su-oracle
Cd/tmp/database
./runinstaller


If the monitor status may not be detected, exit the installation first, and return to the root user to execute the following command:
Export display=:0.0
Xhost +

Graphical interface, enter the installation!!!!


After installing the database software, also under the Oracle user, it is recommended to first NETCA configuration monitoring, and then DBCA create the database!!!


Sql> Select Userenv (' LANGUAGE ') from dual;

CentOS6.8 installation Oracle11.2.0.4

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.