1. 配置機(jī)器名
[root@SAMPLE ~]# hostname
---------------------------------------------------------------------------------------
XAG102.COM
---------------------------------------------------------------------------------------
[root@SAMPLE ~]# cat /etc/sysconfig/network
---------------------------------------------------------------------------------------
# Created by anaconda
NETWORKING=yes
HOSTNAME=XAG102
---------------------------------------------------------------------------------------
[root@SAMPLE ~]# cat /etc/hosts
---------------------------------------------------------------------------------------
127.0.0.1? ? ? localhost localhost.localdomain localhost4 localhost4.localdomain4
::1? ? ? ? ? ? localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.40.140? XAG140? ? XAG140.COM
---------------------------------------------------------------------------------------
[root@SAMPLE ~]# cat /etc/hostname
---------------------------------------------------------------------------------------
XAG102.COM
---------------------------------------------------------------------------------------
[root@SAMPLE ~]# reboot
3.關(guān)閉防火墻
service iptables stop
chkconfig iptables off
setenforce 0
4.關(guān)閉SELINUX
cd /etc/selinux/
vi config
把參數(shù)SELINUX改為disabled
/*
yum install automake-1.11.1-4.el6.noarch -y
yum install binutils* -y
yum install compat* -y
yum install control* -y
yum install gcc* -y
yum install glibc* -y
yum install gnome* -y
yum install libstdc* -y
yum install make* -y
yum install ksh* -y
yum install sysstat* -y
yum install libXp.i686 libXp-devel.i686 libXt.i686 libXt-devel.i686 -y
yum install libXtst.i686 -y
yum install libXtst-devel.i686 make.x86_64 gcc.x86_64 libaio.x86_64 glibc-devel.i686 libgcc.i686 -y
yum install glibc-devel.x86_64 compat-libstdc++-33 -y
yum install glibc* gcc* make* compat-db* libstdc* libXp* libXtst*-y
yum install compat-libstdc++* -y
*/
yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutils-libelf-devel gcc gcc-c++ glibc*.i686 glibc glibc-devel glibc-devel*.i686 ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-devel*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686 libXp
yum install libXp.i686 libXp-devel.i686 libXt.i686 libXt-devel.i686 -y
yum install libXtst.i686 -y
yum install libXtst-devel.i686 make.x86_64 gcc.x86_64 libaio.x86_64 glibc-devel.i686 libgcc.i686 -y
-----------------------------for 11G-----------------------------------------------------------------------------------
1.2.4 安裝pdksh-5.2.14和rlwrap
復(fù)制代碼
wget https://files.cnblogs.com/files/llill/pdksh-5.2.14-30.x86_64.rpm.tar.gz
--tar zxvf pdksh-5.2.14-30.x86_64.rpm.tar.gz
rpm -qa | grep ks
rpm -e ksh*
rpm -ivh pdksh-5.2.14-37.el5_8.1.i386.rpm
wget https://files.cnblogs.com/files/llill/rlwrap-0.42.tar.gz
yum -y install readline*
tar -xvf rlwrap-0.42.tar.gz
cd? rlwrap-0.42
./configure
make && make install
Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk'.
----------------------------------------------------
vim $ORACLE_HOME/sysman/lib/ins_emagent.mk
Search for the line
$(MK_EMAGENT_NMECTL)
Change it to:
$(MK_EMAGENT_NMECTL) -lnnz11
---------------------------------------------------------------------------------------------------------
5.然后修改內(nèi)核參數(shù):
修改內(nèi)核參數(shù)vim /etc/sysctl.conf,添加:
復(fù)制代碼
fs.aio-max-nr = 1048576?
fs.file-max = 6815744?
kernel.shmall = 2097152?
kernel.shmmax = 1610612736? ?
kernel.shmmni = 4096?
kernel.sem = 250 32000 100 128?
net.ipv4.ip_local_port_range = 1024 65500?
net.core.rmem_default = 262144?
net.core.rmem_max = 4194304?
net.core.wmem_default = 262144?
net.core.wmem_max = 1048576?
vm.hugetlb_shm_group=1002 #這里1002是oracle用戶組dba的gid,原文這里沒有配置主届,這里一定要配置辽幌,要不然后面每次重啟后,啟動(dòng)oracle實(shí)例都會(huì)碰到一個(gè)錯(cuò)誤择膝,具體的在下文會(huì)說到
上面的kernel.shmmax = 內(nèi)存的一半(如3G=3*0.5*1024*1024*1024=1610612736)。
改好后,使之生效:
sysctl -p
重新調(diào)整內(nèi)核參數(shù)以適應(yīng)11.2.0.4
vi /etc/sysctl.conf 增加以下內(nèi)容
net.ipv4.ip_local_port_range = 9000 65500
6.修改系統(tǒng)限制
vim /etc/security/limits.conf
末尾加上:
oracle soft nproc 16384?
oracle hard nproc 16384?
oracle soft nofile 16384?
oracle hard nofile 65536?
oracle soft stack 10240?
7.實(shí)現(xiàn)可插入認(rèn)證:
vi /etc/pam.d/login
末尾加上:
session required /lib/security/pam_limits.so
8.建立oracle用戶與組为障,并修改oracle用戶的密碼
groupadd oinstall?
groupadd dba?
groupadd oper?
useradd -g oinstall -G dba,oper oracle?
echo "123456" | passwd --stdin oracle #oracle用戶的登錄密碼,后續(xù)登錄要用,記著鳍怨。
echo 1002 >/proc/sys/vm/hugetlb_shm_group #(這個(gè)在這里執(zhí)行可以避免后面安裝時(shí)的錯(cuò)誤,有興趣可以網(wǎng)上查下哦,1002為dba組號(hào))
9.建立相應(yīng)的目錄并改變擁有者和訪問權(quán)限
mkdir -p /u01/app/oracle/product/10.2.0/db_1?
chown -R oracle:oinstall /u01/app?
chmod -R 775 /u01/app
mkdir -p /u01/tmp
chown -R oracle:oinstall /u01/tmp
chmod -R 775 /u01/tmp
10.修改版本標(biāo)識(shí)呻右,以安裝相對(duì)rhel6而言較老的oracle
可以先保存一份:
cp /etc/redhat-release /etc/redhat-release.bak
vi /etc/redhat-release
原:CentOS Linux release 7.3.1611 (Core)
修改為: redhat-4
修改ulimit:vim /etc/profile,添加:
if [ $USER = "oracle" ]; then?
if [ $SHELL = "/bin/ksh" ]; then?
ulimit -p 16384?
ulimit -n 65536
else?
ulimit -u 16384 -n 65536?
fi?
fi
11.切換到oracle用戶(注意空格)
su - oracle
建立相應(yīng)的環(huán)境變量
vim ~/.bash_profile
最后行加入:
#Oracle Settings
export DISPLAY=10.0.0.85:0.0
TMP=/u01/tmp
TMPDIR=/u01/tmp
export TMP TMPDIR
ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_HOME
ORACLE_SID=MPACC
export ORACLE_SID
ORACLE_TERM=xterm
export ORACLE_TERM
PATH=/usr/sbin:$PATH
PATH=$ORACLE_HOME/bin:$PATH
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export CLASSPATH
#LD_ASSUME_KERNEL=2.4.1;export LD_ASSUME_KERNEL
export LANG=en_US.utf8
export LANGUAGE=en_US.utf8
export NLS_LANG="AMERICAN_AMERICA.UTF8"
export LC_ALL=en_US.utf8
保存鞋喇,并使參數(shù)生效
source .bash_profile
14.新開一個(gè)終端窗口声滥,切換到oracle用戶,進(jìn)入到安裝目錄侦香,開始安裝
su - oracle
cd /tmp/oracle/database
gunzip 10201_database_linux_x86_64.cpio.gz
cpio -idmv < 10201_database_linux_x86_64.cpio
./runInstaller
開始安裝,不出意外的就可以看到安裝的圖形界面啦
我們選擇高級(jí)安裝
安裝過程中選擇character set時(shí)選擇 simplified chinese ZHS16GBK,
其他基本都是直接下一步就好
15.安裝結(jié)束落塑,恢復(fù)版本信息
vi /etc/redhat-release
改回:Red Hat Enterprise Linux Server release 6.6 (Santiago)
cp /etc/redhat-release.bak /etc/redhat-release
-------------------------------------------------------
dd if=/dev/zero of=/swapfile bs=1k count=100000000
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap defaults 0 0" >>/etc/fstab
---------------------------------------------------------
根據(jù)提示查看日志,并沒發(fā)現(xiàn)幫助信息罐韩,如下所示:
復(fù)制代碼 代碼如下:
[root@hyl ~]# tail -f /u01/app/oracle/oraInventory/logs/installActions2014-09-20_02-43-00PM.log
INFO: make[1]: Leaving directory `/u01/app/oracle/product/10.2.0/db_1/sysman/lib'
INFO: make: *** [nmccollector] Error 2
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'collector' of makefile '/u01/app/oracle/product/10.2.0/db_1/sysman/lib/ins_emdb.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2014-09-20_02-43-00PM.log' for details.
Exception Severity: 1
處理方法:
這里繼續(xù)點(diǎn)擊“continue”即可憾赁,待Oracle完成安裝后,再手工執(zhí)行相應(yīng)腳本完成鏈接即可散吵。
當(dāng)oracle完成安裝后龙考,如下操作
[oracle@hyl bin]$ /u01/app/oracle/product/10.2.0/db_1/bin/relink all
--執(zhí)行腳本后,會(huì)自動(dòng)完成重鏈接操作
--注意:該腳本放置在腳本目錄下错蝴,實(shí)際根據(jù)規(guī)劃的oracle根目錄進(jìn)行查找即可
--------------------------------------------------------------------------
1.修改jdk 下面的字體洲愤。
[root@Eleven ~]# su - oracle
[oracle@ www.linuxidc.com ~]$ cd $ORACLE_HOME/jdk/jre/lib/
[oracle@ www.linuxidc.com lib]$ mv font.properties font.properties_bak
[oracle@ www.linuxidc.com lib]$ cp font.properties.zh_TW.Redhat font.properties? cp font.properties.zh_CN.Redhat font.properties
[oracle@ www.linuxidc.com lib]$ vim font.properties
最后一行修改為:
filename.-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/chinese/TrueType/zysong.ttf
2.修改jre 下面的字體
[oracle@ www.linuxidc.com lib]$ cd $ORACLE_HOME/jre/1.4.2/lib
[oracle@ www.linuxidc.com lib]$ mv font.properties font.properties_bak
[oracle@ www.linuxidc.com lib]$ cp font.properties.zh_CN.Redhat font.properties
3.清除em的cache
[oracle@ www.linuxidc.com lib]$ cd $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs
[oracle@ www.linuxidc.com lib]$ rm *.gif
4. 重新啟動(dòng)em
[oracle@ www.linuxidc.com zhs]$ emctl stop dbconsole
[oracle@ www.linuxidc.com zhs]$ emctl start dbconsole
再次登錄頁面就正常了:
root用戶執(zhí)行
mkdir -p /usr/share/fonts/zh_CN/TrueType/
將? zysong.ttf 文件放到? 此目錄下1.修改jdk 下面的字體。
[root@Eleven ~]# su - oracle
[oracle@ www.linuxidc.com ~]$ cd $ORACLE_HOME/jdk/jre/lib/
[oracle@ www.linuxidc.com lib]$ mv font.properties font.properties_bak
[oracle@ www.linuxidc.com lib]$ cp font.properties.zh_TW.Redhat font.properties
[oracle@ www.linuxidc.com lib]$ vim font.properties
最后一行修改為:
filename.-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/chinese/TrueType/zysong.ttf
2.修改jre 下面的字體
[oracle@ www.linuxidc.com lib]$ cd $ORACLE_HOME/jre/1.4.2/lib
[oracle@ www.linuxidc.com lib]$ mv font.properties font.properties_bak
[oracle@ www.linuxidc.com lib]$ cp font.properties.zh_CN.Redhat font.properties
3.清除em的cache
[oracle@ www.linuxidc.com lib]$ cd $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs
[oracle@ www.linuxidc.com lib]$ rm *.gif
4. 重新啟動(dòng)em
[oracle@ www.linuxidc.com zhs]$ emctl stop dbconsole
[oracle@ www.linuxidc.com zhs]$ emctl start dbconsole
再次登錄頁面就正常了:
root用戶執(zhí)行
mkdir -p /usr/share/fonts/chinese/TrueType/
將? zysong.ttf 文件放到? 此目錄下
-----------------------------------------------------------------------------------------------------------------------------------
[root@XAG105 ~]# id oracle
uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba),1003(oper)
進(jìn)入root用戶?
修改內(nèi)核參數(shù)vim /etc/sysctl.conf
#?
加入如下的內(nèi)容顷锰,其中1002為dba組號(hào)柬赐,需要根據(jù)你實(shí)際的情況進(jìn)行改變。?
vm.hugetlb_shm_group = 1002?
# sysctl -p?