oracle安装简单吗,Oracle数据库之安装--简单篇

>/etc/security/limits.conf

oracle  soft    nproc   2047

oracle  hard    nproc   16384

oracle  soft    nofile  1024

oracle  hard    nofile  65536

oracle  soft    stack   10240

END

#oracle软堆栈限制

cat <>/etc/profile

if [ $USER = "oracle" ];then

if [ \$SHELL = "/bin/ksh" ];then

ulimit -p 16384

ulimit -p 65536

else

ulimit -u 16384 -n 65536

fi

fi

END解压Oracle11g的包到oracle用户的home目录unzip -d /home/oracle linux.x64_11gR2_database_1of2.zip && unzip -d /home/oraclelinux.x64_11gR2_database_2of2.zip允许用户oracle从本机访问[root@dbserver ~]# xhost +

access control disabled, clients can connect from any host切换用户并进入解压目录运行安装[root@dbserver ~]# su - oracle

[oracle@dbserver ~]$ ls

database

[oracle@dbserver ~]$ cd database/

[oracle@dbserver database]$ ./runInstaller运行root用户执行提示脚本[root@dbserver ~]# /opt/oracle/oraInventory/orainstRoot.sh

更改权限/opt/oracle/oraInventory.

添加组的读取和写入权限。

删除全局的读取, 写入和执行权限。

更改组名/opt/oracle/oraInventory 到 oinstall.

脚本的执行已完成。

[root@dbserver ~]# /opt/oracle/product/11.2/db_1/root.sh

Running Oracle 11g root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME=  /opt/oracle/product/11.2/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Copying dbhome to /usr/local/bin ...

Copying oraenv to /usr/local/bin ...

Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@dbserver ~]#访问以上地址测试https://dbserver.cjl.com:1158/em/oracle用户访问测试[oracle@dbserver database]$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 18 05:28:47 2015

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

Enter password:

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show user;

USER is "SYS"

SQL>图形界面添加数据库如果重新启动还需web访问可用以下命令重新获取网址[oracle@dbserver ~]$ emctl start dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0

Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.

https://dbserver.cjl.com:1158/em/console/aboutApplication

Starting Oracle Enterprise Manager 11g Database Control ........

started.

------------------------------------------------------------------

Logs are generated in directory /opt/oracle/product/11.2/db_1/dbserver.cjl.com_orcl/sysman/log如果发现不能使用dbca命令时试试它[oracle@dbserver ~]$ /opt/oracle/product/11.2/db_1/bin/dbca

Xlib: connection to ":0.0" refused by server

Xlib: No protocol specified

[root@dbserver ~]# xhost +

access control disabled, clients can connect from any host启动数据库先启动监听[oracle@dbserver ~]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 18-SEP-2015 05:07:44

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> start

Starting /opt/oracle/product/11.2/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production

System parameter file is /opt/oracle/product/11.2/db_1/network/admin/listener.ora

Log messages written to /opt/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver.cjl.com)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date                18-SEP-2015 05:07:50

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/11.2/db_1/network/admin/listener.ora

Listener Log File         /opt/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver.cjl.com)(PORT=1521)))

The listener supports no services

The command completed successfully

LSNRCTL> quit

[oracle@dbserver ~]$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 18 05:08:12 2015

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

Enter password:

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area  839282688 bytes

Fixed Size                  2217992 bytes

Variable Size             541067256 bytes

Database Buffers          289406976 bytes

Redo Buffers                6590464 bytes

Database mounted.

Database opened.

SQL> show user;

USER is "SYS"

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-01531: a database already open by the instance

SQL> quit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options关闭数据库shutdown immediate shutdown abort (上一条关闭不能执行,则执行这条强制关机)关闭监听lsnrctl stop本文如出现错误请留言!

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值