Redhat7.2 install Oracle11.2.0.4 silently,
Redhat7.2 Silent Installation of Oracle11.2.0.4
We will install oracle in the/opt/oracle directory, and the subsequent environment variables will be based on this.
1. Set host hosts ing
Vi/etc/hosts
[Plain] view plain copy
127.0.0.1 localhost
192.168.61.110 DB
Ii. Install dependency Libraries
[Plain] view plain copy
Yum install-y compat-libstdc ++-33 elfutils-libelf-devel gcc-c ++ glibc-devel
Yum install-y ksh libaio-devel numactl-devel
Yum install-y unixODBC-devel oracleasm oracleasmlib oracleasm-support
For the installation of the dependent libraries, you can use the image of the virtual machine to install the local yum source. These dependent libraries are all in the operating system image. The production process of the local yum source is as follows:
First, upload the image to the hadoop user's Downloads directory and then mount the image.
[Plain] view plain copy
Mkdir/media/cdrom
Mount-o loop-t iso9660/home/hadoop/Downloads/rhel-server-7.0-x86_64-dvd.iso/media/cdrom/
Vi/etc/yum. repo. d/redhat-base.repo
Edit local yum source configuration file
[Plain] view plain copy
[Redhat-base]
Name = redhat-base
Baseurl = file: // media/cdrom
Gpgcheck = 0
Enable = 1
Then run yum repolist. Then you can run the yum install dependency libraries.
3. Preparation of users and user groups
[Plain] view plain copy
Groupadd dba
Groupadd oinstall
Useradd-g oinstall-G dba oracle
In addition, you must use the oracle user to set a password for the oracle user and use the root user to set a password for the oracle user.
[Plain] view plain copy
Passwd oracle
The prompt "Enter Password" appears. Enter the same password twice.
Iv. System Parameter Adjustment
/Etc/sysctl. conf
[Plain] view plain copy
Fs. file-max = 6815744
Kernel. sem = 250 32000 100 128
Kernel. shmmni = 4096
Kernel. shmall = 1073741824
Kernel. shmmax = 4398046511104
Kernel. panic_on_oops = 1
Net. core. rmem_default = 262144
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048576
Net. ipv4.conf. all. rp_filter = 2
Net. ipv4.conf. default. rp_filter = 2
Fs. aio-max-nr = 1048576
Net. ipv4.ip _ local_port_range = 9000 65500
Run the sysctl-p command to make the configuration take effect.
/Etc/security/limits. conf
[Plain] view plain copy
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft nproc 16384
Hard nproc 16384
Oracle soft stack 10240
Oracle hard stack 32768
Oracle hard memlock 134217728
Oracle soft memlock 134217728
V. installation directory settings
[Plain] view plain copy
Mkdir-p/opt/oracle
Mkdir-p/opt/database
Mkdir-p/opt/oraInventory
Chown-R oracle: oinstall/opt/app
Chmod 755/opt/app
Vi. environment variable settings
Modify the. bash_profile file in the oracle Home Directory and add the following variables:
[Plain] view plain copy
Export ORACLE_BASE =/opt/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/db_1
Export PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin
Export ROACLE_PID = ora11g
Export NLS_LANG = AMERICAN_AMERICA.AL32UTF8
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib
Export ORACLE_SID = orcl11g
Oracle users log on and run source ~ /. Bash_profile make the environment variable take effect.
In the environment preparation process, the tool can help us complete steps 2, 3, and 4, install dependencies, create users and user groups, and modify system parameters. Here we will introduce a method for installing through the network.
1. Download the configuration file of the yum Source
[Plain] view plain copy
Wget http://public-yum.oracle.com/public-yum-ol7.repo-O/etc/yum. repos. d/
Wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7-O/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Yum repolist
Yum makecache
We can run the command to see if the installation package with the oracle-rdbms-server-11gR2-preinstall is ready for use.
2. Install oracle_rdbms_server_11gR2_preinstall using yum to complete steps 2, 3, and 4 of manual operations.
Unzip the uploaded p13390677_112040_Linux-x86-64_1of7.zip, p13390677_112040_Linux-x86-64_2of7.zip two files get the data installation folder database (the author of the oracle Installation File downloaded and decompressed in the/home/oracle directory ):
The/home/oracle/database/response directory contains several installation files about oracle. Here, the Silent Installation Method of Oracle is used because there is no graphical interface:
./RunInstaller-silent-debug-force \
FROM_LOCATION =/home/oracle/database/stage/products. xml \
Oracle. install. option = INSTALL_DB_SWONLY \
UNIX_GROUP_NAME = oinstall \
INVENTORY_LOCATION =/opt/oraInventory \
ORACLE_HOME =/opt/oracle/product/11.2.0/db_1 \
ORACLE_HOME_NAME = "Oracle111 "\
ORACLE_BASE =/opt/oracle \
Oracle. install. db. InstallEdition = EE \
Oracle. install. db. isCustomInstall = false \
Oracle. install. db. DBA_GROUP = dba \
Oracle. install. db. OPER_GROUP = dba \
DECLINE_SECURITY_UPDATES = true
See http://blog.itpub.net/4227/viewspace-688497/ for details
Complete installation: Successfully Setup Software. This log indicates that the installation is complete.
6. open another window and run the following script with the root user.
/Opt/oracle/oraInventory/orainstRoot. sh
/Opt/oracle/app/oracle/product/11.2.0/dbhome_1/root. sh
7. Configure the listener
Netca/silent/responsefile/home/oracle/data/response/netca. rsp
After successful running, the sqlnet. ora and listener. ora files are generated under the/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin directory.
Run the netstat-tlnp command.
Tcp 0 0 0.0.0.0: 1521 0.0.0.0: * LISTEN 22494/tnslsnr
It indicates that the listener has started to work on port 1521.
View listener: lsnrctl status
Install the oracle database:
Dbca-silent-responseFile/home/oracle/database/response/dbca. rsp
Check instances after creating a database:
Ps-ef | grep ora _ | grep-v grep
Refer:
Https://blog.csdn.net/doegoo/article/details/53020892
Https://blog.csdn.net/feinifi/article/details/78412954
Http://blog.itpub.net/4227/viewspace-688497/
Http://www.mamicode.com/info-detail-1462357.html