您好,登錄后才能下訂單哦!
https://www.imzcy.cn/1631.html
說明: 1. 操作系統(tǒng)版本為 Redhat6.7 , IP : 192.168.56.20 ,主機名: slient 。
2. 數(shù)據(jù)庫版本為 11.2.0.4 ;
一:檢查
grep MemTotal /proc/meminfo
內(nèi)存在 2G 以下 , SWAP 分區(qū)就設(shè)置為內(nèi)存的 1.5 倍
內(nèi)存在 2G 至 8G 之間, SWAP 就設(shè)置為內(nèi)存大小
內(nèi)存在 8G 以上, SWAP 就設(shè)置為內(nèi)存大小的 0.75 倍。
查看 SWAP 分區(qū)情況:
grep SwapTotal /proc/meminfo
要求至少 400M
查看 TMP 空間
df -k /tmp
rpm -q binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel pdksh libgcc libstdc++ libstdc++-devel libaio libaio-devel make sysstat
binutils-2.20.51.0.2-5.43.el6.x86_64
package compat-libcap1 is not installed
package compat-libstdc++-33 is not installed
package gcc is not installed
package gcc-c++ is not installed
glibc-2.12-1.166.el6.x86_64
glibc-devel-2.12-1.166.el6.x86_64
package pdksh is not installed
libgcc-4.4.7-16.el6.x86_64
libstdc++-4.4.7-16.el6.x86_64
package libstdc++-devel is not installed
libaio-0.3.107-10.el6.x86_64
package libaio-devel is not installed
make-3.81-20.el6.x86_64
sysstat-9.0.4-27.el6.x86_64
注: pdksh沒有安裝,可以忽略。安裝了ksh。
掛在光盤,安裝未安裝的包,如下:
[root@slient ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 35G 2.9G 31G 9% /
tmpfs 940M 76K 940M 1% /dev/shm
/dev/sda1 477M 41M 411M 9% /boot
/dev/sr0 3.6G 3.6G 0 100% /media/RHEL-6.7 Server.x86_64
[root@slient ~]#
[root@slient ~]# cd /mnt
[root@slient mnt]# mount /dev/sr0 /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
-- 配置 yum 源:
vi yum.repo
[base]
name=base
baseurl=file:/// mnt /Server
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[HighAvailability]
name=HighAvailability
baseurl=file:/// mnt /HighAvailability
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ResilientStorage]
name=ResilientStorage
baseurl=file:/// mnt /ResilientStorage
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[LoadBalancer]
name=LoadBalancer
baseurl=file:/// mnt /LoadBalancer
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
—安裝未安裝的包:
yum install -y compat-libcap1*
yum install -y compat-libstdc++-33*
yum install -y gcc*
yum install -y libstdc++-devel*
yum install -y libaio-devel*
----- 查看 selinux 狀態(tài): sestatus
關(guān)閉 SELinux 的方法:
修改 /etc/selinux/config 文件中的 SELINUX="" 為 disabled ,然后重啟。
如果不想重啟系統(tǒng),使用命令 setenforce 0
------ 查看 iptables 狀態(tài): service iptables status
關(guān)閉防火墻
1) 重啟后永久性生效:
開啟: chkconfig iptables on
關(guān)閉: chkconfig iptables off
2) 即時生效,重啟后失效:
開啟: service iptables start
關(guān)閉: service iptables stop
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle
/etc/security/limits.conf 文件,添加如下:
Vi /etc/security/limits.conf
2047 oracle hard nproc
1024 oracle hard nofile
10240 's/^#.*$//g'
sed -i *.rsp INSTALL_DB_SWONLY<1span style="font-family:" color:#0000ff;"="">
ORACLE_HOSTNAME= slient
UNIX_GROUP_NAME= oinstall
INVENTORY_LOCATION= /u01/app/oraInventory
SELECTED_LANGUAGES= en
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_BASE= /u01/app/oracle
oracle.install.db.InstallEdition =EE
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0
oracle.install.db.DBA_GROUP= DBA
oracle.install.db.OPER_GROUP=
oracle.install.db.CLUSTER_NODES=
oracle.install.db.isRACOneInstall=
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.config.starterdb.characterSet= AL32UTF8
oracle.install.db.config.starterdb.memoryOption= true
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas= false
oracle.install.db.config.starterdb.enableSecuritySettings= true
oracle.install.db.config.starterdb.password.ALL=
oracle.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_CONTROL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.automatedBackup.osuid=
oracle.install.db.config.starterdb.automatedBackup.ospwd=
oracle.install.db.config.starterdb.storageType=
oracle.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= true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
oracle.installer.autoupdates.option=
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
[oracle@slient database]$ pwd
/home/oracle/slient/database
[oracle@slient database]$ ls
install readme.html response rpm runInstaller sshsetup stage welcome.html
[oracle@slient database]$ ./runInstaller -silent -force -noconfig -responseFile /home/oracle/slient/database/response/db_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 25659 MB Passed
Checking swap space: must be greater than 150 MB. Actual 4095 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-07-13_04-13-03AM. Please wait ...[oracle@slient database]$ [WARNING] [INS-13014] Target environment do not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2017-07-13_04-13-03AM/installActions2017-07-13_04-13-03AM.log
ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2017-07-13_04-13-03AM/installActions2017-07-13_04-13-03AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2017-07-13_04-13-03AM.log
[oracle@slient database]$ more The installation of Oracle Database 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2017-07-13_04-13-03AM.log' for more details.
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Successfully Setup Software.
[root@slient ~]# /u01/app/oraInventory/orainstRoot.sh
Changing 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 scrip t is complete.
[root@slient ~]#
[root@slient ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Check /u01/app/oracle/product/11.2.0/dbhome_1/install/root_slient_2017-07-13_04-24-08.log for the output of root script
[root@slient ~]# cat /u01/app/oracle/product/11.2.0/dbhome_1/install/root_slient_2017-07-13_04-25-03.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Finished product-specific root actions.
[root@slient ~]#
-- 編輯監(jiān)聽靜默文件:
[oracle@slient response]$ cat netca.rsp
[GENERAL]
RESPONSEFILE_VERSION="11.2"
CREATE_TYPE="CUSTOM"
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}
[oracle@slient response]$
[oracle@slient response]$ $ORACLE_HOME/bin/netca /silent /responseFile /home/oracle/slient/database/response/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /home/oracle/slient/database/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@slient response]$
[oracle@slient response]$ more dbca.rsp
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "test"
SID = "test
TEMPLATENAME = "General_Purpose.dbc"
[createTemplateFromDB]
SOURCEDB = "myhost:1521:orcl"
SYSDBAUSERNAME = "system"
TEMPLATENAME = "My Copy TEMPLATE"
[createCloneTemplate]
SOURCEDB = "orcl"
TEMPLATENAME = "My Clone TEMPLATE"
[DELETEDATABASE]
SOURCEDB = "orcl"
[generateScripts]
TEMPLATENAME = "New Database"
GDBNAME = "orcl11.us.oracle.com"
[CONFIGUREDATABASE]
[ADDINSTANCE]
DB_UNIQUE_NAME = "orcl11g.us.oracle.com"
NODELIST=
SYSDBAUSERNAME = "sys"
[DELETEINSTANCE]
DB_UNIQUE_NAME = "orcl11g.us.oracle.com"
INSTANCENAME = "orcl11g"
SYSDBAUSERNAME = "sys"
[oracle@slient response]$
上面就可以成功建庫,但絕大多數(shù)情況 [CREATEDATABASE] 下還需要指定一些其他參數(shù), 因為默認的可能不符合實際要求,尤其是你創(chuàng)建的數(shù)據(jù)庫字符集必須要按你的設(shè)計需求顯示指定: 加入如下部分( em, 可以不加 )
characterSet = "ZHS16GBK"
memoryPercentage = "60"
emConfiguration = "LOCAL"
sysPassword = "oracle"
systemPassword = "oracle"
dbsnmpPassword = "oracle"
sysmanPassword = "oracle"
[oracle@slient response]$ $ORACLE_HOME/bin/dbca -silent -responseFile /home/oracle/slient/database/response/dbca.rsp
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/test/test.log" for further details.
[oracle@slient response]$
注意:如果已經(jīng)在響應(yīng)文件中配置 sys和system密碼,上面就不會提示你輸入密碼了。
完成!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。