In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Linux silently installs oracle 11
Linux version [root@oracle ~] # cat / etc/issueCentOS release 6.5 (Final) Kernel\ r on an\ m Environment check top-16:05:23 up 8:34, 2 users, load average: 0.00,0.00, 0.00Tasks: 152total, 1 running, 151sleeping, 0 stopped, 0 zombieCpu (s): 0.0%us, 0.0%sy, 0.0% nippin 100.0% id, 0.0%wa, 0.0%hi 0.0%si, 0.0%stMem: 1906556k total, 1094320k used, 812236k free, 58280k buffersSwap: 2097144k total, 0k used, 2097144k free 839620k cached PID USER PR NI VIRT RES SHR S% CPU% MEM TIME+ COMMAND 1654 oracle-20 1185m 14m 13m S 0.70.8 1MEM TIME+ COMMAND 52.05 oracle 1799 oracle 200 1190m 49m 44m S 0.32.705.11 Oracle 16699 root 20 0 15036 1268 948 R 0.3 0.1 0:00.02 top 1 root 20 0 19364 1540 1228 S 0.0 0.1 0:02.77 init 2 root 20 00 00 S 0.0 0.00: 00.00 kthreadd 3 root RT 00 00 S 0.0 0.0 0:00.30 migration/0 4 root 20 00 00 S 0.0 0.00: 00.11 ksoftirqd/0 5 root RT 00 00 S 0.0 0.00: 00.00 migration/ 0 6 root RT 00 00 S 0.0 0.0 0:00.05 watchdog/0 7 root RT 00 00 S 0.0 0.0 0:00.01 migration/1 8 root RT 00 00 S 0.0 0.0 0:00. 00 migration/1 9 root 20 00 00 S 0.0 0.0 0:00.11 ksoftirqd/1 10 root RT 00 00 S 0.0 0 migration/2 df 00.05 watchdog/1 11 root RT 00 00 S 0.0 0 0 0.25 migration/2 df-h
Check swap partition, memory, disk size
Official download
Official document
Install jdk and download jdk-8u73-linux-x64.rpm
Jdk download
Install the rpm-ivh jdk-8u91-linux-x64.rpm configuration environment variable vi / etc/profile
Export JAVA_HOME=/usr/java/jdk1.8.0_91
Export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Export PATH=$PATH:$JAVA_HOME/bin
Test source / etc/profilejava-version to turn off selinux using the root user configuration environment variable
Selinux profile
[root@oracle] # cat / etc/sysconfig/selinux# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing-SELinux security policy is enforced.# permissive-SELinux prints warnings instead of enforcing.# disabled-No SELinux policy is loaded.SELINUX=disabled# SELINUXTYPE= can take one of these two values:# targeted-Targeted processes are protected # mls-Multi Level Security protection.SELINUXTYPE=targeted temporarily shuts down setenforce 0 permanently closes vim / etc/selinux/configSELINUX=disabled closes firewall service iptables stopsystemctl stop firewalldsystemctl disable firewalld modifies hostname hostname centos adds hostname [root@centos ~] # vi / etc/hosts127.0.0.1 localhost localhost::1 localhost centos in / etc/hosts file
ORA-00130: invalid listener address
Add a record corresponding to the hostname and IP, otherwise an error will be reported when installing the database
Install dependency package yum install gccyum install gcc-c++yum install libaio-develyum install compat-gcc-34yum install compat-gcc-34-c++ to establish users and groups groupadd oinstallgroupadd dbagroupadd operuseradd-g oinstall-G dba,oper oracleecho "oracle" | passwd-- stdin oracleid oracle [root@oracle ~] # id oracleuid=500 (oracle) gid=500 (oinstall) groups=500 (oinstall), 501 (dba) 502 (oper) establish installation directory, set file permissions mkdir-p / u01/app/oracle/ product/11.2.0/db_1mkdir / u01/app/oracle/oradatamkdir / u01/app/oracle/oraInventorymkdir / u01/app/oracle/fast_recovery_areachown-R oracle:oinstall / u01/appchmod-R 775 / u01/app modify parameters kernel parameter vim / etc/sysctl.conf
Fs.aio-max-nr = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 1073741824
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 = 1048576
After the modification, make it effective.
Sysctl-p
Note: kernel.shmmax = 1073741824 (byte) is half of the local physical memory
Modify system resource limits vim / etc/security/limits.conf
Oracle soft nproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
Modify user authentication options vim / etc/pam.d/loginsession required / lib/security/pam_limits.so
Session required pam_limits.so
Modify user profile vim / etc/profile
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
Modify oracle user environment variable vim ~ oracle/.bash_profile
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:$PATH
Export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
Prepare the installation file to upload the installation package to the / tmp directory to extract the modified answer file for silent installation
Oracle installation file name
Linux.x64_11gR2_database_1of2.zip
Linux.x64_11gR2_database_2of2.zip
Modify permissions
Chown-R oracle:oinstall. / linux.x64_11gR2_database_1of2.zipchown-R oracle:oinstall. / linux.x64_11gR2_database_2of2.zip
Switch oracle users to make the modified environment variable take effect
Su-oraclesource .bash _ profile
Extract the installation package and copy the answer file to the oracle user's directory
Cd / tmpunziap. / linux.x64_11gR2_database_1of2.zipunziap. / linux.x64_11gR2_database_2of2.zipcp-R / tmp/database/response/ / home/oracle/cd / home/oracle/response/
Answer file
Db_install.rsp: installation answer
Dbca.rsp: create database reply
Netca.rsp: establish the response to network settings such as monitoring, local service name, etc.
Oracle 11g silent installation-db_install.rsp details
Modify the answer file
Vim. / db_install.rsporacle.install.option=INSTALL_DB_SWONLYORACLE_HOSTNAME= localhost.localdomainUNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/u01/app/oraInventorySELECTED_LANGUAGES=en,zh_CNORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1ORACLE_BASE=/u01/app/oracleoracle.install.db.InstallEdition=EEoracle.install.db.DBA_GROUP=dbaoracle.install.db.OPER_GROUP=dbaDECLINE_SECURITY_UPDATES=true
Partial parameter meaning
The meanings of the parameters are as follows:-silent means to install silently without any prompts-force allows installation to a non-empty directory-noconfig indicates not to run the configuration assistant netca-responseFile indicates which response file to use and must use the absolute path oracle.install.responseFileVersion response file template version, this parameter does not change the oracle.install.option installation option, this example only installs the oracle software This parameter does not change whether DECLINE_SECURITY_UPDATES requires online security updates, set it to false, and do not change the ORACLE_HOSTNAME installation hostname UNIX_GROUP_NAME oracle user group name INVENTORY_LOCATION oracle product inventory directory SELECTED_LANGUAGES oracle running language environment, generally including citations and simplified and traditional Chinese ORACLE_HOME Oracle installation directory ORACLE_BASE oracle base directory oracle.install.db.InstallEdition installation version type Generally speaking, whether the enterprise version of oracle.install.db.isCustomInstall is customized or not, the default Partitioning,OLAP,RAT selects the list of oracle.install.db.customComponents custom installation components: in addition to the above default You can add the group name used by the Label Security and Database Vaultoracle.install.db.DBA_GROUP oracle users to grant OSDBA permissions the group name used by the oracle.install.db.OPER_GROUP oracle user to grant OSOPER permissions silently install cd / tmp/database./runInstaller-silent-responseFile / home/oracle/response/db_install.rsp-ignorePrereq...#Root scripts to run/u01/app/oracle/oraInventory/orainstRoot.sh/u01/app/oracle/product/11.2.0/db_1/ Root.shTo execute the configuration scripts: 1. Open a terminal window 2. Log in as "root" 3. Run the scripts 4. Return to this window and hit "Enter" key to continueSuccessfully Setup Software
The above information will be prompted after installation, and the above two scripts will be executed using the root user as required.
Silent configuration listener
Use oracle users
Netca / silent / responsefile / home/oracle/response/netca.rsp
Inspection
1. Generate listener.ora and sqlnet.ora in / u01/app/oracle/product/11.2.0/db_1/network/admin/
Ll / u01/app/oracle/product/11.2.0/db_1/network/admin/
2. You can view port 1521 listening through the netstat command.
Netstat-tnul | grep 1521 silently build the library dbca-silent-createDatabase-templateName General_Purpose.dbc-gdbname orcl-sid orcl-responseFile NO_VALUE-characterSet ZHS16GBK-memoryPercentage 30-emConfiguration LOCAL...85% complete96% complete100% completeLook at the log file "/ opt/app/oracle/cfgtoollogs/dbca/ora11g/ora11g.log" for further details.
The default is the startup state after the database is successfully installed.
Inspection
1. Check the instance process
Ps-ef | grep ora_ | grep-v grep
2. Check the monitoring status
Lsnrctl status
3. Log in to view the status of the instance
Sqlplus / as sysdba set Linux boot self-boot 7. Set Linux boot self-boot modify ORACLE_HOME_LISTNER
Change the ORACLE_HOME_LISTNER=$1 of the following two files to ORACLE_HOME_LISTNER=$ORACLE_HOME
Vim / u01/app/oracle/product/11.2.0/db_1/bin/dbstartvim / u01/app/oracle/product/11.2.0/db_1/bin/dbshut configure oratabvi / etc/oratab
Find testsid:/opt/oracle/102:N and change it to testsid:/opt/oracle/102:Y
Configure rc.localvi / etc/rc.d/rc.local
Add as follows
Su oracle-lc "/ u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start" su oracle-lc / u01/app/oracle/product/11.2.0/db_1/bin/dbstart add permissions chmod + x / etc/rc.d/rc.local Open port 1521 allows network connection service iptables stopvi / etc/sysconfig/iptables# Generated by iptables-save v1.4.7 on Fri Dec 16 07:29:41 2016*filter:INPUT ACCEPT [0: FORWARD ACCEPT [0:0]: OUTPUT ACCEPT [10 INPUT 892]-An INPUT-m state-- state RELATED ESTABLISHED-j ACCEPT-An INPUT-p icmp- j ACCEPT-An INPUT-I lo-j ACCEPT-An INPUT-p tcp-m state-state NEW-m tcp-dport 22-j ACCEPT-An INPUT-p tcp-m state-- state NEW-m tcp-dport 1521-j ACCEPT-An INPUT-j REJECT-reject-with icmp-host-prohibited-A FORWARD-j REJECT-reject-with icmp-host-prohibitedCOMMIT# Completed on Fri Dec 16 07:29:41 2016service iptables saveservice iptables restart
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.