在说正文之前,也讲些题外的废话.
辅助软件:SecureCRT
硬件:内存 1GB
我下载的是DVD版本的OS,在虚拟机软件中先将OS载入到了光驱中.
在LINUX中,一定要注意大小写.特别是命令.
首先在虚拟机软件中安装CentOS,在安装时,
1
2
3
安装完成OS后.
1 利用SecreCRT利用SSH登录至LINUX,我大部分的操作都在这上面进行,因为VMWARE中OS切换很不方便 .并且 在实际环境中,管理中也都是通过SSH远程登录维护LINUX,非常方便.
2
3
4
5
一般都是有6个包未安装,打开OS的映像文件,打开其中的RPMS目录,将6个包提取出来,再FTP到LINUX目录下.同时,在其目录下输入rpm -ivh *.rpm安装所有包.OK
binutils-2.15.92.0.2-18
compat-libstdc++-33.2.3-47.3
elfutils-libelf-0.97-5
elfutils-libelf-devel-0.97-5
glibc-2.3.9.4-2.19
glibc-common-2.3.9.4-2.19
glibc-devel-2.3.9.4-2.19
gcc-3.4.5-2
gcc-c++-3.4.5-2
libaio-devel-0.3.105-2
libaio-0.3.105-2
libgcc-3.4.5
libstdc++-3.4.5-2
libstdc++-devel-3.4.5-2
make-3.80-5
sysstat-5.0.5
unixODBC-2.2.11
unixODBC-devel-2.2.11
6
(这里创建了两个组,oinstall和dba,一个是控制软件安装,补丁安装等的;另一个是控制数据库创建,数据库管理等的。可以将两个权限都授权给dba组,只创建dba一个组就可以了。)
mkdir -p /u01/oracle
groupadd dba
useradd -g oinstall -G -d /u01/oracle oracle
passwd oracle
chown -R oracle:oinstall /u01
ls -l
7
修改该文件,加入
主机名称可用hostname查看.
8
9
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
结束后,
/sbin/sysctl
10 修改/etc/security/limits.conf,加入内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
11
session required /lib/security/pam_limits.so
session required pam_limits.so
12 修改/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
12
su - oracle
vi
.bash_profile
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=wilson
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
完成
13
mv ****.zip /u01/oracle/
unzip
*.zip
使用
chown -R oracle:oinstall database/
修改目录归属
14
./runInstaller开始安装.
选择高级安装,进行自定义安装
在安装中,会出现一个关于oraInventory目录的警告 ,点击OK,不用理会继续即可,在随后的窗口中将/oraInventory修改为/u01/oraInventory.
随后参数都是默认,在安装中会弹出一个要求执行u01/oraInventory/oraInstRoot.sh和/u01/oracle/root.sh的提示框,可在secureCRT中,以ROOT用户执行这两个文件 ,一定要注意大小写,其入进行End of installtion窗口,安装结束.
15
16
选择gernel purpose,在SID和全局名称中,选择你在.bash_profile中创建的SID.
在Character Sets字符集选项中选择第2项AL32UTF8.
OK,完成.
17
ps -ef查看会增加更多的oracle相关服务
18
19 创建一个实例进行最后测试
注意:在数据库操作中都是用oracle用户执行命令.
输入
[oracle@computer ~]$ sqlplus /nolog
SQL*Plus: Release 11.1.0.6.0 - Production on Tue Dec 11 15:32:23 2007
Copyright (c) 1982, 2007, Oracle.
SQL> conn / as sysdba
Connected.
SQL> create table testbl ( id integer , name
char(10));
Table created.
SQL> insert into testbl values ( 0 , 'wilson' );
1 row created.
SQL> commit;
Commit complete.
SQL> select * from testbl;
---------- ----------
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !ps -ef
exit
全部完成,推荐大家一定要看看小布教师的视频讲座.
[oracle@computer ~]$ sqlplus
SQL*Plus: Release 11.1.0.6.0 - Production on Tue Dec 11 15:00:41 2007
Copyright (c) 1982, 2007, Oracle.
Enter user-name: sys as sysdba
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 -
Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release
11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23827011/viewspace-1114483/ ,如需转载,请注明出处,否则将追究法律责任。