关键字
Solaris、Oracle、Sparc
操作环境
Fujitsu PRIMEPOWER450 2x SPARC64 V
Solaris 10 u3 sparc
Oracle 10g Release 2
综合知识
参考资料
安装帮助:B19306-01.zip内:
B19306_01\install.102\b15690\toc.htm
Sun ISV:http://isv.sun.com.cn/techdocs/0604/Solaris10_oracle.jsp
下载文件(PC机)
doc: http://www.oracle.com/technology/documentation/database10gr2.html
data: http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201sol64soft.html
B19306-01.zip
10gr2_db_sol.cpio.gz
准备安装文件
解压:
10gr2_db_sol.cpio.gz
上传到服务器:
10gr2_db_sol.cpio
提取:
? cpio -idmv < 10gr2_db_sol.cpio
检查系统环境
用root登录服务器
查看系统版本(要求5.10 64-bit sparcv9)
? uname -a
SunOS jwcdb 5.10 Generic_118833-33 sun4us sparc FJSV,GPUZC-M
? isainfo -kv
64-bit sparcv9 kernel modules
查看物理内存(要求1024MB以上)
? /usr/sbin/prtconf | grep "Memory size"
Memory size: 4096 Megabytes
查看交换文件(视内存情况)
? /usr/sbin/swap -lh
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 32,129 16 12286064 12286064
临时文件空间(要求400M以上)
? df -h /tmp
Filesystem size used avail capacity Mounted on
swap 7.4G 88K 7.4G 1% /tmp
查看硬盘空间(要求2G以上)
? df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 12G 3.7G 7.7G 33% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 7.4G 1.1M 7.4G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
fd 0K 0K 0K 0% /dev/fd
swap 7.4G 88K 7.4G 1% /tmp
swap 7.4G 64K 7.4G 1% /var/run
/dev/dsk/c1t1d0s6 67G 2.9G 64G 5% /data -for oracle data
/dev/dsk/c1t0d0s0 67G 11G 55G 17% /main -for oracle software
/dev/dsk/c0t0d0s7 50G 2.7G 47G 6% /export/home
查看以下软件包是否存在
? pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot \
> SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
system SUNWarc Lint Libraries (usr)
system SUNWbtool CCS tools bundled with SunOS
system SUNWhea SunOS Header Files
system SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
system SUNWlibm Math & Microtasking Library Headers & Lint Files (Usr)
system SUNWlibms Math & Microtasking Libraries (Usr)
system SUNWsprot Solaris Bundled tools
system SUNWtoo Programming Tools
system SUNWxwfnt X Window System platform required fonts
ERROR: information for "SUNWi1cs" was not found
ERROR: information for "SUNWi15cs" was not found
ERROR: information for "SUNWsprox" was not found
这里需要安装两个包:SUNWi1cs和SUNWi15cs
加载DVD安装镜像:
? lofiadm -a /main/solaris10u3/sol-10-u3-ga-sparc-dvd.iso
/dev/lofi/1
? mount -F hsfs -o ro /dev/lofi/1 /mnt/iso
安装这两个包
? pkgadd -d /mnt/iso/Solaris_10/Product/ SUNWi1cs
? pkgadd -d /mnt/iso/Solaris_10/Product/ SUNWi15cs
由10版本已将SUNWsprox合并到SUNWsprot,所以不必该程序包了。
卸载加载的文件
? umount /mnt/iso/
? lofiadm -d /dev/lofi/1
由于使用的Solaris 10 u3比较新,就不打补丁了。
检查网络配置
确保files出现在hosts行:
? cat /etc/nsswitch.conf | grep hosts
# DNS for hosts lookups, otherwise it does not use any other naming service.
# "hosts:" and "services:" in this file are used only if the
hosts: files dns
# before searching the hosts databases.
主机名:
? hostname
jwcdb
域名(不应该有任何值):
? domainname
查看是否使用了全限定主机名:
? cat /etc/hosts | grep 'jwcdb'
61.144.43.227 jwcdb jwcdb.pyp.edu.cn loghost
创建用户和组
创建Oracle Inventory组
如果已安装Oracle,可以查看到如下输出:
? more /var/opt/oracle/oraInst.loc
inventory_loc=/main/oracle/oraInventory
inst_group=oinstall
如果需要,创建oinstall组:
? groupadd oinstall
创建OSDBA组
? groupadd dba
如果OSOPER组
? groupadd oper
创建oracle用户:
查看是否存在oracle用户
? id -a oracle
创建
? useradd -g oinstall -G dba,oper -d /export/home/oracle -s /usr/bin/bash -c 'Oracle Software Owner' -m oracle
设置密码
? passwd -r files oracle
保证nobody用户存在:
? id -a nobody
uid=60001(nobody) gid=60001(nobody) groups=60001(nobody)
配置系统参数
? vi /etc/system
set noexec_user_stack=1
查看有没有为oracle创建资源项目:
? vi /etc/project | grep oracle
如果没有,如下创建:
? projadd -U oracle -c "oracle database" user.oracle
? projmod -sK "roject.max-shm-memory=(priv,10G,deny)" user.oracle
切换到Oracle检查一下:
% prctl -n project.max-shm-memory -i project user.oracle
创建所需目录
程序目录
? mkdir -p /main/oracle
? chown -R oracle:oinstall /main/oracle
? chmod -R 775 /main/oracle
数据目录
? mkdir -p /data/oracle
? chown -R oracle:oinstall /data/oracle
? chmod -R 775 /data/oracle
备份目录
? mkdir -p /main/oracle/flash_recovery_area
? chown -R oracle:oinstall /main/oracle/flash_recovery_area
? chmod -R 775 /main/oracle/flash_recovery_area
配置环境参数
用oracle登录
? su - oracle
设置环境参数
? vi .profile
umask 022
ORACLE_BASE=/main/oracle
ORACLE_SID=ORCL
export ORACLE_BASE ORACLE_SID
重新登录查看
% umask
0022
% env | more
-bash-3.00$ env | more
......
ORACLE_SID=ORCL
ORACLE_BASE=/main/oracle
......
重启系统
? reboot
开始安装过程
确保系统可以运行图形界面或可以远程运行图形界面,在此使用的远程桌面是X Manager 2.0
打开XBrowser,输入服务器的IP地址即可连上。
用oracle用户登录
运行database目录下的runInstaller
Select Installation Method
Advanced Installation
Specify Inventory directory and credentials
/opt/oracle/oraInventory
oinstall
Select Installation Type
Enterprise Edition
Sepcify Home Details
Name: OraDb10g_home1
Path: /main/oracle/oracle/product/10.2.0/db_1
Product-Specific Prerequisite Checks
全部通过即可!
Select Configuration Option
Create a database
Select Database Configuration
General Purpose
Specify Database Configuration Options
Global Database Name:cdtdb SID:ORCL
Select Database Character set: Simplified Chinese ZHS16GBK
选中Create database with sample schemas
Select Database Management Option
选中Use Database Control for Database Management
Enable Email Notification
61.144.43.235
sunkist@pyp.edu.cn
Specify Database Storage Option
选中File System
location:/main/oracle/oradata
Specify Backup and Recovery Options
选中Automated backups
location:/main/oracle/flash_recovery_area
Specify Database Schema Passwords
统一使用一个密码:***
Summary
Execute Configuration Scripts
按照提示,用root用户运行脚本
安装完成!
数据库实例安装日志:
/main/oracle/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/ORCL
iSQL*Plus URL:
http://jwcdb:5560/isqlplus
iSQL*Plus DBA URL:
http://jwcdb:5560/isqlplus/dba
Enterprise Manager 10g Database Control URL:
http://jwcdb:1158/em
用sys用户以sysdba身份登录
完成服务配置
用oracle登录
? su - oracle
修改配置文件
% vi .profile
# This is the default standard profile provided to a user.
# They are expected to edit it to meet their own needs.
MAIL=/usr/mail/${LOGNAME:?}
PS1='% '
umask 022
ORACLE_BASE=/main/oracle
export ORACLE_BASE
ORACLE_SID=ORCL
export ORACLE_SID
ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1
export ORACLE_HOME
NLS_LANG="simplified chinese"_china.zhs16gbk --如果想使用英文,注释掉此行
export NLS_LANG
PATH=/usr/bin:/usr/sbin:$ORACLE_HOME/bin:/usr/sadm/bin:/usr/sfw/bin:/usr/ucb:/etc:.
export PATH
执行脚本:
% sqlplus "/ AS SYSDBA"
SQL> @?/rdbms/admin/utlrp.sql
开机自动运行
正确配置数据库实例入口
% vi /var/opt/oracle/oratab
ORCL:/main/oracle/oracle/product/10.2.0/db_1:Y
修正dbstart脚本:
% vi /main/oracle/oracle/product/10.2.0/db_1/bin/dbstart
将 ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
改为 ORACLE_HOME_LISTNER=$ORACLE_HOME
将 ORATAB=/etc/oratab
改为 ORATAB=/var/opt/oracle/oratab
创建自动运行脚本
% vi /etc/init.d/oracle
"/etc/init.d/oracle" 24 lines, 911 characters
#!/bin/sh
ORA_HOME=/main/oracle/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start') # Start the Oracle databases and listeners
echo "Start Oracle Database 10g Release 2"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl start"
;;
'stop') # Stop the Oracle databases and listeners
echo "Stop Oracle Database 10g Release 2"
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl stop dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
;;
esac
建立符号连接
? ln -s /etc/init.d/oracle /etc/rc2.d/S99oracle
? ln -s /etc/init.d/oracle /etc/rc0.d/K10oracle
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment