CentOS系统 as4.6 安装oracle 10.2.0.1
2010-04-17 01:58:50 来源:WEB开发网在CentOS系统 as4.6 安装oracle 10.2.0.1之前,我们应先对Centos系统进行安装。要对于Centos安装不多做说明一般开发工具都要装。安装完还需要安装补丁包sysstat-5.0.5-14.rhel4.i386.rpm 和 libaio-0.3.105-2.i386.rpm 即可。
CentOS系统创建oracle账号
su - root
groupadd dba
groupadd oinstall
useradd -c oracle -g dba -G oinstall oracle
passwd oracle
CentOS系统创建oralce安装目录
su - root
mkdir -p /u01/app/oracle
chown -R oracle.dba /u01
mkdir /var/opt/oracle
chown oracle.oinstall /var/opt/oracle
chmod 755 /var/opt/oracle
1.修改/etc/sysctl.conf 文件,增加如下内容:
- kernel.shmall = 2097152
- kernel.shmmax = 2147483648
- kernel.shmmni = 4096
- kernel.sem = 250 32000 100 128
- fs.file-max = 65536
- net.ipv4.ip_local_port_range = 1024 65000
- net.core.rmem_default = 262144
- net.core.rmem_max = 262144
- net.core.wmem_default = 262144
- net.core.wmem_max = 262144
sem 4 个参数依次为 SEMMSL(每个用户拥有信号量最大数);SEMMNS(系统信号量最大数);
SEMOPM(每次 semopm 系统调用操作数);SEMMNI(系统辛苦量集数最大数).
shmmax 最大共享内存 2GB 物理内存如果小的话可以设置成 536870912.
shmmni 最小共享内存 4096KB.
shmall 所有内存大小.
运行/sbin/sysctl -p设置核心参数
2.修改/etc/security/limits.conf加入
oraclesoft nproc2047
oraclehard nproc16384
oraclesoft nofile 1024
oraclehard nofile 65536
3.修改/etc/pam.d/login ,加入
session required pam_limits.so
4.修改/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
5.oracle登录 修改.bash_profile
- # .bash_profile
- # Get the aliases and functions
- if [ -f ~/.bashrc ]; then
- . ~/.bashrc
- fi
- # User specific environment and startup programs
- PATH=$PATH:$HOME/bin
- export PATH
- unset USERNAME
- # Set the LD_ASSUME_KERNEL environment variable only for Red Hat 9,
- # RHEL AS 3, and RHEL AS 4 !!
- # Use the "Linuxthreads with floating stacks" implementation instead of NPTL:
- export LD_ASSUME_KERNEL=2.6.9-55.EL # for RHEL AS 4
- # Oracle Environment
- export ORACLE_BASE=/u01/app/oracle
- export ORACLE_HOME=$ORACLE_BASE/product/10.0.2/db_1
- export ORACLE_SID=your'sSID
- # export TNS_ADMIN= Set if sqlnet.ora, tnsnames.ora, etc. are not in $ORACLE_HOME/network/admin
- export NLS_LANG=American_America.UTF8;
- export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
- LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
- LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
- export LD_LIBRARY_PATH
- # Set shell search paths
- export PATH=$PATH:$ORACLE_HOME/bin
6.修改 /etc/oratab 文件
修改$ORACLE_HOME dbstart
- $ cd $ORACLE_HOME/dbs
- $ sqlplus /nolog
- SQL>connect / as sysdba
- connected
- SQL>Create pfile from spfile
dbora内容
- # Set ORA_HOME to be equivalent to the ORACLE_HOME
- # from which you wish to execute dbstart and
- # dbshut
- # set ORA_OWNER to the user id of the owner of the
- # Oracle database in ORA_HOME
- ORA_HOME=/u01/app/oracle/product/10.0.2/db_1
- ORA_OWNER=oracle
- case "$1" in
- 'start_msg')
- echo"startup oracle10g database and listener"
- ;;
- 'stop_msg')
- echo "shutdown oracle10g database and listener"
- ;;
- 'start')
- # Start the Oracle database:
- su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
- # start the Oracle dbconsole:
- ;;
- 'stop')
- # Stop the Oracle database:
- su - $ORA_OWNER -c "emctl stop dbconsole"
- su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
- # Stop the Oracle listener:
- su - $ORA_OWNER -c "lsnrctl stop listener"
- ;;
- esac
- 1#cp dbora /etc/init.d
- 2#cd /etc/init.d
- 3#chmod 777 dbora
- 4#cd rc2.d
- #ln –s ../init.d/dbora S80ora
- 5#cd ../rc3.d
- #ln –s ../init.d/dbora S80ora
- 6#cd ../rc0.d
- #ln –s ../init.d/dbora K80ora
- 7#cd ../rc4.d
- #ln –s ../init.d/dbora S80ora
- #ln –s ../init.d/dbora K80ora
- 8#cd ../rc5.d
- #ln –s ../init.d/dbora S80ora
- #ln –s ../init.d/dbora K80ora
根据以上步骤,我们就完成了在CentOS系统 as4.6 安装oracle 10.2.0.1 的工作。希望大家能够顺利的使用CentOS系统。
- ››asp.net页面弄成伪静态页面
- ››Asp.net 中将汉字转换成拼音的方法
- ››CentOS系统只需6步添加新硬盘并分区格式化的方法
- ››Centos6.0 64位下 MySQL 5.6.11 CMake 安装部署
- ››ASP.NET及JS中的cookie基本用法
- ››CentOS下配置超级终端minicom
- ››Centos6.2_x86_64环境下puppet-dashboard安装配置...
- ››ASP.NET获取MS SQL Server安装实例
- ››CentOS下建立本地YUM源并自动更新
- ››asp.net实现调用百度pai 在线翻译英文转中文
- ››ASP.NET页面选项进行提示判断
- ››Asp.net定时执行程序
赞助商链接