日期:2014-05-16  浏览次数:20410 次

Oracle11g在Ubuntu10.10上的安装(转)

转自:http://xuershan.iteye.com/blog/1006861?

?

?

?

1.服务器版本ubuntu需要安装图形界面?

sudo apt-get install ubuntu-desktop?

2、安装必要的包(不知道在deb中是否叫做包)?

sudo su -?

apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm?

sudo apt-get install libstdc++5 或sudo ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.5?
给libstdc++.so.6取个别名libstdc++.so.5。?

3、建立一些链接?
sudo su -?
ln -sf bash /bin/sh?
ln -s /usr/bin/awk /bin/awk?
ln -s /usr/bin/rpm /bin/rpm?
ln -s /usr/bin/basename /bin/basename?
mkdir /etc/rc.d?
for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done?

4、创建组、用户和相关文件夹?
addgroup oinstall?
addgroup dba?
addgroup nobody?
usermod -g nobody nobody?
useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle?
passwd -l oracle?
mkdir /home/oracle?
chown -R oracle:dba /home/oracle?
mkdir -p /u01/oracle?
chown -R oracle:dba /u01?

5、相关参数修改?
1)/etc/sysctl.conf?
fs.aio-max-nr = 1048576?
fs.file-max = 6815744?
kernel.shmall = 2097152?
kernel.shmmax = 2147483648?
kernel.shmmni = 4096?
kernel.sem = 250 32000 100 128?
net.ipv4.ip_local_port_range = 9000 65500?
net.core.rmem_default = 262144?
net.core.rmem_max = 4194304?
net.core.wmem_default = 262144?
net.core.wmem_max = 1048586?
net.ipv4.tcp_wmem = 262144 262144 262144?
net.ipv4.tcp_rmem = 4194304 4194304 4194304?

2)/etc/security/limits.conf?
oracle soft nproc 2047?
oracle hard nproc 16383?
oracle soft nofile 1023?
oracle hard nofile 65535?

3)/etc/pam.d/login?
session required /lib/security/pam_limits.so?
session required pam_limits.so?

4)执行sysctl -p,使得刚刚修改的参数生效?

6、修改环境变量/etc/profile文件中添加?
ORACLE_SID=orcl?
ORACLE_BASE=/u01?
ORACLE_HOME=/u01/oracle?
NLS_LANG=AMERICAN_AMERICA.UTF8?
PATH=$ORACLE_HOME/bin:$PATH?
export ORACLE_BASE ORACLE_SID ORACLE_HOME PATH NLS_LANG?

sudo source /etc/profile 是配置环境变量生效?

7、oracle11g安装文件准备?

已经解压?

拷贝oracle11g解压文件到 /u01/oracle?

sudo cp -r /srv/ftp/pub/database /u01/oracle/?

赋可执行权限?

sudo chmod 755 u01/oracle/database?

sudo chmod 755 u01/oracle/database/*.*?

sudo chmod 755 u01/oracle/database/install/.oui?

sudo chmod 755 u01/oracle/database/install/*.*?

sudo chmod 755 u01/oracle/database/install/unzip?

未解压?

mv ****.zip /u01/oracle/?

unzip *.zip?

命令进行解压.完成后,所以安装文件都会在u01/oracle/database下.?

使用?

chown -R oracle:dba /u01/oracle/database/?

修改目录归属?

8、开始安装?
sudo su -?
xhost +127.0.0.1(或者使用oracle图形化界面登录安装)?

xhost +127.0.0.1执行失败请使用?

export DISPLAY=:0.0?

su – oracle?

cd /u01/oracle/database?

export LANG=en_US(采用英文界面安装,中文乱码)?

如果出现中文乱码也可使用下面命令?

./runInstaller -jreLoc /opt/jdk1.6.0_24/jre?

如果还是不能解决那就英文安装吧,中文麻烦难配。?

./runInstaller -ignoreSysPrereqs(忽略安装时的版本检查)?