Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Environment preparation before Oracle installation

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

We talked about the setup of the virtual machine and the installation of OracleLinux, and then let's talk about the preparatory work before the installation of Oracle.

1. View system information

System information view

First, the server ip:192.168.8.120

Server system: Oracle Linux Server release 6.5

Server hostname: oracle-learn

Check the disk space:

[root@oracle-learn] # df-hFilesystem 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 is used to place oracle

/ soft is used to store tool installation packages such as oracle.

2. Mount the CD-ROM drive

After booting the system, check the virtual machine optical drive settings to see if it is connected, or if not.

Mount the CD-ROM drive

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

Check whether the mount is successful

[root@oracle-learn] # df-hFilesystem 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 0100% / mnt

1. Set yum configuration

Modify the name of the original yum file

[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 total dosage 4 RWM / etc/yum.repos.d/. 1 root root 2545 October 29 2018 public-yum-ol6.repofuben [root@oracle-learn yum.repos.d] #

2. Set yum configuration

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

Add the following:

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

Save and exit

Test whether the configuration is successful

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

3. Install the software packages required by Oracle

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 file configuration

Edit / etc/hosts file

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

Add the following at the end:

192.168.8.120 oracle-learn

The server ip is preceded by the server hostname

5. Add groups and users

[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 oracle users

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

Set Oracle password

[root@oracle-learn ~] # passwd oracle changes the password of the user oracle. 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 ~] #

For convenience here, the password of the oracle user is oracle.

6. Add a file system

Create / oracle to store oracle

[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 modify the / etc/security/limits.conf file by adding the following:

[root@oracle-learn oracle] # vi / etc/security/limits.conf#ORACLE SETTINGoracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240oracle hard stack 32768

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

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

Comment out

# * soft nproc 1024

Add

*-nproc 16384

[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 16384root soft nproc unlimited [root@oracle-learn oracle] #

7.3 disable SELINUX

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

SELINUX=enforcing

Change to

SELINUX=disabled

Make SELINUX effective:

[root@oracle-learn oracle] # setenforce 0

7.4 turn off iptables Firewall

Turn off the firewall

[root@oracle-learn oracle] # service iptables stopiptables: set chain to policy ACCEPT:filter [OK] iptables: clear firewall rules: [OK] iptables: uninstalling module: [OK] [root@oracle-learn oracle] #

You can also set the firewall to be turned off permanently

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

7.5 modify / etc/pam.d/login file

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

Add

# ORACLE SETTINGsession required pam_limits.so

7.6 modify the sysctl.conf configuration file

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

Annotation

# kernel.shmmax = 68719476736

# kernel.shmall = 4294967296

Add

# ORACLE SETTINGfs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmmax = 8589934592kernel.shmall = 2097152kernel.shmmni = 4096kernel.sem = 25032000100 128net.ipv4.ip_local_port_range = 900065500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586

The calculation method of kernel.shmmax and kernel.shmall:

Kernel.shmmax is greater than SGA and less than physical memory

The memory of my server is 8 gigabytes.

So the value of kernel.shmmax is

1024 10248 8589934592

Kernel.shmmni = 4096

Kernel.shmall=kernel.shmmax/4096

Let the configuration take effect:

[root@oracle-learn] # sysctl-p

8. Environment variable setting

Switch to oracle user

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

Modify environment variabl

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

Add as follows:

# Oracle Settings oracleTMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIR#export LANG=en_USORACLE_BASE=/oracle/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOMEORACLE_SID=orcl; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib Export CLASSPATHNLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMATNLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANGif [$USER = "oracle"] | | [$USER = "grid"]; thenif [$SHELL = "/ bin/ksh"]; thenulimit-p 16384ulimit-n 65536elseulimit-u 16384-n 65536fiumask 022fi

ORACLE_SID=orcl; can customize the sid of the database

Exit the user

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

Check the environment variable parameters when logging in to oracle

[root@oracle-learn ~] # su-oracle [oracle@oracle-learn ~] $env | grep ORACLEORACLE_SID=orclORACLE_BASE=/oracle/app/oracleORACLE_TERM=xtermORACLE_HOME=/oracle/app/oracle/product/ 11.2.0 [oracle @ oracle-learn ~] $

At this point, the preparation before Oracle installation is complete.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report