Under Linux Oracle installation parameters

Speaking in front of a set of virtual machines and install OracleLinux, the next preparatory work before us at the Oracle installation.
If you have questions, please contact QQ: 562 050 054
1, System Information View
System Information View
first server ip: 192.168.8.120
server systems: Oracle Linux Server release 6.5
server host name: oracle-learn
to view disk space:

[root@oracle-learn ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 32G 4.8G 26G 17% /
tmpfs 3.9G 224K 3.9G 1% /dev/shm
/dev/sdc1 197G 60M 187G 1% /oracle
/dev/sdb1 40G 48M 38G 1% /soft

 

/ oracle directory for placement oracle
/ oracle Soft is used to store tools such as the installation package
2, mount the CD
after starting the system, check the virtual machine settings are selected drive is connected, if not, select it.
Mount the CD

[root@oracle-learn ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only

  

Check whether to mount a successful

[root@oracle-learn ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 32G 4.8G 26G 17% /
tmpfs 3.9G 224K 3.9G 1% /dev/shm
/dev/sdc1 197G 60M 187G 1% /oracle
/dev/sdb1 40G 48M 38G 1% /soft
/dev/sr0 3.7G 3.7G 0 100% /mnt

  

1, yum configuration settings
to modify the name of the original file yum

[root@oracle-learn ~]# cd /etc/yum.repos.d/
[root@oracle-learn yum.repos.d]# mv public-yum-ol6.repo public-yum-ol6.repofuben
[root@oracle-learn yum.repos.d]# ll
总用量 4
-rw-r--r--. 1 root root 2545 10月 29 2018 public-yum-ol6.repofuben
[root@oracle-learn yum.repos.d]# 

  

2, the configuration settings yum

[root@oracle-learn yum.repos.d]# vim /etc/yum.conf 


Add the following:

[EL]
name =Oracle Linux 6.5 
baseurl=file:///mnt/Server/
gpgcheck=0
enabled=1

 


Save and exit
tests at whether the configuration

[root@oracle-learn yum.repos.d]# yum install binutils -y

If the configuration is successful

 

3, Oracle needs to install packages

yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc-devel -y
yum install ksh -y
yum install libgcc -y
yum install libstdc++ -y
yum install libstdc++-devel -y
yum install libaio -y
yum install libaio-devel -y
yum install libXext -y
yum install libXtst -y
yum install libX11 -y
yum install libXau -y
yum install libxcb -y
yum install libXi -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel –y

  

4, hosts configuration file
editing / etc / hosts file,

[root@db01 /]# vi /etc/hosts

  

Finally, add the following:
192.168.8.120 Learn Oracle-
front IP server, the server host name followed by
5, the user group and to add

[root@oracle-learn ~]# /usr/sbin/groupadd -g 60001 oinstall
/usr/sbin/groupadd -g 60002 dba
[root@oracle-learn ~]# /usr/sbin/groupadd -g 60002 dba
/usr/sbin/groupadd -g 60003 oper
[root@oracle-learn ~]# /usr/sbin/groupadd -g 60003 oper
[root@oracle-learn ~]#/usr/sbin/useradd -u 61002 -g oinstall -G dba oracle 
[root@oracle-learn ~]# /usr/sbin/useradd -u 61002 -g oinstall -G dba oracle

  

View user oracle

[root@oracle-learn ~]# id oracle
uid=61002(oracle) gid=60001(oinstall) 组=60001(oinstall),60002(dba)
[root@oracle-learn ~]# 

  

Setting Oracle user password

[root @ oracle-learn ~] # passwd oracle 
change the oracle user's password. 
The new password: 
Invalid Password: It is based on dictionary words 
invalid password: too simple 
to re-enter the new password: 
passwd: all authentication tokens have been successfully updated. 
[root @ oracle-learn ~] #

 

6, add the file system
to create / oracle oracle for storage

[root@oracle-learn ~]# cd /oracle
[root@oracle-learn oracle]# mkdir -p /oracle/app/oracle/product/11.2.0/db_1
[root@oracle-learn oracle]# chown -R oracle:oinstall /oracle
[root@oracle-learn oracle]# chmod -R 775 /oracle/
[root@oracle-learn oracle]# 

 

 

7, modify operating system parameters
7.1 /etc/security/limits.conf modify files;

[root@oracle-learn oracle]# vi /etc/security/limits.conf

Increase as follows:

#ORACLE SETTING
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768

  

7.2 modify the contents of the file /etc/security/limits.d/90-nproc.conf

[root@oracle-learn oracle]# vi /etc/security/limits.d/90-nproc.conf

  

Commented

#* soft nproc 1024

 

Add to

* - nproc 16384

 Viewing the file changes

[root@oracle-learn oracle]# cat /etc/security/limits.d/90-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

#* soft nproc 1024
* - nproc 16384
root soft nproc unlimited
[root@oracle-learn oracle]# 

 

7.3 Disable SELINUX

[root@oracle-learn oracle]# vi /etc/selinux/config

 

SELINUX = enforcing
into
SELINUX = disabled
so that SELINUX take effect:

[root@oracle-learn oracle]# setenforce 0

 

7.4 iptables firewall to close
off the firewall

[root @ the Oracle-Learn the Oracle] # Service iptables STOP 
iptables: the chain to policy ACCEPT: filter [OK] 
iptables: Clear firewall rules: [OK] 
iptables: being unloaded: [OK] 
[root @ the Oracle-Learn the Oracle ] #

 

You can also set permanently turn off the firewall

[root@oracle-learn oracle]# chkconfig iptables off
[root@oracle-learn oracle]# 

  

7.5 Amendment of /etc/pam.d/login

[root@oracle-learn oracle]# vi /etc/pam.d/login

 

Add to

#ORACLE SETTING
session required pam_limits.so

 

7.6 modify sysctl.conf configuration file

[root@oracle-learn ~]# vi /etc/sysctl.conf

 


Comment
# kernel.shmmax = 68,719,476,736
# kernel.shmall = 4294967296
add

#ORACLE SETTING
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 8589934592
kernel.shmall = 2097152
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

 

Comment:

Calculation of kernel.shmmax and kernel.shmall:
kernel.shmmax greater than SGA, is smaller than the physical memory
I 8G is here the server's memory
so kernel.shmmax value is
`1024 * 1024 * 1024 *. 8 = 8589934592`
` kernel.shmmni = 4096`
`kernel.shmall = kernel.shmmax / 4096`

Let configuration to take effect:

[root@oracle-learn ~]# sysctl -p

  

8, the environment variable is set
to switch to the next user oracle

[root@oracle-learn ~]# su - oracle
[oracle@oracle-learn ~]$

  

Modify environment variables

[oracle@oracle-learn ~]$ vi ~/.bash_profile

  

Add the following:

#Oracle Settings oracle
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
#export LANG=en_US
ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

  

Wherein ORACLE_SID = orcl; be defined from the database sid
exit user

[oracle@oracle-learn ~]$ exit
logout
[root@oracle-learn ~]# 

  

Log in to check oracle user environment variable parameter

[root@oracle-learn ~]# su - oracle
[oracle@oracle-learn ~]$ env |grep ORACLE
ORACLE_SID=orcl
ORACLE_BASE=/oracle/app/oracle
ORACLE_TERM=xterm
ORACLE_HOME=/oracle/app/oracle/product/11.2.0
[oracle@oracle-learn ~]$ 

  

So far, Linux environment under the Oracle environment is ready.

 

Guess you like

Origin www.cnblogs.com/black-start/p/10973340.html