In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to install oracle 11g database under linux. I hope you will gain a lot after reading this article. Let's discuss it together.
Install oracle 11g database on the command line under linux
1. Prepare:
The basic environment for this installation: centos6.10 is installed in vmware (virtual machine installation is not described here)
Virtual machine requirements: more than 2 GB of memory is recommended
You need to download the corresponding oracle installation package under the Linux version:
Download address: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Corresponding oracle version:
Linux.x64_11gR2_database_1of2.zip
Linux.x64_11gR2_database_2of2.zip
Course
2. Modification of machine basic configuration
(1) setup system: Oracle only supports operating system Red Hat Enterprise Linux 6, so you need to change the content in / etc/redhat-release to Red Hat.
[root@Oracle ~] # vi / etc/redhat-release # CentOS release 6.10 (Final) Red Hat Enterprise Linux 6
(2) unnecessary services of machine information shutdown, selinux, firewall
[root@Oracle ~] # cat / etc/selinux/config / / selinux shutdown (disabled) # 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 [root@Oracle ~] # / etc/init.d/iptables stop / / Firewall off [root@Oracle ~] # vi / etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.152.130 Oracle / / New line: IP machine name (this is my ip and host name)
(3) modify the user's restriction file
[root@Oracle ~] # cat / etc/security/limits.conf / / add the following to the file oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240
(4) modify kernel parameters
[root@Oracle ~] # cat / etc/sysctl.conf / / add the following to the file: net.ipv4.ip_local_port_range= 9000 65500 fs.file-max = 6815744 kernel.shmall = 10523004 kernel.shmmax = 6465333657 kernel.shmmni = 4096 kernel.sem = 25032000 100128 net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=4194304 net.core.wmem_max=1048576 fs.aio-max-nr = 1048576 [root@Oracle ~] # sysctl-p / / execute this statement to make the configuration effective
(5) dependent package installation
[root@Oracle ~] # yum-y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutils-libelf-devel gcc gcc-c++ glibc*.i686 glibc glibc-devel glibc-devel*.i686 ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-devel*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686 libXp3, create users, groups, installation directories
(1) set up users and groups
[root@Oracle ~] # groupadd oinstall [root@Oracle ~] # groupadd dba [root@Oracle ~] # groupadd oper [root@Oracle ~] # useradd-g oinstall-G dba,oper oracle [root@Oracle ~] # echo "oracle" | passwd-- stdin oracle [root@Oracle ~] # id oracle / / View the user group uid=501 (oracle) gid=501 (oinstall) groups=501 (oinstall), 502 (dba), 503 (oper)
(2) create a new installation directory
[root@Oracle ~] # mkdir-p / var/app [root@Oracle ~] # mkdir-p / var/app/oracle [root@Oracle ~] # mkdir-p / var/app/oracle/product [root@Oracle ~] # mkdir-p / var/app/oracle/product/11.2.0 [root@Oracle ~] # mkdir-p / var/app/oracle/product/11.2.0/dbhome_1 [root@Oracle ~] # mkdir-p / home/oracle/backup [root@Oracle ~] # mkdir-p / home/oracle/oraInventory [root@Oracle ~] # chown-R oracle:oinstall / var/app [root@Oracle ~] # chown-R oracle:oinstall / home/oracle/backup [root@Oracle ~] # chown-R oracle:oinstall / home/oracle/oraInventory [root@Oracle ~] # chmod-R 775 / var/app
(3) set and refresh environment variables
[root@Oracle ~] # cat / home/oracle/.bash_profile / / add the following to the file umask 022export ORACLE_BASE=/var/appexport ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1export ORACLE_SID=ora11gexport PATH=$PATH:$HOME/bin:$ORACLE_HOME/binexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/ lib [root @ Oracle ~] # source / home/oracle/.bash_profile / / execute this sentence to make the configuration effective 4. Install Oracle
(1) copy the Oracle installation file to the specified directory
[root@Oracle ~] # cp linux.x64_11gR2_database_*.zip / var/app/oracle/
(2) switch to the oracle user and extract the installation package
[root@Oracle ~] # su-oracle [oracle@Oracle ~] $cd / var/app/oracle/ [oracle@Oracle oracle] $unzip linux.x64_11gR2_database_ 1 of 2.zip [oracle @ Oracle oracle] $unzip linux.x64_11gR2_database_2of2.zip
After decompressing, you get the database directory, in which there are three rsp files in the response directory, which are used as templates for answering files during silent installation. They are:
[oracle@Oracle response] $ls-ltotal 76 oracle oinstall Aug RW rwxrwxr-x-1 oracle oinstall 44960 RWMurr 8 17:10 dbca.rsp / / installation answer-rw-rw-r-- 1 oracle oinstall 22752 Aug 8 14:23 db_install.rsp / / create database reply-rwxrwxr-x 1 oracle oinstall 5740 Feb 26 2009 netca.rsp / / establish monitoring, local service name and other network settings
(5) modify the configuration file and install the Oracle database
[oracle@Oracle database] $cp / var/app/oracle/database/response/ / home/oracle/ backup
(6) the modified silent installation configuration file db_install.rsp is as follows:
[root@db response] # cat db_install.rsp | grep-v'^ #'| grep-v'^ $'oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0oracle.install.option=INSTALL_DB_SWONLYORACLE_HOSTNAME=dbUNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/var/app/oracle/oraInventorySELECTED_LANGUAGES=en Zh_CNORACLE_HOME=/var/app/oracle/product/11.2.0/dbhome_1ORACLE_BASE=/var/app/oracleoracle.install.db.InstallEdition=EEoracle.install.db.isCustomInstall=falseoracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0 Oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0 Oracle.rdbms.rat:11.2.0.1.0oracle.install.db.DBA_GROUP=dbaoracle.install.db.OPER_GROUP=oinstalloracle.install.db.CLUSTER_NODES=oracle.install.db.config.starterdb.type=GENERAL_PURPOSEoracle.install.db.config.starterdb.globalDBName=ora11goracle.install.db.config.starterdb.SID=ora11goracle.install.db.config.starterdb.characterSet=AL32UTF8oracle.install.db.config.starterdb.memoryOption=trueoracle.install.db.config.starterdb.memoryLimit=1500oracle.install.db.config.starterdb.installExampleSchemas=falseoracle.install.db.config.starterdb. EnableSecuritySettings=trueoracle.install.db.config.starterdb.password.ALL=oracleoracle.install.db.config.starterdb.password.SYS=oracle.install.db.config.starterdb.password.SYSTEM=oracle.install.db.config.starterdb.password.SYSMAN=oracle.install.db.config.starterdb.password.DBSNMP=oracle.install.db.config.starterdb.control=DB_CONTROLoracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=falseoracle.install.db.config.starterdb.dbcontrol.emailAddress=oracle.install.db.config.starterdb.dbcontrol. SMTPServer=oracle.install.db.config.starterdb.automatedBackup.enable=falseoracle.install.db.config.starterdb.automatedBackup.osuid=oracle.install.db.config.starterdb.automatedBackup.ospwd=oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGEoracle.install.db.config.starterdb.fileSystemStorage.dataLocation=oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=oracle.install.db.config.asm.diskGroup=oracle.install.db.config.asm.ASMSNMPPassword=MYORACLESUPPORT_USERNAME=MYORACLESUPPORT_PASSWORD=SECURITY_UPDATES_VIA_MYORACLESUPPORT=DECLINE_SECURITY_UPDATES=truePROXY_HOST=PROXY_PORT=PROXY_USER=PROXY_PWD=
(7) start silent installation
[oracle@Oracle database] $cd / var/app/oracle/database [oracle@Oracle database] $. / runInstaller-silent-responseFile / var/app/oracle/database/response/db_install.rsp
(8) check the installation progress
[oracle@Oracle database] $cd / var/app/oracle/oraInventory/logs [oracle@Oracle logs] $tail-f installActions*log
(9) when the following information appears
Var/app/oracle/oraInventory/orainstRoot.shvar/app/oracle/product/11.2.0/dbhome_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
Open a new client to execute the following script using the root identity
[root@Oracle ~] # var/app/oracle/oraInventory/orainstRoot.sh [root@Oracle ~] # var/app/oracle/product/11.2.0/dbhome_1/root.sh
(10) after executing the above script, go back to the installation interface and press Enter to continue.
5. Configure Oracle snooping
(1) run the listening file
[oracle@Oracle ~] $cd / var/app/oracle/database/response [oracle@Oracle response] $netca / silent / responsefile / var/app/oracle/database/response/netca.rsp
After running successfully, two files, sqlnet.ora and listener.ora, are generated in the / var/app/oracle/product/11.2.0/dbhome_1/network/admin directory
[oracle@Oracle admin] $lslistener.ora samples shrept.lst sqlnet.ora tnsnames.ora
Execute the following command to see if the listener is already working on port 1521
[root@Oracle ~] # netstat-tlnp | grep 1521tcp 0 0: 1521: * LISTEN 1792/tnslsnr
If the listener is not started, start the listener manually
[oracle@Oracle ~] $lsnrctl start
(2) configure Oracle database
[oracle@Oracle response] $pwd/var/app/oracle/database/response [oracle@Oracle response] $vi dbca.rspGDBNAME = "orcl11.us.oracle.com" / / 78 line global database name = SID+ host domain name SID= "ora11g" / / 149line SIDSYSPASSWORD = "oracle" / / 190line SYSTEMPASSWORD = "oracle" / / 200line CHARACTERSET= "AL32UTF8" / / 415line code NATIONALCHARACTERSET= "UTF8" / / 425line code
(3) create a database
[oracle@Oracle ~] $ORACLE_HOME/bin/dbca-silent-responseFile / var/app/oracle/database/response/dbca.rsp6, start the database
Enter the Oracle SQL command line
[oracle@Oracle ~] $sqlplus / as sysdbaSQL > startupORA-01078: failure in processing system parametersLRM-00109: could not open parameter file'/ var/app/oracle/product/11.2.0/dbhome_1/dbs/initora11g.ora'
The above error occurs during startup, and the solution is as follows: find the init.ora.78201817526 file and copy it to the / var/app/oracle/product/11.2.0/dbhome_1/dbs directory
[oracle@Oracle admin] $locate init.ora/ / locate the target file / var/app/admin/orcl11g/pfile/init.ora.78201817526 / / object file / var/app/oracle/product/11.2.0/dbhome_1/dbs/init.ora/var/app/oracle/product/11.2.0/dbhome_1/srvm/admin/init.ora [oracle@Oracle admin] $cd / var/app/admin/ Orcl11g/pfile/ [oracle@Oracle pfile] $lsinit.ora.78201817526 [oracle@Oracle pfile] $cp init.ora.78201817526 / var/app/oracle/product/11.2.0/dbhome_1/dbs/ [Oracle @ Oracle dbs] $mv init.ora.78201817526 initora11g.ora / / change the target file to the desired file name
Go to the Oracle SQL command line and execute startup
[oracle@Oracle] $sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Fri Aug 10 01:59:43 2018Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL > startup / / start the database instance ORACLE instance started.Total System Global Area 839282688 bytesFixed Size 2217992 bytesVariable Size 494929912 bytesDatabase Buffers 339738624 bytesRedo Buffers 2396160 bytesDatabase mounted.Database opened. After reading this article, I believe you have a certain understanding of the method of installing oracle 11g database under linux. Want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!
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.