Heim  >  Artikel  >  Backend-Entwicklung  >  FreeBSD 9.0下安装oracle9i

FreeBSD 9.0下安装oracle9i

WBOY
WBOYOriginal
2016-08-08 09:29:571083Durchsuche

FreeBSD9.0下安装oracle9i

小狼@http://blog.csdn.net/xiaolangyangyang

一、配置内核

1、以root身份登陆到FreeBSD。

2、#cd /usr/src/sys/i386/conf

3、#cp GENERIC KERNEL_CUSTOMIZE

4、修改KERNEL_CUSTOMIZE文件,在其中加入如下内容:

# Begin For Oracle Installation
options NBUF=2048 
options MAXDSIZ="(1024UL*1024*1024)" 
options MAXSSIZ="(1024UL*1024*1024)" 
options DFLDSIZ="(1024UL*1024*1024)" 

#options SYSVSHM 
options SHMMAXPGS=65536 
options SHMMIN=2 
options SHMMNI=256 
options SHMSEG=256 

#options SYSVSEM 
#options SEMMAP=512 
options SEMMNI=512 
options SEMUME=512 
options SEMMNS=1024 
options SEMMNU=512 
options SEMMSL=256 
options SEMOPM=256 

#options SYSVMSG #SYSV-stylmessage queues 
options MSGMNB=8192 
options MSGMNI=256 
options MSGSEG=8192 
options MSGSSZ=16 
options MSGTQL=128 
# End For Oracle Installation

5、编译新的内核配置文件

#config KERNEL_CUSTOMIZE

6、进入编译生成的目录

#cd ../compile/KERNEL_CUSTOMIZE

7、编译内核

#make cleandepend

#make depend

#make 

10、安装新的内核

#make install

11、重新启动FreeBSD

#reboot

二、配置Linux兼容环境

1、安装linux_base-8-8.0_14包

#sysinstall

依次选择Configure->Packages->CD/DVD->All->linux_base-8-8.0_14。  

2、安装linux_devtools-8.0_5包

1)从http://ftp.ru.freebsd.org/FreeBSD-Archive/old-releases/amd64/5.5-RELEASE/packages/linux/ 下载linux_devtools-8.0_5包。

2)将下载后得到的linux_devtools-8.0_5.tbz文件拷贝到/compat/linux目录下。

3)#cd /compat/linux

4)#tar zxvf linux_devtools-8.0_5.tbz 

3、在/compat/linux/bin中建立arch可执行文件,内容如下:

#!/compat/linux/bin/bash 
echo i686 #需要根据机器来确定,是i686、i586还是i486。

4、打开执行权限

#chmod +x arch   

5、mount linux proc文件系统 

#mkdir /compat/linux/proc 

#mount -t linprocfs /dev/device /compat/linux/proc 

第二步可以放入/etc/fstab文件中在开机时自动截入

三、创建Oracle用户组和用户

1、创建oracle用户组

#pw groupadd dba

#pw groupadd oinstall

2、创建oracle用户

#pw useradd -n oracle -c "Oracle Owner" -d /home/oracle -m -s /compat/linux/bin/bash -g dba -G oinstall,wheel 

3、修改oracle用户的密码

#passwd oracle

4、修改/home/oracle/.profile文件,在文件尾加上如下代码:

# begin for oracle
export ORACLE_BASE=/home/oracle 
export ORACLE_HOME=$ORACLE_BASE/920

export ORACLE_SID=ORCL
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib

export LC_CTYPE=en_US.UTF-8
export DISPLAY=:0 
export PATH=$PATH:$ORACLE_HOME/bin
# end for oracle

四、安装oracle

1、用oracle账户登录系统。

3、创建install目录用来存放oracle的安装文件

$mkdir /home/oracle/install

(以上操作已经完成,后面的网上未找到lnx_920_disk1.cpio、lnx_920_disk2.cpio、lnx_920_disk3.cpio三个文件)

3、将lnx_920_disk1.cpio、lnx_920_disk2.cpio和lnx_920_disk3.cpio三个文件拷贝到/home/oracle/install目录下。

4、解压cpio安装文件

$cd ~/install

$cpio -idmv

$cpio -idmv

$cpio -idmv

执行完后,会生成Disk1、Disk2和Disk3三个目录。

5、运行安装文件

$cd ~/install/Disk1

$./runInstaller

以上就介绍了FreeBSD 9.0下安装oracle9i,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn