VMWare上Oracle 10g R2的最簡安裝

來源:互聯網
上載者:User

安裝RedHat Advanced Server

我裝RedHat Advanced Server一直都是先擇最小安裝的,然後再裝必須的開發環境及X11組件, 這樣可以節約很多的空間(RHEL3最小安裝為580M,RHEL4為646M左右,加上X11和必要的開發環境100M多一點吧). 如何手工安裝必要的開發庫和X11環境呢?

RHEL3       放入第二張安裝盤,運行以下命令:

mount /mnt/cdrom
cd /mnt/cdrom/RedHat/RPMS
rpm -ivh cpp*.rpm
rpm -ivh XFree86-4.3*.rpm XFree86-base-fonts-4*.rpm \
XFree86-font-utils-4*.rpm XFree86-xauth-4*.rpm \
XFree86-xfs-4*.rpm chkfontpath*.rpm xinitrc*.rpm \
switchdesk*.rpm ttmkfdir*.rpm XFree86-tools*.rpm \
desktop-file-utils*.rpm gtk+-1.2*.rpm qt-3.1.2*.rpm \
libmng-1*.rpm XFree86-Mesa-libGLU*.rpm xterm*.rpm \
gdk-pixbuf*.rpm

放入第三張安裝盤,運行以下命令:
mount /mnt/cdrom
cd /mnt/cdrom/RedHat/RPMS
rpm -ivh gcc-3*.rpm glibc-devel*.rpm glibc-headers*.rpm \
glibc-kernheaders*.rpm \
gcc-c++-3.2.3-42.i386.rpm \
libstdc++-devel-*.i386.rpm \
compat-libstdc++-*.i386.rpm

RHEL4  RedHat 安裝開發包

Disk2: rpm -i cpp-3.4.3-22.1.i386.rpm
Disk3: rpm -i gcc-3.4.3-22.1.i386.rpm \
glibc-devel-2.3.4-2.9.i386.rpm \
glibc-headers-2.3.4-2.9.i386.rpm \
glibc-kernheaders-2.4-9.1.87.i386.rpm \
kernel-devel-2.6.9-11.EL.i686.rpm

RedHat 安裝X11

Disk2: rpm -i xorg-x11-font-utils-6.8.2-1.EL.13.6.i386.rpm \
xorg-x11-xauth-6.8.2-1.EL.13.6.i386.rpm \
xorg-x11-xfs-6.8.2-1.EL.13.6.i386.rpm \
switchdesk-4.0.6-3.noarch.rpm \
ttmkfdir-3.0.9-14.i386.rpm \
xterm-192-1.i386.rpm \
xorg-x11-Mesa-libGLU-6.8.2-1.EL.13.6.i386.rpm

Disk3 rpm -i xorg-x11-6.8.2-1.EL.13.6.i386.rpm \
chkfontpath-1.10.0-2.i386.rpm \
xinitrc-4.0.14-1.noarch.rpm \
fonts-xorg-base-6.8.1.1-1.EL.1.noarch.rpm \
xorg-x11-6.8.2-1.EL.13.6.i386.rpm \

安裝前的準備工作

1 改一下sys.shmmax參數預設值為32M,你可以改成256M或512M就足夠了,在/etc/sysctl.conf最後加入一行sys.shmmax=<你的值>, 運行sysctl -p使其生效.
2 在RHEL4 Update1上運行 ln -s /usr/lib/libstdc++.so.6.0.3 /usr/lib/libstdc++.so.5
3 安裝libaio庫,應當在第三張安裝盤上.

安裝Oracle 10g Release 2
安裝過程不會有任何問題,我為了節約空間,刪除了一些東西,$ORACLE_HOME目錄下有jre和jdk目錄, 可以將jre下面的內容刪除,再建一個軟體連連結,就可以了,命令如下:

rm -fr $ORACLE_HOME/jre
ln -s $ORACLE_HOME/jdk/jre $ORACLE_HOME/jre/1.4.2

之外還刪除了$ORACLE_HOME/assistants/dcba/templates下面的一些大檔案,兩部總共可以空出160M空間吧.在安裝時不會現什麼問題,和第一版或Oracle 9i沒什麼本質區別.

建立資料庫

可以用dbca來建立產生資料庫的角本,然後退出dbca,再運行產生的建立角本,不會有什麼問題的. 我在一個3G空間的VMware 5 Workstation的機器上安裝作業系統,Oracle並產生了一個庫,還多餘200M空間左右.

附件A:建立Database的語句

connect "SYS"/"&&sysPassword" as SYSDBA
set echo on
spool /home/oracle/createdb/CreateDB.log
startup nomount pfile="/home/oracle/createdb/init.ora";
CREATE DATABASE "DB10G"
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
DATAFILE '/home/oracle/oradata/DB10G/system01.dbf' SIZE 256M REUSE EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/home/oracle/oradata/DB10G/sysaux01.dbf' SIZE 64M REUSE SMALLFILE
DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/home/oracle/oradata/DB10G/temp01.dbf'
SIZE  SIZE  SIZE 48M REUSE SMALLFILE
UNDO TABLESPACE "UNDOTBS1" DATAFILE '/home/oracle/oradata/DB10G/undotbs01.dbf' SIZE 128M REUSE
CHARACTER SET WE8ISO8859P1
NATIONAL CHARACTER SET AL16UTF16
LOGFILE
GROUP 1 ('/home/oracle/oradata/DB10G/redo01.log') SIZE 51200K,
GROUP 2 ('/home/oracle/oradata/DB10G/redo02.log') SIZE 51200K,
GROUP 3 ('/home/oracle/oradata/DB10G/redo03.log') SIZE 51200K
USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword";
spool off

附件B:建立Database需要啟動並執行角本

connect "SYS"/"&&sysPassword" as SYSDBA
set termout off
set echo on
spool /home/oracle/createdb/CreateDBCatalog.log
@/home/oracle/product/10g/rdbms/admin/catalog.sql;
@/home/oracle/product/10g/rdbms/admin/catblock.sql;
@/home/oracle/product/10g/rdbms/admin/catproc.sql;
@/home/oracle/product/10g/rdbms/admin/catoctk.sql;
@/home/oracle/product/10g/rdbms/admin/owminst.plb;
connect "SYSTEM"/"&&systemPassword"
@/home/oracle/product/10g/sqlplus/admin/pupbld.sql;
connect "SYSTEM"/"&&systemPassword"
set echo on
spool /home/oracle/createdb/sqlPlusHelp.log
@/home/oracle/product/10g/sqlplus/admin/help/hlpbld.sql helpus.sql;
spool off

(

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.