Redhat 7 oracle 11g Silent Installation step tutorial, redhat11g

Source: Internet
Author: User

Redhat 7 oracle 11g Silent Installation step tutorial, redhat11g

I. Preparations before installation

1. Modify the Host Name

sed -i "s/HOSTNAME=localhost.localdomain/HOSTNAME=oracledb.01/" /etc/sysconfig/network

2. Add the host name to correspond to the IP address

vim /etc/hosts 

Append at the end: 192.168.0.71 oracledb.01

3. Disable seLinux

sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config setenforce 0

3. Install the dependency package

(1) The following are the dependent installation packages.

binutils-2.23.52.0.1-12.el7.x86_64 compat-libcap1-1.10-3.el7.x86_64 compat-libstdc++-33-3.2.3-71.el7.i686compat-libstdc++-33-3.2.3-71.el7.x86_64gcc-4.8.2-3.el7.x86_64 gcc-c++-4.8.2-3.el7.x86_64 glibc-2.17-36.el7.i686 glibc-2.17-36.el7.x86_64 glibc-devel-2.17-36.el7.i686 glibc-devel-2.17-36.el7.x86_64 kshlibaio-0.3.109-9.el7.i686 libaio-0.3.109-9.el7.x86_64 libaio-devel-0.3.109-9.el7.i686 libaio-devel-0.3.109-9.el7.x86_64 libgcc-4.8.2-3.el7.i686 libgcc-4.8.2-3.el7.x86_64 libstdc++-4.8.2-3.el7.i686 libstdc++-4.8.2-3.el7.x86_64 libstdc++-devel-4.8.2-3.el7.i686 libstdc++-devel-4.8.2-3.el7.x86_64 libXi-1.7.2-1.el7.i686 libXi-1.7.2-1.el7.x86_64 libXtst-1.2.2-1.el7.i686 libXtst-1.2.2-1.el7.x86_64 make-3.82-19.el7.x86_64 sysstat-10.1.5-1.el7.x86_64unixODBC-2.3.1-6.el7.x86_64 or laterunixODBC-2.3.1-6.el7.i686 or laterunixODBC-devel-2.3.1-6.el7.x86_64 or laterunixODBC-devel-2.3.1-6.el7.i686 or later
(2) Use yum for Installation

Method 1:

yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*i686 compat-libstdc++-33*.devel compat-libstdc++-33 compat-libstdc++-33*.devel gcc gcc-c++ glibc glibc*.i686 glibc-devel glibc-devel*.i686 ksh libaio libaio*.i686 libaio-devel libaio-devel*.devel libgcc libgcc*.i686 libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.devel libXi libXi*.i686 libXtst libXtst*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686

Method 2:

yum -y install gcc make binutils gcc-c++ compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf-devel-static elfutils-libelf-devel ksh libaio libaio-devel numactl-devel sysstat unixODBC unixODBC-devel pcre-devel

Note: It is recommended that you perform both operations. These operations are searched on the Internet. At first, only method 2 is executed, and the installation is not successful.

(3) Check installed dependency packages

rpm -q binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst  make sysstat  unixODBC unixODBC-devel

(4) Check uninstalled dependency packages

rpm -q binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel |grep "not installed"

If the installation is complete, no result is returned when you execute this command. This command detects uninstalled dependency packages. If all the packages are installed, the result is blank.

4. Disable the Firewall

(1) view the Firewall status: systemctl status firewalld (2) stop the firewall: systemctl stop firewalld (3) disable the self-starting Firewall Service: systemctl disable firewalld

5. Add the oinstall and dba groups, create oracle users, and add them to the oinstall and dba groups.

groupadd oinstallgroupadd dbauseradd -g oinstall -G dba oracle passwd oracleid oracle

Note: Each line is a command, and the last line is to check whether the account is successfully created.

6. Modify Kernel Parameters

vim /etc/sysctl.conf
Add the following settings to the file:
io-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 1073741824kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576

Run the following command to make the configuration take effect:

sysctl -p

7. Modify the user's restricted file

vi /etc/security/limits.conf

Add the following configuration to the file:

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

8. Modify the etc/pam. d/login file and add the following content:

Execute Command

vim /etc/pam.d/login

Add the following content:

session  required   /lib64/security/pam_limits.sosession  required   pam_limits.so

9. Modify the/etc/profile file

vim /etc/profile

Add the following content:

if [ $USER = "oracle" ]; then  if [ $SHELL = "/bin/ksh" ]; then   ulimit -p 16384   ulimit -n 65536  else   ulimit -u 16384 -n 65536  fifi

10. Create installation directory and modify File Permissions

mkdir -p /u01/app/oracle/product/11.2.0/db_1mkdir /u01/app/oracle/oradatamkdir /u01/app/oracle/inventorymkdir /u01/app/oracle/fast_recovery_areachown -R oracle:oinstall /u01/app/oraclechmod -R 775 /u01/app/oracle
11. Upload the oracle installation package to the/tmp directory.

Specific upload methods are self-Resolved

12. Unzip the installation package

unzip /tmp/linux.x64_11gR2_database_1of2.zip && unzip /tmp/linux.x64_11gR2_database_2of2.zip
Ii. Silent Installation of ORACLE databases

1. Switch to the oracle user and set the oracle user environment variables

Su-oracle // note that you can add a horizontal bar to the vim. bash_profile directory of the oracle user.
Add the following content:
ORACLE_BASE=/u01/app/oracleORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1ORACLE_SID=orclORACLE_PID=ora11gLD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/libPATH=$PATH:$ORACLE_HOME/binNLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8" export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_PID LD_LIBRARY PATH NLS_LANG
2. Edit the Silent Installation response File
(1) switch to the directory decompressed by the root user to go to the oracle Installation Package/tmp/database/response/to back up the db_install.rsp File
su - rootcp /tmp/database/response/db_install.rsp /tmp/database/response/db_install.rsp.bak vim /tmp/database/response/db_install.rsp

(2) edit the/tmp/database/response/db_install.rsp File

Add the following content:

Oracle. install. option = INSTALL_DB_SWONLY // installation type ORACLE_HOSTNAME = gljgdzc // host name (hostname query) UNIX_GROUP_NAME = oinstall // installation group INVENTORY_LOCATION =/u01/app/oracle/oraInventory // INVENTORY directory (default) selected_ages = en, zh_CN, zh_TW // select the language ORACLE_HOME =/u01/app/oracle/product/11.2.0/db_1/oracle_homeORACLE_BASE =/u01/app/oracle/oracle_baseoracle.install.db.InstallEdition = EE/oracle version of oracle. install. db. isCustomInstall = false // custom installation, No, use the default component oracle. install. db. DBA_GROUP = dba // dba user group oracle. install. db. OPER_GROUP = oinstall // Users Group oracle. install. db. config. starterdb. type = GENERAL_PURPOSE // Database type oracle. install. db. config. starterdb. globalDBName = orcl // globalDBNameoracle. install. db. config. starterdb. SID = orcl // SIDoracle. install. db. config. starterdb. memoryLimit = 81920 // memory for Automatic Memory Management (M) oracle. install. db. config. starterdb. password. ALL = oracle // set ALL database users to use the same password SECURITY_UPDATES_VIA_MYORACLESUPPORT = false // (manually write false) DECLINE_SECURITY_UPDATES = true // set security updates
Note: These attributes are available in this configuration file and can be changed directly.

3. Perform Silent Installation

su - oracle cd /tmp/database./runInstaller -silent -ignorePrereq -ignoreSysPrereqs -responseFile /tmp/database/response/db_install.rsp

Start Oracle Silent Installation in the background. During the installation process, if [WARNING] is prompted, the installer is still running in the background. If [FATAL] is displayed, the installer is stopped.

The installer is running in the background, and then open another terminal tab, enter the prompted session log directory: tail-f/u01/app/oracle/inventory/logs/installActions2017-06-09_03-00-09PM.log
Check the log to check whether the installation is successful. If the installation is successful, a successfully prompt is displayed.

4. Switch the root user to run the script
 su - root sh /u01/app/oracle/inventory/orainstRoot.sh sh /u01/app/oracle/product/11.2.0/db_1/root.sh
5. Use oracle user login configuration listening
su - oracle netca -silent -responseFile /tmp/database/response/netca.rsp
If the DISPLAY text is displayed, You need to configure the DISPLAY variable first, and then re-configure netca
 export DISPLAY=localhost:0.0
The listener. ora and sqlnet. ora files are generated in/u01/app/oracle/product/11.2.0/db_1/network/admin. You can go to the directory to check whether these two files exist.

6. Check whether the listening port is in use

Su-root // use the root user to view netstat-tnulp | grep 1521
7. Create a new database and create the corresponding instance

Switch to the root user and edit/tmp/database/response/dbca. rsp.

su - rootvim /tmp/database/response/dbca.rsp

Modify the following parameters:

GDBNAME = "orcl" SID = "orcl" SYSPASSWORD = "oracle" SYSTEMPASSWORD = "oracle" SYSMANPASSWORD = "oracle" DBSNMPPASSWORD = "oracle" DATAFILEDESTINATION =/u01/app/oracle/oradataRECOVERYAREADESTINATION =/u01/app/oracle/fast_recovery_areaCHARACTERSET = "ZHS16GBK" // note: GBK used here, if you need to use a UTF-8, change to AL32UTF8TOTALMEMORY = "1638"
8. Silently configure the orcl instance
su - oracle dbca -silent -responseFile /tmp/database/response/dbca.rsp
This is similar to the silent installation. After the installation is complete, a log is displayed. You can enable this log to check whether an error occurs.

9. Check the instance after creating the database.

ps -ef | grep ora_ | grep -v grep
10. view the listener status
 lsnrctl status
11. log on to sqlplus. The database should have been started. If not, log on to sqlplus and start it again.
sqlplus / as sysdbashutdown immediatestartup 

Related Article

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.