[root@mac02 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.109 mac02 mac02.oracle.com [root@mac02 ~]# ping mac02 PING mac02 (192.168.1.109) 56(84) bytes of data. 64 bytes from mac02 (192.168.1.109): icmp_seq=1 ttl=64 time=0.026 ms 64 bytes from mac02 (192.168.1.109): icmp_seq=2 ttl=64 time=0.039 ms ^C --- mac02 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1053ms rtt min/avg/max/mdev = 0.026/0.032/0.039/0.008 ms [root@mac02 ~]# ping mac02.oracle.com PING mac02 (192.168.1.109) 56(84) bytes of data. 64 bytes from mac02 (192.168.1.109): icmp_seq=1 ttl=64 time=0.020 ms 64 bytes from mac02 (192.168.1.109): icmp_seq=2 ttl=64 time=0.041 ms ^C --- mac02 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1326ms rtt min/avg/max/mdev = 0.020/0.030/0.041/0.011 ms 关闭FIREWALL和Disable SElinux vi /etc/selinux/config ==>SELINUX=disabled init 6 重启后 [root@mac02 ~]# mkdir /media/disk [root@mac02 ~]# mount /dev/cdrom /media/disk mount: block device /dev/sr0 is write-protected, mounting read-only [root@mac02 ~]# [root@mac02 ~]# cd /media/disk/ touch /etc/yum.repos.d/public-yum-el6.repo vi /etc/yum.repos.d/public-yum-el6.repo [oel6] name = Enterprise Linux 6.5 DVD baseurl=file:///media/disk/Server/ gpgcheck=0 enabled=1 rm /etc/yum.repos.d/public-yum-ol6.repo 必须安装如下的glibc.i686 libXp.i686 libXt.i686 libXtst.i686否则图形化界面起不来 yum install oracle-rdbms-server-11gR2-preinstall yum install glibc.i686 yum install libXp.i686 yum install libXt.i686 yum install libXtst.i686 yum install glibc-devel.i686 yum install compat-libstdc++-296.i686 yum install compat-libstdc++-33.i686 yum install libstdc++.i686 yum install libstdc++-devel.i686 yum install compat-gcc-34.x86_64 [root@mac02 yum.repos.d]# passwd oracle [root@mac02 yum.repos.d]# mkdir /s01 [root@mac02 yum.repos.d]# chown oracle:oinstall /s01 [root@mac02 yum.repos.d]# su - oracle [oracle@mac02 ~]$ id uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba) [oracle@mac02 ~]$ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 31449 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 2047 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited 上传 ORACLE 10g介质 10.2.0.1 10201_database_linux_x86_64.cpio 和 10.2.0.5 patchset p8202632_10205_Linux-x86-64.zip 2个介质 以Oracle用户登录 虚拟机图形化界面(必须是ORACLE用户登录图形化界面) 解压安装包 [oracle@mac02 ~]$ cpio -idvm < 10201_database_linux_x86_64.cpio [oracle@mac02 ~]$ unzip p8202632_10205_Linux-x86-64.zip [oracle@mac02 ~]$ cd database/ [oracle@mac02 database]$ ./runInstaller -ignoreSysPrereqs su - root [root@mac02 ~]# /s01/oraInventory/orainstRoot.sh Changing permissions of /s01/oraInventory to 770. Changing groupname of /s01/oraInventory to oinstall. The execution of the script is complete [root@mac02 ~]# [root@mac02 ~]# /s01/oracle/product/10.2.0/db_1/root.sh Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /s01/oracle/product/10.2.0/db_1 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. 返回oracle的虚拟机图形界面窗口 [oracle@mac02 ~]$ cd Disk1/ [oracle@mac02 Disk1]$ ./runInstaller 最后切换到root 执行root.sh [root@mac02 logs]# /s01/oracle/product/10.2.0/db_1/root.sh 设置环境变量 su - oracle vi .bash_profile export ORACLE_HOME=/s01/oracle/product/10.2.0/db_1 export ORACLE_BASE=/s01 export ORACLE_SID=MACLEAN export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib export ORA_NLS10=$ORACLE_HOME/nls/data export NLS_LANG=American_America.AL32UTF8 Oracle用户在图形化界面上LOGOUT 后再次登录 以便使profile生效 dbca建库 SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi PL/SQL Release 10.2.0.5.0 - Production CORE 10.2.0.5.0 Production TNS for Linux: Version 10.2.0.5.0 - Production NLSRTL Version 10.2.0.5.0 - Production SQL> SQL> !uname -a Linux mac02.oracle.com 3.8.13-16.2.1.el6uek.x86_64 #1 SMP Thu Nov 7 17:01:44 PST 2013 x86_64 x86_64 x86_64 GNU/Linux SQL> !cat /etc/issue Oracle Linux Server release 6.5 Kernel \r on an \m SQL> !lsnrctl status LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 27-DEC-2013 01:54:03 Copyright (c) 1991, 2010, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production Start Date 27-DEC-2013 01:52:06 Uptime 0 days 0 hr. 1 min. 57 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Log File /s01/oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mac02)(PORT=1521))) The listener supports no services The command completed successfully SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mac02)(PORT=1521)))'; System altered. SQL> alter system register; System altered. SQL> !lsnrctl status LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 27-DEC-2013 01:54:43 Copyright (c) 1991, 2010, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production Start Date 27-DEC-2013 01:52:06 Uptime 0 days 0 hr. 2 min. 37 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Log File /s01/oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mac02)(PORT=1521))) Services Summary... Service "MACLEAN" has 1 instance(s). Instance "MACLEAN", status READY, has 1 handler(s) for this service... Service "MACLEANXDB" has 1 instance(s). Instance "MACLEAN", status READY, has 1 handler(s) for this service... Service "MACLEAN_XPT" has 1 instance(s). Instance "MACLEAN", status READY, has 1 handler(s) for this service... The command completed successfully 远程登录 [oracle@mac02 ~]$ sqlplus system/oracle@mac02:1521/MACLEAN SQL*Plus: Release 10.2.0.5.0 - Production on Fri Dec 27 01:55:14 2013 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options