oracle10g of centos5
时间:2010-07-21 来源:szxsztszk
---200711 thanks liuyibing
环境:winxp+vm5+centos5(Xwindows)+oracle(10201_database_linux32.zip)
注 意:centos5的内存为512M 磁盘"/"为10G(太小了装不下ORACLE)。
centos5系统安装时,选择多些包,如开 发、系统、基本服务等包。
oracle10g下载地址:http://mirrors.cn99.com/oracle/10g/
以root身份登陆SSH并操作如下:
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-4
5、修改oracle的.bash_profile文件,添加如下内容
export LANG=en_US
export ORACLE_BASE=/mnt/pros/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1/db_1 //这里的数字对应ORACLE版本的数字
export ORACLE_SID=ORCL //安装的一个数据库的实例
export PATH=.:${PATH}:$ORACLE_HOME/bin
6、修改/etc/profile文件,添加如下内容:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else ulimit -u 16384 -n 65536
fi
fi 以oracle用户登录,并配置其环境变量
7。 登录 用oracle登录X-WINDOWS。
8、 安装
#rpm -qa |grep libXp //确保libXp-1.0.0* 安装了;否则会出现java错误,提示libXp.so找不到,无法进行安装。
在oracle用户环境下执行Oracle安装文件目录中的 runInstaller文件, ./runInstaller
提示一步步安装就行,安装时注意安装选项要与上面的配置相一致. 默认数据库用户是orcl,密码需要自己设置(密码里必须包含字符)。
安装后出现如下对话框说明安装成功
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 9、启动与停止服务
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 注意: 如果出现:ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/mnt/pros/oracle/product/10.2.0.1/db_1/dbs/initORCL.ora' 则oracle无法启动,需要修改个文件名方可(类unix系统中字符的大小写问题): #cd /mnt/pros/oracle/product/10.2.0.1/db_1/dbs/ #mv spfileorcl.ora spfileORCL.ora 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.
-----------------
----------------
注 意:centos5的内存为512M 磁盘"/"为10G(太小了装不下ORACLE)。
centos5系统安装时,选择多些包,如开 发、系统、基本服务等包。
oracle10g下载地址:http://mirrors.cn99.com/oracle/10g/
以root身份登陆SSH并操作如下:
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-4
5、修改oracle的.bash_profile文件,添加如下内容
export LANG=en_US
export ORACLE_BASE=/mnt/pros/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1/db_1 //这里的数字对应ORACLE版本的数字
export ORACLE_SID=ORCL //安装的一个数据库的实例
export PATH=.:${PATH}:$ORACLE_HOME/bin
6、修改/etc/profile文件,添加如下内容:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else ulimit -u 16384 -n 65536
fi
fi 以oracle用户登录,并配置其环境变量
7。 登录 用oracle登录X-WINDOWS。
8、 安装
#rpm -qa |grep libXp //确保libXp-1.0.0* 安装了;否则会出现java错误,提示libXp.so找不到,无法进行安装。
在oracle用户环境下执行Oracle安装文件目录中的 runInstaller文件, ./runInstaller
提示一步步安装就行,安装时注意安装选项要与上面的配置相一致. 默认数据库用户是orcl,密码需要自己设置(密码里必须包含字符)。
安装后出现如下对话框说明安装成功
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 9、启动与停止服务
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 注意: 如果出现:ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/mnt/pros/oracle/product/10.2.0.1/db_1/dbs/initORCL.ora' 则oracle无法启动,需要修改个文件名方可(类unix系统中字符的大小写问题): #cd /mnt/pros/oracle/product/10.2.0.1/db_1/dbs/ #mv spfileorcl.ora spfileORCL.ora 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.
-----------------
检查数据库连通 |
$su - oracle |
1),以oracle用户登录
|
相关阅读 更多 +