In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Setting up the environment before installing Oracle 11G
This experiment is based on the oracle 11g environment built under Linux (CentOS6.7_64). It is not the best choice to install oracle on CentOS. You can choose different Linux distributions, such as Oracle Linux, SuSE Linux, Red Hat, IBM AIX and so on.
Configuration requirements for VM or physical machines:
Installing oracle11g in the experimental environment requires at least 2G of memory, 2 cpu, 2G swap partitions and no less than 20g of disk space.
In order to ensure the performance of oracle in the production environment, it is recommended that the minimum configuration is 8 GB of memory, 4 cpu and 8 G swap partitions. If the production environment is busy, a higher configuration is required.
2. Preparation work before installing Oracle 11G
Upload oracle11g installation package and decompress it
Linux.x64_11gR2_database_1of2.zip
Linux.x64_11gR2_database_2of2.zip
Configure / etc/hosts file, add ip and hostname resolution
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6#eth010.11.12.88 hm
Create oracle related users and groups
[root@hm ~] # groupadd dba [root@hm ~] # groupadd oinstall [root@hm] # useradd-g oinstall-G dba-m oracle [root@hm ~] # id oracleuid=500 (oracle) gid=501 (oinstall) groups=501 (oinstall), 500 (dba)
Create an oracle software installation directory
[root@hm] # mkdir / u01/app/oracle-p [root@hm ~] # chown-R oracle. / u01 / [root@hm ~] # chmod 775-R / u01 / [root@hm ~] # ls-ld / u01/drwxr-xr-x. 3 oracle oinstall 4096 Oct 14 22:58 / u01/
Set oracle user environment variable, enter su under oracle user, modify ~ / .bash_profile file, and add the following
Export TMP=/tmpexport TMPDIR=$TMPexport ORACLE_TERM=xtermexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/dbexport ORACLE_SID=orclexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/lib64if [$USER = "oracle"]; then if [$SHELL = "/ bin/ksh"]; then ulimit-p 16384 ulimit-n 65536 else ulimit-u 16384-n 65536 fifi
Modify kernel parameters, open the / etc/sysctl.conf file, add the following parameters, and modify the / etc/security/limits.conf file
Kernel.shmmax = 68719476736kernel.shmall = 4294967296net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576fs.aio-max-nr = 1048576net.ipv4.ip_local_port_range = 9000 65500fs.file-max = 6815744kernel.sem = 25032000100 128kernel.shmmni = 4096 [root@hm ~] # sysctl-pnet.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.default.accountsources _ Route = 0kernel.sysrq = 0kernel.core_uses_pid = 1net.ipv4.tcp_syncookies = 1kernel.msgmnb = 65536kernel.msgmax = 65536kernel.shmmax = 68719476736kernel.shmall = 4294967296kernel.shmmax = 68719476736kernel.shmall = 4294967296net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576fs.aio-max-nr = 1048576net.ipv4.ip_local_port_range = 9000 65500fs.file-max = 6815744kernel.sem = 25032000 100 128kernel.shmmni = 4096 in / etc Add the following content oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 4096oracle hard nofile 65536 at the end of the / security/limits.conf file and modify the / etc/pam.d/login file at the same time Add the following session required pam_limits.so
Install software packages that oracle depends on
[root@hm ~] # yum install gcc gcc-c++ libaio glibc compat-libstdc++-33 elfutils-libelf-devel libaio-devel libgcc libstdc++ libstdc++-devel unixODBC unixODBC-devel glibc-common ksh make sysstat pdksh
[root@hm ~] # yum install glibc-2.12-1.192.el6.i686
Check if it is installed
[root@hm] # for i in gcc gcc-c++ libaio glibc compat-libstdc++-33 elfutils-libelf-devel libaio-devel libgcc libstdc++ libstdc++-devel unixODBC unixODBC-devel glibc-common ksh make sysstat pdksh;do rpm-Q $I done
Gcc-4.4.7-17.el6.x86_64
Gcc-c++-4.4.7-17.el6.x86_64
Libaio-0.3.107-10.el6.x86_64
Glibc-2.12-1.192.el6.x86_64
Compat-libstdc++-33-3.2.3-69.el6.x86_64
Elfutils-libelf-devel-0.164-2.el6.x86_64
Libaio-devel-0.3.107-10.el6.x86_64
Libgcc-4.4.7-17.el6.x86_64
Libstdc++-4.4.7-17.el6.x86_64
Libstdc++-devel-4.4.7-17.el6.x86_64
UnixODBC-2.2.14-14.el6.x86_64
UnixODBC-devel-2.2.14-14.el6.x86_64
Glibc-common-2.12-1.192.el6.x86_64
Ksh-20120801-33.el6.x86_64
Make-3.81-23.el6.x86_64
Sysstat-9.0.4-31.el6.x86_64
Package pdksh is not installed
Third, install oracle11g software
Extract the oracle11g software package
[root@hm oracle] # unzip linux.x64_11gR2_database_1of2.zip
[root@hm oracle] # unzip linux.x64_11gR2_database_2of2.zip
[root@hm oracle] # chown-R oracle. Database/ [root@hm oracle] # ls-l database/total 36drwxr-xr-x. 12 oracle oinstall 4096 Aug 17 2009 docdrwxr-xr-x. 4 oracle oinstall 4096 Aug 15 2009 installdrwxrwxr-x. 2 oracle oinstall 4096 Aug 15 2009 responsedrwxr-xr-x. 2 oracle oinstall 4096 Aug 15 2009 rpm-rwxr-xr-x. 1 oracle oinstall 3226 Aug 15 2009 runInstallerdrwxrwxr-x. 2 oracle oinstall 4096 Aug 15 2009 sshsetupdrwxr-xr-x. 14 oracle oinstall 4096 Aug 15 2009 stage-rw-r--r--. 1 oracle oinstall 5402 Aug 18 2009 welcome.html
Install oracle as an orcle user login graphical interface, or remotely using vnc. Here you can use Xshell to remotely call the linux graphical interface for installation.
[root@hm ~] # su-oracle [oracle@hm ~] $export DISPLAY=10.11.12.1:0.0 [oracle@hm ~] $xhost +
Go to the database directory and execute runInstalle
[oracle@hm] $cd / usr/local/src/oracle/database/ [oracle@hm database] $. / runInstaller Starting Oracle Universal Installer...Checking Temp space: must be greater than 120 MB. Actual 21645 MB PassedChecking swap space: must be greater than 150 MB. Actual 4095 MB PassedChecking monitor: must be configured to display at least 256 colors. Actual 16777216 PassedPreparing to launch Oracle Universal Installer from / tmp/OraInstall2016-10-15-12-48-55PM. Please wait...
Enter the graphical interface to install
[root@hm] # / u01/app/oraInventory/orainstRoot.shChanging permissions of / u01/app/oraInventory.Adding read,write permissions for group.Removing read,write Execute permissions for world.Changing groupname of / u01/app/oraInventory to oinstall.The execution of the script is complete. [root@hm ~] # / u01/app/oracle/db/root.shRunning Oracle 11g root.sh script...The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= / u01/app/oracle/dbEnter the full pathname of the local bin directory: [/ usr/local/bin]: Copying dbhome to / usr/local/bin. Copying oraenv to / usr/local/bin... Copying coraenv to / usr/local/bin... Creating / etc/oratab file...Entries will be added to the / etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root.sh script.Now product-specific root actions will be performed.Finished product-specific root actions.
Initiate monitoring
[oracle@hm] $lsnrctl startLSNRCTL for Linux: Version 11.2.0.1.0-Production on 15-OCT-2016 23:30:07Copyright (c) 1991, 2009, Oracle. All rights reserved.Starting / u01/app/oracle/db/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 11.2.0.1.0-ProductionLog messages written to / u01/app/oracle/diag/tnslsnr/hm/listener/alert/log.xmlListening on: (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=hm) (PORT=1521)) Connecting to (ADDRESS= (PROTOCOL=tcp) (HOST=) (PORT=1521)) STATUS of the LISTENER-- -- Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0-ProductionStart Date 15-OCT-2016 23:30:09Uptime 0 days 0 hr. 0 min. 1 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Log File / u01/app/oracle/diag/tnslsnr/hm/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=hm) (PORT=1521) The listener supports no servicesThe command completed successfully
Create a database instance, which is created by using dbca tools under oracle users.
[oracle@hm ~] $dbca
Check the installation completion to see the oracle process and monitoring status
[oracle@hm ~] $ps-ef | grep ora_oracle 6636 10 23:41? 00:00:00 ora_pmon_orcloracle 6638 10 23:41? 00:00:04 ora_vktm_orcloracle 6642 10 23:41? 00:00:00 ora_gen0_orcloracle 6644 10 23:41? 00:00:00 ora_diag_orcloracle 6646 10 23:41 ? 00:00:00 ora_dbrm_orcloracle 6648 1 0 23:41? 00:00:00 ora_psp0_orcloracle 6650 1 0 23:41? 00:00:05 ora_dia0_orcloracle 6652 1 0 23:41? 00:00:00 ora_mman_orcloracle 6654 1 0 23:41? 00:00:00 ora_dbw0_orcloracle 6656 1 0 23:41 ? 00:00:00 ora_lgwr_orcloracle 6658 1 0 23:41? 00:00:00 ora_ckpt_orcloracle 6660 1 0 23:41? 00:00:00 ora_smon_orcloracle 6662 1 0 23:41? 00:00:00 ora_reco_orcloracle 6664 1 0 23:41? 00:00:02 ora_mmon_orcloracle 6666 1 0 23:41 ? 00:00:02 ora_mmnl_orcloracle 6668 1 0 23:41? 00:00:00 ora_d000_orcloracle 6670 1 0 23:41? 00:00:00 ora_s000_orcloracle 6719 1 0 23:41? 00:00:00 ora_qmnc_orcloracle 6739 1 0 23:41? 00:00:01 ora_cjq0_orcloracle 6832 1 0 23:41 ? 00:00:00 ora_q000_orcloracle 6834 10 23:41? 00:00:00 ora_q001_orcloracle 6842 10 23:42? 00:00:00 ora_smco_orcloracle 6844 10 23:42? 00:00:00 ora_w000_orcloracle 15858 2208 0 23:59 pts/0 00:00:00 grep ora_ [oracle@hm ~] $lsnrctl statusLSNRCTL for Linux: Version 11 .2.0.1.0-Production on 15-OCT-2016 23:59:58Copyright (c) 1991 2009, Oracle. All rights reserved.Connecting to (ADDRESS= (PROTOCOL=tcp) (HOST=) (PORT=1521)) STATUS of the LISTENER----Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0-ProductionStart Date 15-OCT-2016 23:30:09Uptime 0 days 0 hr. 29 min. 50 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Log File / u01/app/oracle/diag/tnslsnr/hm/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=hm) (PORT=1521)) Services Summary...Service "orcl" has 1 instance (s). Instance "orcl", status READY, has 1 handler (s) for this service...Service "orclXDB" has 1 instance (s). Instance "orcl", status READY, has 1 handler (s) for this service...The command completed successfully
Log in to the oracle database to view the database instance status, instance name, database file, and log file
SQL > select status from vain instance > STATUSMuir OPENSQL > select name from vault database > NAMEML ORCLSQL > select name from v$datafile NAME----/u01/app/oracle/oradata/orcl/system01.dbf/u01/app/oracle/oradata/orcl/sysaux01.dbf/u01/app/oracle/oradata/orcl/ Undotbs01.dbf/u01/app/oracle/oradata/orcl/users01.dbfSQL > select member from v$logfile MEMBER----/u01/app/oracle/oradata/orcl/redo03.log/u01/app/oracle/oradata/orcl/redo02.log/u01/app/oracle/oradata/orcl/redo01.log
View oracle database version
SQL > select * from v$version BANNER----Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit ProductionPL/SQL Release 11.2.0.1.0-ProductionCORE 11.2.0. 1.0 ProductionTNS for Linux: Version 11.2.0.1.0-ProductionNLSRTL Version 11.2.0.1.0-Production
Shutdown and startup
Close the database instance
SQL > shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.
Turn off snooping
[oracle@hm] $lsnrctl stopLSNRCTL for Linux: Version 11.2.0.1.0-Production on 16-OCT-2016 00:16:41Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (ADDRESS= (PROTOCOL=tcp) (HOST=) (PORT=1521)) The command completed successfully [oracle@hm ~] $ps-ef | grep ora_oracle 16987 2208 0 00:17 pts/0 00:00:00 grep ora_
Initiate monitoring
[oracle@hm ~] $lsnrctl start
Start the instance
[oracle@hm] $sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Sun Oct 16 00:19:39 2016Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to an idle instance.SQL > startup;ORACLE instance started.Total System Global Area 780824576 bytesFixed Size 2217424 bytesVariable Size 599788080 bytesDatabase Buffers 171966464 bytesRedo Buffers 6852608 bytesDatabase mounted.Database opened.SQL > select status from
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.