centos

注意:1~7步都是以root的身份操作


1、创建所需的用户与用户组

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
/usr/bin/passwd oracle
2、创建oracle安装路径与数据目录

mkdir -p /mnt/pros/oracle
mkdir -p /mnt
/data/db/oracle
chown -R oracle:oinstall
/mnt/pros/oracle /mnt/data/db/oracle

chmod -R 775 /mnt/pros/oracle /mnt/data/db/oracle

3、为 oracle 用户设置 Shell 限制

vi /etc/security/limits.conf 添加如下内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

4、修改操作系统的发行名称

vi /etc/redhat-release

将CentOS release 5 (Final)  修改成redhat-3(因为oracle公司没推出CentOS版本)

5修改oracle的.bash_profile文件,添加如下内容

export LANG=en_US
export ORACLE_BASE=/mnt/pros/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.1.0.3/db_1
export ORACLE_SID=ORCL     //安装的一个数据库的实例
export PATH=.:${PATH}:$ORACLE_HOME/bin

6、修改/etc/profile文件,添加如下内容:

if [ $USER = "oracle" ]; then
 
 
 The following J2EE Applications have been deployed and are accessible at the URLs listed below.

Ultra Search URL:
http://localhost.localdomain:5620/ultrasearch

Ultra Search Administration Tool URL:
http://localhost.localdomain:5620/ultrasearch/admin

iSQL*Plus URL:
http://localhost.localdomain:5560/isqlplus

iSQL*Plus DBA URL:
http://localhost.localdomain:5560/isqlplus/dba

Enteprise Manager 10g Database Control URL:
http://localhost.localdomain:5500/em



 1,以oracle用户登录
su oracle
2,启动TNS监听器
$ORACLE_HOME/bin/lsnrctl start
3,用sqlplus启动数据库
$ORACLE_HOME/bin/sqlplus /nolog
SQL> connect system/change_on_install as sysdba
SQL> startup

出现如下显示,表示Oracle已经成功启动
ORACLE instance started.

Total System Global Area  205520896 bytes
Fixed Size                   778392 bytes
Variable Size              74456936 bytes
Database Buffers          130023424 bytes
Redo Buffers                 262144 bytes
Database mounted.
Database opened.

4,用sqlplus停止数据库

$ORACLE_HOME/bin/sqlplus /nolog
SQL> connect system/change_on_install as sysdba
SQL> shutdown

注:shutdown可加关闭选项,从最温和到最粗暴的行为选项为(shutdown、shutdown transactional、shutdown immediate、shutdown abort)
命令解释如下
shutdown:关闭,等待每个用户退出系统戓被取消后退出关闭数据库。

shutdown transactional:事务性关闭,等待每个用户提交戓回退当前的事务,然后oracle取消对话,在所有用户退出系统后执行关闭。

shutdown immediate:直接关闭,取消所有用户对话(促使回退),执行正常的关闭程序。

shutdown abort:终止关闭,关闭数据库时没有自动检查点戓日志开关。

出现如下显示,表示oracle已经停止
Database closed.
Database dismounted.
ORACLE instance shut down.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12592/viewspace-214907/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/12592/viewspace-214907/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值