随笔-62  评论-29  文章-0  trackbacks-0
创建用户组、用户
1)添加用户组:
groupadd oinstall
groupadd dba
2)添加用户:
useradd –g oinstall –G dba –d /export/home/oracle –s /bin/csh –m oracle
{-g表示用户所属组、-G表示用户所属附加组、-d表示用户主目录、-s表示用户默认shell类型、oracle表示用户名,-m参数表示自动创建此用户的主目录,为避免麻烦,请勿手动创建此目录}
passwd oracle
{表示为oracle用户设置密码,输入该命令并回车之后,系统会提示输入密码、确认密码}


三)创建Oracle数据库安装点
新建目录,Oracle将安装于这些目录下:
mkdir /opt/oracle
mkdir /opt/oracle/product/10gr2
mkdir /opt/oracle/doc
并把/opt/oracle目录属主改为oracle,属组改为oinstall:
chown -R oracle:oinstall /opt/oracle
{附Solaris系统目录说明
/: root文件系统
/bin:可执行程序,基本命令
/usr:UNIX系统文件
/dev:设备文件(逻辑设备)
/devices:设备文件(物理设备)
/etc:系统配置,系统管理数据文件
/export:允许其他系统访问的目录和文件
/home:用户家目录
/kernel:系统核心模块
/lib:系统库
/opt:增加的一些应用软件
/tmp:SWAP区
/var:系统的一些管理文件}


四)修改Oracle用户的环境变量
以oracle用户登陆,在oracle用户的主目录下找到并修改它的环境变量.cshrc(这是一个隐藏文件,ls时须加-a参数)。如未发现此文件,请使用cp命令将主目录下的local.cshrc文件拷贝一份另命名为.cshrc。

在.cshrc文件的umask 022下一行添加如下内容
setenv ORACLE_BASE /opt/oracle
setenv ORACLE_HOME /opt/oracle/product/10gr2
setenv ORACLE_SID yoursid
setenv ORACLE_UN system
setenv ORACLE_PW yourpassword
setenv NLS_LANG "simplified chinese_china.ZHS16GBK"
setenv NLS_DATE_FORMAT "YYYY-MM-DD HH24:Mi:SS"
{ORACLE_BASE是Oracle根目录,ORACLE_HOME是Oracle产品目录,即如果你的机器装两个版本的Oracle系统,可以在同一个ORACLE_BASE下,但ORACLE_HOME会做两个。}
之后,在path的开头位置加入$ORACLE_HOME/bin
例如:set path=($ORACLE_HOME/bin /usr/ccs/bin /bin /usr/bin )请照此原样填写,勿使用绝对路径。
使新环境变量生效:source .cshrc
校验环境变量:env


五)修改Solaris系统参数
1)使用root账户登录,创建/etc/system文件的一个备份,例如:
cp /etc/system /etc/system.orig
2)编辑/etc/system,在最后添加如下:
set noexec_user_stack=1
set semsys:seminfo_semmni=300
set semsys:seminfo_semmns=1050
set semsys:seminfo_semmsl=400
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=6400000000(服务器8G内存的情况下,不同情况按比例增减)
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=300
set shmsys:shminfo_shmseg=30
3)重启系统使参数生效:
/usr/sbin/reboot


netca
dbca

Lsnrctl stop
Lsnrctl start
欲启动数据实例,请执行:
sqlplus /as sysdba登录,执行startup open orcl 启动数据库。


七)验证安装是否成功
1)验证是否安装成功:
sqlplus system/yourpassword@yoursid
SQL> select * from tab;

2)关闭、启动正常
sqlplus /nolog
SQL> connect /as sysdba
SQL> shutdown immediate
SQL> conn /as sysdba
SQL> startup

3)查看监听器状态
lsnrctl status

问题:
SUNWi15cs SUNWi1cs pkgadd 安装
将光碟或iso文件放入cdrom

pkgadd -d /cdrom/sol_10_1106_x86/Solaris_10/Product SUNWi15cs



# tcsh
[szsasmw01/root] su - oracle

|-----------------------------------------------------------------|
| This system is for the use of authorized users only.            |
| Individuals using this computer system without authority, or in |
| excess of their authority, are subject to having all of their   |
| activities on this system monitored and recorded by system      |
| personnel.                                                      |
|                                                                 |
| In the course of monitoring individuals improperly using this   |
| system, or in the course of system maintenance, the activities  |
| of authorized users may also be monitored.                      |
|                                                                 |
| Anyone using this system expressly consents to such monitoring  |
| and is advised that if such monitoring reveals possible         |
| evidence of criminal activity, system personnel may provide the |
| evidence of such monitoring to law enforcement officials.       |
|-----------------------------------------------------------------|

%szsasmw01:/export/home/oracle>Dec 16 10:39:00 szsasmw01 sendmail[991]: [ID 702911 mail.alert] unable to qualify my own domain name (szsasmw01) -- using short name

%szsasmw01:/export/home/oracle>sDec 16 10:40:00 szsasmw01 sendmail[1266]: [ID 702911 mail.alert] unable to qualify my own domain name (szsasmw01) -- using short name
qlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 12月 16 10:40:08 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> connect sys as sysdba
Enter password:
Connected to an idle instance.
SQL> startup open orcl
Dec 16 10:41:00 szsasmw01 sendmail[1408]: [ID 702911 mail.alert] unable to qualify my own domain name (szsasmw01) -- using short name
ORACLE instance started.

Total System Global Area  612368384 bytes
Fixed Size                  1980584 bytes
Variable Size             180356952 bytes
Database Buffers          423624704 bytes
Redo Buffers                6406144 bytes
Database mounted.
Database opened.
SQL> lsnrctl start
SP2-0734: unknown command beginning "lsnrctl st..." - rest of line ignored.
SQL> exit;
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
%szsasmw01:/export/home/oracle>lsnrctl start

LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 16-12月-2008 10:41:38

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Starting /opt/oracle/product/10gr2/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
System parameter file is /opt/oracle/product/10gr2/network/admin/listener.ora
Log messages written to /opt/oracle/product/10gr2/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=szsasmw01)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
Start Date                16-12月-2008 10:41:40
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/10gr2/network/admin/listener.ora
Listener Log File         /opt/oracle/product/10gr2/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=szsasmw01)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
%szsasmw01:/export/home/oracle>ps -ef|grep oracle
  oracle  1564     1   0 10:41:01 ?           0:00 ora_psp0_orcl
  oracle  1570     1   0 10:41:01 ?           0:00 ora_lgwr_orcl
  oracle  1098  1077   0 10:38:32 pts/2       0:00 -tcsh
  oracle  1568     1   0 10:41:01 ?           0:00 ora_dbw0_orcl
  oracle  1712  1098   0 10:41:49 pts/2       0:00 ps -ef
  oracle  1562     1   0 10:41:01 ?           0:00 ora_pmon_orcl
  oracle  1566     1   0 10:41:01 ?           0:00 ora_mman_orcl
  oracle  1713  1098   0 10:41:49 pts/2       0:00 grep oracle
  oracle  1576     1   0 10:41:02 ?           0:00 ora_smon_orcl
  oracle  1662     1   0 10:41:29 ?           0:00 ora_q001_orcl
  oracle  1574     1   0 10:41:02 ?           0:00 ora_ckpt_orcl
  oracle  1578     1   0 10:41:02 ?           0:00 ora_reco_orcl
  oracle  1580     1   0 10:41:02 ?           0:00 ora_cjq0_orcl
  oracle  1582     1   1 10:41:02 ?           0:01 ora_mmon_orcl
  oracle  1584     1   0 10:41:02 ?           0:00 ora_mmnl_orcl
  oracle  1586     1   0 10:41:02 ?           0:00 ora_d000_orcl
  oracle  1588     1   0 10:41:02 ?           0:00 ora_s000_orcl
  oracle  1611     1   0 10:41:10 ?           0:00 ora_p000_orcl
  oracle  1613     1   0 10:41:10 ?           0:00 ora_p001_orcl
  oracle  1621     1   0 10:41:13 ?           0:00 ora_qmnc_orcl
  oracle  1650     1   0 10:41:23 ?           0:00 ora_q000_orcl
  oracle  1693     1   0 10:41:40 ?           0:00 /opt/oracle/product/10gr2/bin/tnslsnr LISTENER -inherit
%szsasmw01:/export/home/oracle>Dec 16 10:42:00 szsasmw01 sendmail[1556]: [ID 702911 mail.alert] unable to qualify my own domain name (szsasmw01) -- using short name
Dec 16 10:43:00 szsasmw01 sendmail[1750]: [ID 702911 mail.alert] unable to qualify my own domain name (szsasmw01) -- using short name




posted on 2009-10-10 15:01 阅读(979) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: