LINUX圖形化安裝ORACLE 前置條件

germany006發表於2018-05-10

自己做個簡單的總結
以下為範例,具體檔名稱自行搞定
光碟載入作業系統
mkdir /mnt/cdrom
mount /dev/cdrom  /mnt/cdrom
本地ISO載入作業系統
mkdir /mnt/iso
mount test.iso -o loop /mnt/iso
配置本地yum源
vi /etc/yum.repos.d/520.repo
[520]
name=520
baseurl=file:///mnt/cdrom
gpgcheck=0
enabled=1

安裝伺服器的圖形化
yum -y groupinstall Desktop
yum -y groupinstall "X Window System"



安裝所需包
yum install -y 

binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc-2.5 glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel



建立使用者及目錄
groupadd oinstall

groupadd dba

useradd -g oinstall -G dba oracle

mkdir -p /u01/app/oracle

chmod -R 775 /u01/app/oracle

mkdir /u01/app/oraInventory

chown -R oracle.oinstall /u01


xshell+xmanager安裝
root使用者
xhost +
oracle使用者
su - oracle
export DISPLAY=登陸XSHELL的電腦IP:0.0

例如我的電腦IP是192.168.1.101   export DISPLAY=192.168.1.101:0.0   並不是伺服器上要安裝ORACLE的IP(比如伺服器IP是192.168.1.209)
cd /opt/database/
./runInstaller


注意,如果這裡出現以下報錯

[oracle@localhost database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 1848 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 819 MB    Passed
Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.    Failed <<<<
Some requirement checks failed. You must fulfill these requirements before
continuing with the installation,
Continue? (y/n) [n]


先設定xshell屬性,轉發x11

改成直接oracle使用者登入xshell,然後./runInstaller就可以了


注意安裝目錄database及其下檔案均是oracle所屬,不是的話就自己改下
chown -R oracle.oinstall /opt/database/
後面圖形化安裝的很簡單,滑鼠點點點就OK了。不會的自己百度

安裝完成後,記得把環境變數搞一搞
su - oracle
vi ~/.bash_profile
export PATH
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl
export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin




如果你的環境不允許上傳ISO 映象的話,只要能連外網,也可以通過外網來配YUM源,如下:

1.下載CentOS6-Base-163.repo檔案

#wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
下載完CentOS6-Base-163.repo檔案後,將它拷貝到/etc/yum.repo.d目錄下。
# mv CentOS6-Base-163.repo /etc/yum.repo.d

2.更改配置檔案

將CentOS6-Base-163.repo檔案中, $releasever全部替換成Centos的版本號。比如,我這個版本是Redhat6.5,那麼將 $releasever全部替換成6。 
可以用vim開啟CentOS6-Base-163.repo檔案,然後用一下命令替換:
:%s/$releasever/6/g

3.清除快取,獲取yum列表

#yum clean all
#yum makecahe


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28371090/viewspace-2154283/,如需轉載,請註明出處,否則將追究法律責任。

相關文章