在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
一.基本配置 1.硬盘剩余空间:10G以上 二.CenOS6 上安装Oracle 10g 1.准备安装 yum install yum-fastestmirror -y yum install compat-db* yum install compat-libc* yum install compat-gcc* yum install libXp.so.6 yum install libc-* yum install libaio* yum install openmotif yum install glibc-devel* yum install libgcc* yum install gnome-lib* 2.安装包解压 [root@localhost ~]# cpio -idmv > 10201_database_linux_x86_64.cpio 3.创建 Oracle 组和用户帐户 [root@localhost ~]# groupadd oracleinstall [root@localhost ~]# groupadd oracle [root@localhost ~]# useradd -m -g oracleinstall-G oracle oracle [root@localhost ~]# id oracle uid=501(oracle) gid=501(oracleinstall) groups=501(oracleinstall),502(oracle) 设置oracle帐户的口令 [root@localhost ~]# passwd oracle Changing password for user oracle. New password: Retype new password:passwd:all authentication tokens updated successfully. 4.创建目录 [root@localhost ~]# mkdir -p /oracledata/oracle [root@localhost ~]# mkdir -p /oracledata/oradata [root@localhost ~]# chown -R oracle:oracleinstall /oracledata/oracle /oracledata/oradata [root@localhost ~]# chmod -R 775 /oracledata/oracle /oracledata/oradata 5.修改内核参数 cat >> /etc/sysctl.conf <<EOF 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 EOF 如果检查没有问题后,即可以开始装Oralce 10g。 6.安装Oracle 10g (2)如果你的系统语言为中文,请把他设置为英文,否则安装的时候会出现乱码。 (3)Terminal中启动Oracle 10g安装程序: [oracle@www/]$ ./Oracle/database/runInstaller
如果一切正常,界面会弹出如下对话框: cat > /etc/redhat-release << EOF Red Hat Enterprise Linux AS release 3 (Taroon) EOF 7.Oracle 10g安装配置 8.数据库配置 9.Oracle安装前检查 [root@www oradata]# ./orainstRoot.sh Changing permissions of /oracledata/oradata to 770. Changing groupname of /oracledata/oradata to oracleinstall. The execution of the script is complete [root@www oracle]# ./root.sh Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /oracledata/oracle 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. 然后按界面中的“OK”。 三、一些常见的错误 解决方法:是因为你的主机名与IP地址不一至,在/etc/hosts文件对应就行了 vim /etc/hosts IP地址 主机名 2.at Oracle.install.ivwdb.dirver.DBinstaller.main(DBinstaller.java:132) 解决方法:在root用户终端下执行xhost +就行了 解决方法:查看oracle是多少位的系统,一般32位系统装32位oracle软件,64位系统可以装32位和64位的oracle。打开下载oracle的软件包,里面有一个网页,打开那个网页就可以看到。 -bash: lsnrctl: command not found 图如下: 解决方法:查找oracle的命令安装目录,我的是(/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin)添加到环境变量中。 vim ~/.bash_profile --是oracle用户根目录的文件,修改这一行 export PATH=$PATH:/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin source ~/.bash_profile --配置文件生效 |
请发表评论