In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Note: there are graphical steps to install Oracle under the online Linux, but the Linux system is usually connected directly to SSH. The system did not install the desktop at the initial installation, in order to meet the need to install oracle to install a Linux desktop, use VNC. It always feels so troublesome. Take a look at Oracle 11g installation here. It can be installed on the command line. And you don't need to export the answer file when you install for the first time.
Note: if you are installing Oracle 12, you need to use the graphical installation in exactly the same environment to export the answer file for installing Oracle at 12:00. In this way, in the future, it can be installed directly without graphics in the same environment and under the same directory structure.
System: Centos 6.4x64
First, prepare the installation conditions of Oracle 11gR2
Go to the official website to download the http://www.oracle.com/cn/downloads/index.html installation package, there are 2 packages, about 2GB
Package name:
Linux.x64_11gR2_database_1of1.zip
Linux.x64_11gR2_database_2of2.zip
1. System configuration requirements
1) the physical memory is above 1GB, and the swap space is about 2 times that of physical memory.
2) installation directory (/ data/oracle) is recommended to have more than 8GB, and / tmp directory is recommended to have more than 1GB available space.
3) configure the host name and IP address in advance, and do not change the host name after the installation.
Check the memory size, about 2G, to meet the requirements
[root@ns1bin] # free-m total used free shared buffers cachedMem: 1876 1808 68 0 12 1486-/+buffers/cache: 308 1567Swap: 1023 10 1013
Testing the swap and / data directories also meets the requirements
[root@ns1bin] # df-hT
File system type capacity used available mount point% used
/ dev/sda3 ext4 19G 9.7G 8.0G 55% / tmpfs tmpfs 939M 444M 495M 48% / dev/shm/dev/sda1 ext4 194M 27M 158m 15% / boot/dev/sdb1 ext4 20G 6.0G 13G 33% / data
Modify the swap partition configuration to comment out the original line and add a new line. Otherwise,
Will prompt ORA-00845: MEMORY_TARGET not supported on this system error
Vi / etc/fstab
# tmpfs / dev/shm tmpfs defaults 0 0tmpfs / dev/shm tmpfs defaults,size=10240M 0 0
Restart the system
Reboot
two。 Required software environment
Yum-y install binutils compat-libstdc++ compat-libstdc++-33elfutils-libelf-devel gcc gcc-c++ glibc-devel glibc-headers ksh libaio-devellibstdc++-devel make sysstat unixODBC-devel binutils-* compat-libstdc++*elfutils-libelf* glibc* gcc-* libaio* libgcc* libstdc++* make* sysstat*unixODBC* wget unzipyum clean all
Uninstall ksh, meet compatibility requirements, and modify pdksh in RHEL5
Rpm-e kshwget ftp://ftp.pbone.net/mirror/ftp.scientificlinux.org/linux/scientific/55/i386/SL/pdksh-5.2.14-36.el5.i386.rpm
To install pdksh, you must have a compilation environment, otherwise an error will be reported.
Rpm-ivh pdksh-5.2.14-36.el5.i386.rpm
Add-- nodeps-- force if you report an error
Upload the oracle package to the / opt directory
Decompression package
Unzip linuxamd64_11gR2_database_1of2.zipunzip linuxamd64_11gR2_database_2of2.zip
3. Kernel parameter adjustment (no less than the following values)
Vi / etc/sysctl.conf
Add the last line
Kernel.shmmni = 4096kernel.sem = 32000 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576
Loading parameters
Sysctl-p
4. User environment requirements
(1) create relevant user and group accounts
Installation group
Groupadd oinstall
Management group
Groupadd dba
Run the user
Useradd-g oinstall-G dba oracle
Set password
Passwd oracle
(2) adjust user variables
Vi ~ oracle/.bash_profile
Add the last line
Umask 022export.UTF-8export PATH=$PATH:/data/oracle/product/11gr2/dbhome_1/binexport ORACLE_HOME=/data/oracle/product/11gr2/dbhome_1export ORACLE_SID=orclsource ~ oracle/.bash_profile
Vi / etc/profile
Add the last line
Export PATH=$PATH:/data/oracle/product/11gr2/dbhome_1/binexport ORACLE_HOME=/data/oracle/product/11gr2/dbhome_1export ORACLE_SID=orcl
Update the system environment
Source / etc/profile
(3) adjust the session limit
Vi / etc/pam.d/login
Add the last line
Session required pam_limits.so
Vi / etc/security/limits.conf
Add the last line
Oracle soft nproc 8192oracle hard nproc 16384oracle soft nofile 32768oracle hard nofile 65536
5. Installation directory preparation
Create a basic directory
Mkdir-p / data/oraclechown-R oracle:oinstall / data/oracle/chmod-R 775 / data/oracle/
If it is configured in the answer file, this file seems to be available.
Vi / etc/oraInst.loc
Inventory_loc=/data/oracle/oraInventoryinst_group=oinstall
6. Formal installation
Switch to oracle user. Note that it must be oracle user. Root user cannot be installed.
Su oraclecd / opt/database./runInstaller-silent-debug-force\ DECLINE_SECURITY_UPDATES=true\ oracle.install.option=INSTALL_DB_SWONLY\ UNIX_GROUP_NAME=oinstall\ INVENTORY_LOCATION=/data/oracle/oraInventory\ ORACLE_HOME=/data/oracle/product/11gr2/dbhome_1\ ORACLE_BASE=/data/oracle\ oracle.install.db.InstallEdition=EE\ oracle.install.db.EEOptionsSelection=true\ oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.3.0,oracle.oraolap:11.2.0.3.0 Oracle.rdbms.dm:11.2.0.3.0,oracle.rdbms.lbac:11.2.0.3.0,oracle.rdbms.rat:11.2.0.3.0\ oracle.install.db.DBA_GROUP=dba\ oracle.install.db.OPER_GROUP=dba\ oracle.install.db.isRACOneInstall=false\ DECLINE_SECURITY_UPDATES=true\ is starting OracleUniversal Installer... The log of this installation session can be found at the following location: / data/oracle/oraInventory/logs/ / data/oracle/product/11gr2/dbhome_1/root.shCheck/data/oracle/product/11gr2/dbhome_1/install/root_ns1.centos.com_2014-12-04 04-24-51.logfor the output of root script
Start monitoring, the first run will report an error, will generate a listener.ora file
Su oraclenetca / silent / responsefile / opt/database/response/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = / opt/database/response/netca.rsp
Complete the syntax analysis of the command line parameters.
Oracle Net Services configuration:
Complete the profile configuration.
The Oracle Net listener starts:
The information provided for this listener is being used by other software on this computer.
Failed to start the listener.
For more information, check the trace file: / data/oracle/cfgtoollogs/netca/trace_OraDB12Home1-1412044 Morning 3026.log
Oracle Net Services configuration failed. The exit code is 1
Edit listening file
Su rootvi / data/oracle/product/11gr2/dbhome_1/network/admin/listener.ora
Change 180.168.41.175 to your own hostname
For example:
(ADDRESS = (PROTOCOL = TCP) (HOST = ns5.centos.com) (PORT = 1521))
Run again
Su oraclenetca / silent / responsefile / opt/database/response/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = / opt/database/response/netca.rsp
Complete the syntax analysis of the command line parameters.
Oracle Net Services configuration:
Complete the profile configuration.
Listener "LISTENER" already exists.
Oracle NetServices configuration completed successfully. The exit code is 0
Start the service
Lsnrctl start
View statu
Lsnrctl status
View listening port
[oracle@ns1 database] $netstat-naptlu | grep 1521
(Not all processes could be identified, non-owned processinfo
Will not be shown,you would have to be root to see it all.)
Tcp 0 0: 1521: * LISTEN 4898/tnslsnr
After execution, the listening has been started. The default port is 1521, and the default is dynamic listening. As long as the instance is started, it will be monitored.
Su rootcp / opt/database/response/dbca.rsp ~ oraclechmod 755 ~ oracle/dbca.rspchown oracle:oinstall ~ oracle/dbca.rspsu oraclevi ~ / dbca.rsp
GDBNAME = "orcl.ns5.centos.com" / / name of the global database = SID+ host domain name
SID= "orcl" / / SID
CHARACTERSET= "AL32UTF8" / / Encoding
NATIONALCHARACTERSET= "UTF8" / / Encoding
SYSPASSWORD = "Oracle" / / password
SYSTEMPASSWORD = "Oracle" / / password
Silently install the database. Please wait a few minutes.
[oracle@ns1database] $dbca-silent-responseFile ~ / dbca.rsp
Copy database files
1% completed
3% completed
11% completed
18% completed
26% completed
33% completed
37% completed
Creating and starting Oracle instance
40% completed
45% completed
50% completed
55% completed
56% completed
60% completed
62% completed
Database creation in progress
66% completed
70% completed
73% completed
85% completed
96% completed
100% completed
For more information, see the log file "/ data/oracle/cfgtoollogs/dbca/orcl/orcl.log".
[root@ns1~] $sqlplus / nolog
SQL > conn / as sysdba
Connected.
SQL > startup
ORA-01081:cannot start already-running ORACLE-shut it down first
Validity period of Oracle user password
Check the current validity period. The default is 180 days.
SQL > SELECT * FROM dba_profiles 's WHERE s.profileholders default ANDresource_name='PASSWORD_LIFE_TIME'
PROFILE
RESOURCE_NAME RESOURCE
-
LIMIT
COM
-
DEFAULT
PASSWORD_LIFE_TIME PASSWORD
one hundred and eighty
NO
Modify to indefinitely
SQL > ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED
Check again
SQL > SELECT * FROM dba_profiles 's WHERE s.profileholders default ANDresource_name='PASSWORD_LIFE_TIME'
It turns out it's already indefinite.
DEFAULT
PASSWORD_LIFE_TIME PASSWORD
UNLIMITED
NO
The installation of Oracle is over.
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.