跳至主要内容

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 ...

4 steps to delete account in Gerrit DB

4 steps to delete account in DB. Delete from accounts where preferred_email=’’; delete from account_ssh_keys where account_id=''; delete from account_external_ids where external_id='gerrit:*’; delete from account_external_ids where external_id='username:*’; whatever it was in H2 database and postgres db . H2: ssh -p 24198 localhost gerrit gsql Postgres: psql

Python学习笔记20100128

methodList = [method for method in dir(object) if callable(getattr(object, method))] ###插一句, ifconfig pcn0 unplumb 去禁solaris的网卡plumb起网卡   and, or  已经and-or一起用。 and 两者为真,print第二个数,一个为假一个为真返回假,三者为真返回最后一个真。 or 两个为真,返回第一个, 一个为假一个为真返回真,三者为假返回最后一个假   lambda可快速定义最小值函数   g = lambda x:x*2 g(3) 6 (lambda x:x*2)(3)   doc string print getattr(object,mothod).__doc__   ljust ljust 用空格填充字符串以符合指定的长度。info 函数使用它生成了两列输出并将所有在第二列的 doc string 纵向对齐。 如果小于的话不会从中截断   -----面向对象 首先导入,你可以选择import module or from module import module 如果你要经常访问模块的属性和方法,且不想一遍又一遍地敲入模块名,使用 from module import。 如果你想要有选择地导入某些属性和方法,而不想要其它的,使用 from module import。 如果模块包含的属性和方法与你的某个模块同名,你必须使用 import module 来避免名字冲突   -----类的定义 class Lofs    pass   这个类的名字是 Loaf,它没有从其它类继承。 类名通常是第一个字母大写,如:EachWordLikeThis,但这只是一个习惯,不是一个必要条件。   这个类没有定义任何方法或属性,但是从语法上,需要在定义中有些东西,所以你使用 pass。这是一个 Python 保留字,仅仅表示 “向前走,不要往这看”。它是一条什么都不做的语句,当你删空函数或类时,它是一个很好的占位符。   你可能猜...