Oracle installation Simple article
Install preparation Packages
linuxredhat5.8 Operating System
ORACLE11G (Below is the package name)
Linux.x64_11gR2_database_1of2.zip
Linux.x64_11gR2_database_2of2.zip
Installation Preparation
Configure Ip,hosts, host name.
Note the Hosts file must correspond to the host name. Following
127.0.0.1 localhost.localdomain localhost::1 localhost6.localdomain6 localhost6192.168.66.249 D Bserver.cjl.com
Configuring Oracle Environment Scripts
#!/bin/bash# Viewing memory size echo "MEM&NBSP;CHECK:SWAP&NBSP;>2G,MEM&NBSP;>2G" grep -i memtotal / proc/meminfogrep -i swaptotal /proc/meminfo# configuring Yum Local source cat <<end >/etc/ yum.repos.d/rhel.repo[local][local]calbaseurl=file:///mnt/server/enabled=1gpgcheck=0end# mount the disc and install the plugin mount / dev/cdrom /mntyum -y groupinstall "Development tools" yum -y install binutils compat-libstdc++-33 elfutils-* gcc gcc-c++* glibc* kernel-headers ksh libaio* libgcc# Configuring Routing cat <<end >> /etc/sysctl.conffs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 536870912kernel.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 = 1048576endsysctl -p# create user groups and users and authorize groupadd -g 500 oinstallgroupadd -g 501 dbauseradd -g oinstall -g dba oracleecho "123123" |passwd --stdin oraclemkdir /opt/oraclechown -r oracle:oinstall /opt/oraclechmod -r 775 /opt/oraclesudo mkdir /opt/tmpsudo chmod a+rw /opt/tmp# Adding user Environment variables cat <<end >>/home/oracle/.bash_profileumask 022export Oracle_base=/opt/oracleexport oracle_home=\ $ORACLE _base/product/11.2/db_1export oracle_sid= Orclexport lang=zh_cn. Utf-8export nls_lang= "American_america". Zhs16gbkexport path=\ $PATH: \ $ORACLE _home/binexport display=:0.0end# Add authentication module cat <<end >>/etc/pam.d/loginsession required /lib64/security/ pam_limits.sosession required pam_limits.soend# Set Oracle Limit cat <<end >>/etc/security/ Limits.conforacle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240end#oracle Soft Stack Limit Cat <<end >>/etc/profileif [ $USER = "Oracle" ];then if [ \ $SHELL = "/bin/ksh" ];then ulimit -p 16384 ulimit -p 65536 else ulimit -u 16384 -n 65536 fifiend
Unzip the ORACLE11G package to the Oracle user's home directory
unzip-d/home/oracle linux.x64_11gR2_database_1of2.zip && unzip-d/home/oraclelinux.x64_11gr2_database_ 2of2.zip
Allow user Oracle to access from native
[Email protected] ~]# xhost +access control disabled, clients can connect from any host
Switch users and go to unzip directory to run the installation
[[email protected] ~]# su-oracle[[email protected] ~]$ Lsdatabase[[email protected] ~]$ CD Database/[[email protected] D atabase]$./runinstaller
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/5A/wKiom1X6vC2xhIsMAAIydIGjJVg601.jpg "title=" 2015-09-17_191548.png "alt=" Wkiom1x6vc2xhismaaiydigjjvg601.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/57/wKioL1X6vnKymbIYAACLMQuWO8Q451.jpg "title=" 2015-09-17_191600.png "alt=" Wkiol1x6vnkymbiyaaclmquwo8q451.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/5A/wKiom1X6vEbTNkLcAAG-lZb5nlU092.jpg "title=" 2015-09-17_191621.png "alt=" Wkiom1x6vebtnklcaag-lzb5nlu092.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/57/wKioL1X6vo7zbtK0AAIX5VWKnTE566.jpg "title=" 2015-09-17_191635.png "alt=" Wkiol1x6vo7zbtk0aaix5vwknte566.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/5A/wKiom1X6vGjhPm2jAAGsq1IvpHE176.jpg "title=" 2015-09-17_191647.png "alt=" Wkiom1x6vgjhpm2jaagsq1ivphe176.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/5A/wKiom1X6vHXxElRuAAIhacBz5qc286.jpg "title=" 2015-09-17_191659.png "alt=" Wkiom1x6vhxxelruaaihacbz5qc286.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/57/wKioL1X6vr6BNcfcAALVogyTkrw823.jpg "title=" 2015-09-17_191739.png "alt=" Wkiol1x6vr6bncfcaalvogytkrw823.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/5A/wKiom1X6vIbCwlgrAAKAExp0nn8584.jpg "title=" 2015-09-17_191802.png "alt=" Wkiom1x6vibcwlgraakaexp0nn8584.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/57/wKioL1X6vtuByBpiAACa2hLI_0U241.jpg "title=" 2015-09-17_191821.png "alt=" Wkiol1x6vtubybpiaaca2hli_0u241.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/5A/wKiom1X6vKPzRAhKAALWWzma2Qk676.jpg "title=" 2015-09-17_191837.png "alt=" Wkiom1x6vkpzrahkaalwwzma2qk676.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/57/wKioL1X6vtzhXDe2AAFa91Oubyo476.jpg "title=" 2015-09-17_192837.png "alt=" Wkiol1x6vtzhxde2aafa91oubyo476.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/5A/wKiom1X6vKSBR0ajAAJF2FQiAP4159.jpg "title=" 2015-09-17_205148.png "alt=" Wkiom1x6vksbr0ajaajf2fqiap4159.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/57/wKioL1X6v2aTSiakAAGA5brN1-k174.jpg "title=" 2015-09-17_211435.png "alt=" Wkiol1x6v2atsiakaaga5brn1-k174.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/5A/wKiom1X6vS7RWCyUAAFK2aaH8iY087.jpg "title=" 2015-09-17_211454.png "alt=" Wkiom1x6vs7rwcyuaafk2aah8iy087.jpg "/>
Run the root user to execute the prompt script
[[email protected] ~]# /opt/oracle/orainventory/orainstroot.sh Change Permissions/opt/oracle/ Orainventory. Add read and Write permissions for the group. Deletes the global read, write and Execute permissions. Change the group name/opt/oracle/orainventory to oinstall. The execution of the script is complete. [[email protected] ~]# /opt/oracle/product/11.2/db_1/root.sh running oracle 11g root.sh script ... The following environment variables are set as: oracle_ Owner= oracle oracle_home= /opt/oracle/product/11.2/db_1enter 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 &NBSP, ..... Creating /etc/oratab file ... Entries will be added to the /etc/oratab&nbsP;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. [[email protected] ~]#
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/5A/wKiom1X6vhfS_GM_AAGQWzq5Wv8515.jpg "title=" 2015-09-17_211834.png "alt=" Wkiom1x6vhfs_gm_aagqwzq5wv8515.jpg "/>
Visit the above address test https://dbserver.cjl.com:1158/em/
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/5A/wKiom1X6zAvhPAf3AANKO9RKmEE610.jpg "title=" 2015-09-17_221759.png "alt=" Wkiom1x6zavhpaf3aanko9rkmee610.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/5A/wKiom1X6zAvzMt-2AATrFGDKY9A444.jpg "title=" 2015-09-17_221919.png "alt=" Wkiom1x6zavzmt-2aatrfgdky9a444.jpg "/>
Oracle User Access Testing
[Email protected] database]$ sqlplus sys as sysdbasql*plus:release 11.2.0.1.0 Production on Fri Sep 05:28:47 2015Copy Right (c) 1982, Oracle. All rights reserved. Enter password:connected to:oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit productionwith the Partitio Ning, OLAP, Data Mining and Real application testing optionssql> show user; USER is "SYS" sql>
Add a database to the graphical interface
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/5A/wKiom1X6yGegWF_bAAGlo8wlV4A368.jpg "title=" 2015-09-17_215918.png "alt=" Wkiom1x6ygegwf_baaglo8wlv4a368.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/58/wKioL1X6yp_COQzIAAHNPUeqiAE918.jpg "title=" 2015-09-17_215932.png "alt=" Wkiol1x6yp_coqziaahnpueqiae918.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/5A/wKiom1X6yGfi7OO5AAIeBL7hqSs985.jpg "title=" 2015-09-17_215945.png "alt=" Wkiom1x6ygfi7oo5aaiebl7hqss985.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/58/wKioL1X6yp-z-Pq-AAHEWv0vpls894.jpg "title=" 2015-09-17_220011.png "alt=" Wkiol1x6yp-z-pq-aahewv0vpls894.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/5A/wKiom1X6yGehb7_eAAHyojPGnqw331.jpg "title=" 2015-09-17_220034.png "alt=" Wkiom1x6ygehb7_eaahyojpgnqw331.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/58/wKioL1X6yraB_BnKAAHd66neaBU575.jpg "title=" 2015-09-17_220054.png "alt=" Wkiol1x6yrab_bnkaahd66neabu575.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/5A/wKiom1X6yH6hmF4_AAJXVhPqW8I908.jpg "title=" 2015-09-17_220108.png "alt=" Wkiom1x6yh6hmf4_aajxvhpqw8i908.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/58/wKioL1X6yrbhbGijAAIRbL3qE-Q834.jpg "title=" 2015-09-17_220124.png "alt=" Wkiol1x6yrbhbgijaairbl3qe-q834.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/5A/wKiom1X6yH6COXenAAHOU61zDQQ593.jpg "title=" 2015-09-17_220145.png "alt=" Wkiom1x6yh6coxenaahou61zdqq593.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/58/wKioL1X6ysjBUPuxAAId7tyFCcM933.jpg "title=" 2015-09-17_220154.png "alt=" Wkiol1x6ysjbupuxaaid7tyfccm933.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/5A/wKiom1X6yJCjXIMCAAJyPbTgsnw457.jpg "title=" 2015-09-17_220208.png "alt=" Wkiom1x6yjcjximcaajypbtgsnw457.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/58/wKioL1X6ysjgatRdAAHBZgp_OzA757.jpg "title=" 2015-09-17_220219.png "alt=" Wkiol1x6ysjgatrdaahbzgp_oza757.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/5A/wKiom1X6yJDDCzxEAAGQbMwqgNg501.jpg "title=" 2015-09-17_220233.png "alt=" Wkiom1x6yjddczxeaagqbmwqgng501.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/58/wKioL1X6ysjBl2p0AAFJA8fesbI267.jpg "title=" 2015-09-17_220247.png "alt=" Wkiol1x6ysjbl2p0aafja8fesbi267.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/5A/wKiom1X6zCDDvTOUAAIMtq8wBUA108.jpg "title=" 2015-09-17_221334.png "alt=" Wkiom1x6zcddvtouaaimtq8wbua108.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/58/wKioL1X6zlij-WMaAAFL_IDjwhs047.jpg "title=" 2015-09-17_221344.png "alt=" Wkiol1x6zlij-wmaaafl_idjwhs047.jpg "/>
If the restart also requires Web Access, the following command can be used to retrieve the URL again
[[email protected] ~]$ emctl start dbconsoleoracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c ) 1996, Oracle Corporation. All rights reserved.https://dbserver.cjl.com:1158/em/console/aboutapplicationstarting Oracle Enterprise Manager 11g Database Control ... started. ------------------------------------------------------------------Logs is generated in directory/opt/oracle/ Product/11.2/db_1/dbserver.cjl.com_orcl/sysman/log
If you find that you cannot use the DBCA command, try it
[Email protected] ~]$/OPT/ORACLE/PRODUCT/11.2/DB_1/BIN/DBCA xlib:connection to ': 0.0 ' refused by Serverxlib:no Protoco L Specified[[email protected] ~]# xhost +access control disabled, clients can connect from any host
Start the database to start monitoring first
[[email protected] ~]$ lsnrctllsnrctl for linux: version 11.2.0.1.0 - Production on 18-SEP-2015 05:07:44Copyright (c) 1991, 2009, oracle. all rights reserved. welcome to lsnrctl, type "Help" for information. Lsnrctl> startstarting /opt/oracle/product/11.2/db_1/bin/tnslsnr: please wait ... tnslsnr for linux: version 11.2.0.1.0 - productionsystem parameter file is /opt/oracle/product/11.2/db_1/network/admin/listener.oralog messages written to /opt/oracle/diag/tnslsnr/dbserver/listener/alert/log.xmllistening on: (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (key=extproc1521))) listening on: (description= (address= (protocol=tcp) (host=dbserver.cjl.com) (PORT=1521)) Connecting to (description= (address= (PROTOCOL=IPC) (key=extproc1521)) STATUS&NBSP;OF&NBSP;THE&NBsp LISTENER------------------------alias LISTENERVersion tnslsnr for linux: Version 11.2.0.1.0 - ProductionStart Date 18-SEP-2015 05:07:50Uptime 0 days 0 hr. 0 min. 0 secTrace Level offSecurity on: local os authenticationsnmp offlistener parameter file /opt/oracle/product/11.2/db_1/network/admin/ listener.oralistener log file /opt/oracle/diag/ tnslsnr/dbserver/listener/alert/log.xmllistening endpoints summary... (DESCRIPTION= ( Address= (PROTOCOL=IPC) (key=extproc1521)) (description= (address= (protocol=tcp) (host= dbserver.cjl.com) (port=1521)) the listener supports no servicesthe command Completed successfullylsnrctl> quit[[email protected] ~]$ sqlplus sys as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 18 05:08:12 2015copyright (c) 1982, 2009, Oracle. All rights Reserved. enter password: connected to an Idle instance. Sql> startuporacle instance started. total system global area 839282688 bytesfixed size 2217992 bytesvariable Size 541067256 Bytesdatabase buffers 289406976 bytesredo Buffers 6590464 bytesdatabase mounted. database opened. sql> show user; user is "SYS" Sql> alter database open;alter database open*error at line 1:ORA-01531: a database already open by the instanceSQL> quitdisconnected from oracle database 11g enterprise edition release 11.2.0.1.0 - 64bit productionwith the Partitioning, olap, data mining and real application testing options
Close the database
Shutdown immediate
Shutdown abort (the previous shutdown cannot be performed, this forced shutdown is performed)
Turn off monitoring
Lsnrctl stop
Please leave a message if there is an error in this article!
This article is from the "XXX" blog, please be sure to keep this source http://moumou.blog.51cto.com/9995443/1695945
Oracle Installation--Simple article