跳至主要内容

Oracle XE installed on SUSE 10 sp1 with none oracle account

根据oracle的规则,oracle的安装需要用oracle用户,但是因为环境的原因,所以不能用oracle用户安装oracle xe.
根据服务器上的经验,所以选择替代用户在本地建立本地账户。
在安装前,需要重新启动机器。保持kenerl的完整。 在offical的提示里面需要更改kernel的参数和oracle安装一样。这次装就没有 tips: 使用sysctl -p 可以在suse下/etc/sysctl.conf文件立即生效,同理与mount -a
1. #groupadd dba
#useradd -g dba -d /home/oracle -s /bin/bash oracle
$vi .profile
#!/bin/bashumask 022sh /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.shLC_CTYPE=C;export LC_CTYPEORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server; export ORACLE_HOMEPATH=$ORACLE_HOME/bin:$PATH; export PATHORACLE_SID=XE;export ORACLE_SIDLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:; export LD_LIBRARY_PATHTMP=/tmp; export TMPLANG=zh_CN.GBK; export LANGLC_ALL=zh_CN.GBK; export LC_ALLLANGUAGE=zh_CN.GBK; export LANGUAGENLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"; export NLS_LANG

2. #rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
3. # chown -R oradmin1:dba /usr/lib/oracle/

4. 由于不是用默认的oracle用户修改,只能将启动和configure文件里的部分参数修改成已知参数,主要是将已写oracle改成oradmin1

Oracle Database 10g Express Edition Configuration-------------------------------------------------This will configure on-boot properties of Oracle Database 10g Express Edition. The following questions will determine whether the database should be starting upon system boot, the ports it will use, and the passwords that will be used for database accounts. Press to accept the defaults. Ctrl-C will abort.
Specify the HTTP port that will be used for Oracle Application Express [8080]:
Specify a port that will be used for the database listener [1521]:9093
Specify a password to be used for database accounts. Note that the samepassword will be used for SYS and SYSTEM. Oracle recommends the use of different passwords for each database account. This can be done after initial configuration:Confirm the password:
Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:y
Starting Oracle Net Listener...DoneConfiguring Database...DoneStarting Oracle Database 10g Express Edition Instance...DoneInstallation Completed Successfully.To access the Database Home Page go to "http://127.0.0.1:8080/apex"

网上说最好把监听端口改成8080,否则启动不起来。。。

5.# ps -ef grep oradmin1

oradmin1 5687 1 0 16:45 ? 00:00:00 xe_pmon_XE
oradmin1 5689 1 0 16:45 ? 00:00:00 xe_psp0_XE
oradmin1 5691 1 0 16:45 ? 00:00:00 xe_mman_XE

实例已经装载,但是监听没起来。

6.# netstat -an grep 9093
# netstat -an grep 8080
无结果,

7. /etc/init.d/oracle-xe status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-MAR-2009 16:49:45
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refusedConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cnshc0030)(PORT=9093)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener Linux Error: 111: Connection refused

因为第一个没起来。。其实发觉第一段没用,用的是IPC,
所以到$ORACLE_HOME/network/admin/listener.ora把那一段给mark掉。
然后再启动lsrnctl start

8. # /etc/init.d/oracle-xe status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-MAR-2009 16:51:58
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cnshc0030)(PORT=9093)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 10.2.0.1.0 - ProductionStart Date 17-MAR-2009 16:51:28Uptime 0 days 0 hr. 0 min. 29 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFDefault Service XEListener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.oraListener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.logListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cnshc0030.cnsh)(PORT=9093))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))Services Summary...Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...Service "XE" has 1 instance(s). Instance "XE", status READY, has 1 handler(s) for this service...Service "XEXDB" has 1 instance(s). Instance "XE", status READY, has 1 handler(s) for this service...Service "XE_XPT" has 1 instance(s). Instance "XE", status READY, has 1 handler(s) for this service...The command completed successfully

这个时候就启动了,同时listener启动的时候8080端口也同时启动了。
可以用url访问web管理页面


附注:修改部分节选more /tmp/oracle-xe
export SAVE_LLP=$LD_LIBRARY_PATH
export RETVAL=0
exportORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
#ORACLE_OWNER=oracle
export ORACLE_OWNER=oradmin1
export ORACLE_SID=XE
export LSNR=$ORACLE_HOME/bin/lsnrctl
export SQLPLUS=$ORACLE_HOME/bin/sqlplus
export SU=/bin/su
export PATH=$ORACLE_HOME/bin:$PATH
export LOG="$ORACLE_HOME_LISTNER/listener.log"
export LC_ALL=C
export CONFIG_NAME=oracle-xe
export CONFIGURATION="/etc/sysconfig/$CONFIG_NAME"
/bin/chown oradmin1:dba $ORACLE_HOME/network/admin/listener.ora

评论

此博客中的热门博文

Python学习笔记20100117

映射list   Dictionary 是用{}. list 是一那个[]. turple是用() 当你定义过dictionary后,你可以使用d.keys(), d.values(),d.items()将定义后的时候分别显示出来 当然可以将list里的值加减乘除,也可以如一般的定义直接重新复制这个list. 链接与分割字符串的 li=";", join(li) 则显示的就是 分隔符为;的数 如果使用li=li.split(";")则将刚刚;的分隔符删除,而split里也可定义域,如li.split(";",1)   自省 <---这是啥 之前在使用的时候发觉有些书本上的模块不能调用,很多是py脚本定义过的函数。 下载该脚本s,然后上传至指定位置。 >>>import sys >>>sys.path >>>sys.path.append("绝对位置")然后就能调用这些脚本和参数了。 删除 >>>sys.path.pop() 定义一个参数是 def info(test, test1=10.test2=12): info是函数名,test是必备参数,因为没有定义值,test1和test2是可选参数,定义了初始值   以上是外部函数的调用,下面转到内部函数 内部函数有type,str,dir及其他   ---type 返回任意字符的类型,模块也可以。types模块 >>> type(1) <type 'int'> >>> li=[] >>> type(li) <type 'list'> >>> import odbchelper >>> type(odbchelper) <type 'module'> >>> type(sys) <type 'module'> >>> import types ...

Suse 开机不能进入os

接到个case。机器通电后死活进不了系统,onsite也不知道怎么进去看。 service desk只能派case到我这里。因为不能用正确的root password直接登录,所以只能另想办法。其实网上说要进入failsafe在打init=/bin/bash, 其实从个人使用后,发觉如果有failsafe以后硬盘是无法加载的,也许是因为这个机器之前的原因。 从总体上来看, 是因为硬盘出错导致没有办法做fsck。 系统提示只能手动做fsck. 按照init=/bin/bash后,进入会(none)#, 然后因为硬盘还没加载,但你可以使用大部分命令,可以run fsck.ext3然后就开始检测,这时候狂按y就成。系统检查完了,想reset root password但是这时候不能进入会提示module is unkwon...然后正常启动的时候,登录界面也没有办法得到焦点,切到ctrl+alt+f1也没办法登入。 那个郁闷啊, 这个时候只能停下来,看google。大部分的原因是因为pam不能正常工作导致的, 这点也是比较失败的地方,其实可以直接从/var/log/messages里面看到。  后来查看了一下,确实pam出问题了,但是这个问题并不是源于机器本身的pam而是vas登录的时候在/opt/quest/lib/security/pam_vas.so这个文件丢失了, 那只能先把vas全部卸掉,然后重启,在rest root password. 这个时候就成功了, 然后只需要重新安装vas就好了  -- Alex Tu ----------------------------------------------------------- ShangHai,China