In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to install Oracle database under CentOS" related knowledge, editor through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "how to install Oracle database under CentOS" article can help you solve the problem.
It is recommended to use the otk script to install oracle, which will greatly improve the success factor of installing oracle.
Descriptionoratoolkit is the swiss army knife for oracle. Standards and well designed tools help dba's mastering oracle 10g / 11g throughout the whole lifecycle. Otk runs on linux, zlinux, solaris, aix, hp-ux and other unix based systems. From
First, install the oracle constraint
1. Memory requirements
Minimum memory 1g, recommended 2g or more
2. Swap size setting
Between 1gb and 2gb physical memory, set the swap size to 1.5 times the physical memory
Between 2gb and 16gb physical memory, sets the swap size to be equal to physical memory
If the 16gb is above the physical memory, set the swap size to 16gb
3. Shared memory / dev/shm requirements
At least larger than memory_max_target and memory_target in each oracle instance.
4. / tmp space size requirements
At least 1gb space
5. Hard disk size requirements
Storage space for oracle software files and data files at least 10gb
6. Operating system
Centos 6.5 64bit
-basic server
Second, installation steps
1. The files required to install oracle:
Linux.x64_11gr2_database_1of2.zip
Linux.x64_11gr2_database_2of2.zip
Oratoolkit-1.0.2.1.5-1.noarch.rpm
Download these three files and put them in the / media/oracle directory.
two。 Install otk
Root user login
Move the oratoolkit-1.0.2.1.5-1.noarch.rpm installation package to the yum local data source folder / media/packages
Execute the installation command under packages
# yum-y install oratoolkit*
3. Modify oracle user password
Otk has helped us to set up an oracle user, so we need to set the oracle user password
# passwd oracle
4. Check the environment dependency tool swreqcheck
Otk provides intelligent inspection of environment dependencies, that is, checking the linux system for any conditions that are not met, such as the lack of installation packages.
# / opt/oracle/otk/current/bin/installmanager swreqcheck ossetup11gr2.cfg.20140419_010832: info: action swreqcheck of installmanager ended with 44 warnings
My system is installed with centos 6. 5 64bit-basic server. There are many installation packages missing in the new system, and 44 warnings are detected.
Of these, 43 are missing installation packages and one negligible warning:
# 20140419_011022: warning: oracle software runs on centos however this combination is not supported by oracle
Install the installation packages that must be installed: use a shell script to resolve the problem, and otk provides a list of installation packages that must be installed.
# assemble the command req_file_dir= "/ opt/oracle/otk/current/conf/installmanager/requirement" req_file_path= "$req_file_dir/ora11gr2-redhat-5-x86_64.pkg.lst" yum_command=$ (echo "yum-y install") yum_command+=$ (egrep-v "#" $req_file_path | grep 32-bit | awk'{print "" $1 ". I [356] 86"}') yum_command+=$ (egrep-v "#" $req_file_ Path | grep 64-bit | awk'{print "" $1 ".x86 _ 64"}') # use echo to see what the final assembly command looks like echo $yum_command# execute the command $yum_command# execute the environment check / opt/oracle/otk/current/bin/installmanager swreqcheck ossetup11gr2.cfg again
Check the results again:
# 20130521_170131: info: action swreqcheck of installmanager with one warning
There is one negligible warning left. Indicates that the environment is satisfied with the oracle installation.
5. Compile and install rlwrap (enhanced sqlplus function)
Rlwrap is a wrapper that uses the gnu readline library to allow the editing of keyboard input for any other command. Input history is kept between invocations, separately for each command; history completion and search work as in bash and completion word lists can be specified on the command line. From
Otk integrates rlwrap tools
Rlwrap enhances sqlplus's command history and auto-completion capabilities
Compile and install rlwrap
# cd / opt/oracle/otk/current/tools/rlwrap/#. / configure# make# make install# rlwrap-v
Rlwrap 0.30
6. Install ossetup using the otk tool installmanager
On the one hand it does what is required from oracle documentation and on the other hand it setups also the environment for otk. The next bullet list shows a summary. From # / opt/oracle/otk/current/bin/installmanager ossetup ossetup11gr2.cfg
7. Move the oracle installation files to the resource directory
The default directory for otk to read oracle installation files is / var/opt/oracle/repository
The swinst instance installation command of otk reads this directory:
# cd / media/oracle# chown oracle:oinstall * # mv linux.x64_11gr2_database_1of2.zip linux.x64_11gr2_database_2of2.zip / var/opt/oracle/repository/
8. Log in to the oracle user and modify the configuration file
# su-oracle---oratoolkit environment variables---installation directory: / Opt/oracle/otkrelease: 1.0.2.1.5$ run directory: / opt/oracle/otk/1.0/bin$log_base directory: / var/opt/oracle/otk/1.0/log---# vi .profile.custom.interactive
Modify the Site value in the file.
9. Install the oracle database
Otk installs the database with swinst. How swinst works:
The main purpose of swinst action is to execute oui in silent mode in order to install the software. However, before it can be executed it is required to unzip the file containing the software. Otk starts here and takes care also about the extraction before launching runinstaller script. From
Use a shell script to install the database:
# bash# / opt/oracle/otk/1.0/conf/installmanager configuration file path cd $install_conf# copy oracle11gr2 configuration file, step1,2,3cp sample/swinsteesrv11gr2-step [123]-linux-x86_64.cfg. # swinst boot installation installmanager swinst swinsteesrv11gr2-step1-linux-x86_64.cfginstallmanager swinst swinsteesrv11gr2-step2-linux-x86_64.cfginstallmanager swinst swinsteesrv11gr2-step3-linux-x86_64.cfg
Wait a moment, and finally output the following message: indicating that the installation was successful.
-
20140419_132032: info: executing libinstallmanager.printinfomsg functioncheck in the logs if there are commands to be executed manually.-usually / opt/oracle/sesrv/11.1.0/db1/cfgtoollogs/configtoolallcommands contains such commands-usually / opt/oracle/sesrv/11.1.0/db1/root.sh with root privileges has to be executed in case appctl framework is not used.-usually / opt/oracle/sesrv/11.1.0/db1/install/changeperm.sh needs to be executed when other os users requires oracle libraries- -20140419,132032: info: action swinst of installmanager ended successfully- -
Complete the remaining configuration, execute the root.sh command, and manually execute the remaining scripts at the end of the installation:
# su-# / opt/oracle/eesrv/11.2.0/db1/root.sh# exit
10. Create a database instance
Otk uses dbsetup to create instances
# cd $install_conf# ls-l dbsetup*.cfgdbsetup-dev.cfg dbsetup-prod.cfgdbsetup-test.cfg
I installed the development mode (dev), and we also saw test mode (test) and production mode (prod)
To modify the dbsetup-dev.cfg configuration file, you must modify the configuration as follows:
The value of oracle_home:
$oracle_base/sesrv/11.1.0/db1
Modified to:
$oracle_base/eesrv/11.2.0/db1
Execute the installation command:
# installmanager dbsetup dbsetup-dev.cfg
Next you will see that the database instance is installed for about ten minutes, and finally you will see the following output:
-20130419: 013000: info: executing libmiscellaneous.getfooter function 20130419: 013000: info: terminating installmanager execution 201304190013000: info: summary log file: / var/opt/oracle/otk/1.0/log-old/installmanager/../installmanager.log 201304190013000: info: detailed log file: / var/opt/oracle/otk/1.0/log-old/installmanager/dbsetup-20130522_012901.log 201304190013000: info: action dbsetup of installmanager ended successfully-- -
Congratulations! The database is ready to use.
11. Log in to sqlplus
# su-oracle--- oracle database environment variables--- $oracle_home: / opt/oracle/eesrv/11.2.0/db1 $oracle_sid: dev$tns_admin: / opt/oracle/network- -oratoolkit environment variables---installation directory: / opt/oracle/otkrelease: 1.0.2.1.5$ run directory: / opt/oracle/otk/1.0/bin$log_base directory: / var/opt/oracle / otk/1.0/log---# sqlplus / as sysdbasql*plus: release 11.2.0.1.0 production on sat apr 19 11:27:47 2014copyright (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 >
Check which users are in the database
Sql > select username from dba_users;username--systemsysotkoracle_ocmdbsnmpdipoutlnexfsysperfstatappqossyshaprobe11 rows selected.
It means that sqlplus is ready to use.
twelve。 Use ctl to manage databases
Otk provides a general oracle database management tool, which replaces oracle's appctl framework.
$ctl status all / / View current status
# ctl start all / / start the database
$ctl stop all / / stop the database
This is the end of the introduction on "how to install Oracle database under CentOS". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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: 289
*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.