centos7 installation oracle11g (according to official documents oracle installation, graphical interface to solve the installation problem)

First, the system and installation package

Operating System: centos 7.4

oracle version: oracle 11g r2

Two, centos environment configuration

Install the package database needed

1 [root@localhost data]# yum -y install binutils* compat-libcap1* compat-libstdc++* gcc* gcc-c++* glibc* glibc-devel* ksh* libaio* libaio-devel* libgcc* libstdc++* libstdc++-devel* libXi* libXtst* make* sysstat* elfutils* unixODBC*

Create a set of operating system users and oracle database (created under the root account)

[root @ localhost] # groupadd oinstall # create groups of users the oinstall 
[the root @ localhost] # # Create a user group the groupadd DBA DBA 
[the root @ localhost] # the useradd -g the oinstall -d -g DBA / Data / Oracle - m # Create Oracle oracle user, and add to the oinstall and dba groups of users 
[root @ localhost] # passwd oracle # oracle to set the user's login password, no password, the CentOS graphical login screen can not log in 
Changing password for the user oracle. 
New password: # password 
BAD pASSWORD: at the password iS Shorter Within last 8 characters 
the Retype new new password: # confirm password 
[root @ localhost] # id oracle # View the new oracle user 
uid = 1001 (oracle) gid = 1002 (dba) Groups = 1002 (dba)

Create the installation directory of oracle database

[root @ localhost] # mkdir -p / data / oracle #oracle database installation directory 
[root @ localhost] # mkdir -p / data / oraInventory #oracle database configuration file directory
[root @ localhost] # mkdir -p / data / database #oracle extract the package database directory

Modify the operating system logo

[root @ localhost the Data] # CAT / etc / redhat- Release 
RedHat - 7 
# modify the host name 
[root @ localhost the Data] # hostnamectl the SET the -HostName redhat- 7

Turn off the firewall and selinux

See systemctl status firewalld.service # firewall status (running) 
systemctl STOP # firewalld.service off firewall 
systemctl disable firewalld.service # prohibit the use of a firewall (restarting is prohibited) 

# closing SELinux 
Sed -i.bak ' / the SELINUX / S / enforcing / Disabled / ' / etc / SELinux / config

Modify kernel parameters

# 在/etc/sysctl.conf中加入

vm.swappiness = 10
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_tw_buckets = 20000
net.ipv4.tcp_keepalive_time = 60
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_timestamps = 0
net.ipv4.ip_local_port_range = 9000 65500
net.core.somaxconn = 65535 
net.core.netdev_max_backlog = 262144 
net.core.rmem_default = 262144 
net.core.rmem_max = 4194304 
net.core.wmem_default = 262144 
net.core.wmem_max = 1048576 
kernel.shmall = 2097152 
kernel.shmmax = 536870912 
kernel.shmmni = 4096 
kernel.sem = 250  32000  100  128 
fs.file -max = 6,815,744 
fs.aio -max = NR- 1048576 

# kernel parameters to make configuration changes take effect
sysctl -p

Set limits for the oracle user, to improve the performance of software running

vi /etc/security/limits.conf

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

End of file

Configure the user environment variables

VI / Data / Oracle / .bash_profile 

# .bash_profile 

# Functions and aliases the Get The 
IF [-f ~ / .bashrc]; the then 
. ~ / .bashrc 
Fi 

# and the User Environment specific Startup Programs 

the PATH = the PATH $: $ the HOME /. local / bin: $ the HOME / bin 

export the pATH 

export the ORACLE_BASE = / Data / Oracle database installation directory #oracle 
export ORACLE_HOME = $ the ORACLE_BASE / Product / 11.2 . 0 / db_1 #oracle database path 
export the ORACLE_SID = ORCL #oracle start database instance name 
export ORACLE_UNQNAME = orcl 
Export ORACLE_TERM =Window installation mode xterm #xterm 
Export the PATH = $ ORACLE_HOME / bin: / usr / sbin: $ # Add the PATH system environment variable 
Export the LD_LIBRARY_PATH = $ ORACLE_HOME / lib: / lib: / usr / lib # Add the system environment variable 
Export the LANG = C # prevent the installation process garbled 
Export the NLS_LANG = AMERICAN_AMERICA.ZHS16GBK # set the Oracle client character set, character set must be installed when consistent with Oracle

The user's environment variables to take effect

source /data/oracle/.bash_profile

Third, the installation oracle

The oracle installation package uploaded to / usr / local / src

unzip linux.x64_11gR2_database_1of2.zip -d /data/database/
unzip linux.x64_11gR2_database_2of2.zip -d /data/database/

Graphical installation script runs / data / database / database, to start the installation

[root@redhat-7 database]# ll
total 16
drwxr-xr-x 12 oracle oinstall  203 Aug 17  2009 doc
drwxr-xr-x  4 oracle oinstall  223 Aug 15  2009 install
drwxrwxr-x  2 oracle oinstall   61 Aug 15  2009 response
drwxr-xr-x  2 oracle oinstall   34 Aug 15  2009 rpm
-rwxr-xr-x  1 oracle oinstall 3226 Aug 15  2009 runInstaller
drwxrwxr-x  2 oracle oinstall   29 Aug 15  2009 sshsetup
drwxr-xr-x 14 oracle oinstall 4096 Aug 15  2009 stage
-rw-r--r--  1 oracle oinstall 5402 Aug 18  2009 welcome.html
[root@redhat-7 database]# ./runInstaller

Four, oracle installation error resolved

Most of the students in the third step, when the whole of the bruised and battered by a variety of error. Read a lot of online tutorials, are stereotyped, not solve the problem. Is there a way in the wood, he saw a small cloth teacher oracle video (he was referring to the official documentation of the oracle of teaching), the perfect solution.

A error:

Error message: 
Could not the Execute Auto the Check for Run the display Colors a using the Command / usr / bin / xdpyinfo the Check. IF at The the DISPLAY variable IS the SET Failed.

Analysis:
This is due to the graphical settings caused by improper, need the right to perform xhost + and set parameters DISPLAY

steps:
1. installation vNCSERVER (root user)
yum the install TigerVNC -Y-Server
vncserver

2. set parameters and xhost + DISPLAY
this step is important. Online tutorials almost all export DISPLAY = db1.us.oracle.com: 1, export DISPLAY = 127.0.0.1: 1, absolutely not! Really wasted time ah! !
export DISPLAY = xxxxx: 1, this "xxxxx" should fill a gateway server Xmanager is installed.
----------------------------
Suppose you install oracle on the virtual machine, the virtual machine ip is 192.168.1.100. Xmanager installed on their laptops, ip is 192.168.18.100 (gateway 192.168.18.1)
Then you should set this on a virtual machine: Run the command export DISPLAY = 192.168.18.1: 1.
----------------------------
run + xhost:
[the Oracle @ localhost bin] $ xhost +
Access Control Disabled, CAN Connect from Clients any host
prompt access control disabled to explain it.

Tip: You may follow this step or not. This time do not lose heart, step by step investigation, certainly can

 

Guess you like

Origin www.cnblogs.com/dingzp/p/11201475.html
Recommended