ubuntu 10.04 server 安装oracle10G企业版

环境说明:

server:ubuntu10.04server

client:ubuntu11.04desktop

 

1、修改更新源

sudo nano   /etc/apt/sources.list

台湾源
deb http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe main multiverse restricted

 

sudo apt-get update   更新源列表信息

 

2、安装必要软件

sudo apt-get install gcc binutils lesstif2 libc6 libc6-dev
sudo apt-get install rpm libmotif3 libaio1 libstdc++6 alien

 

3、建用户

sudo addgroup oinstall
sudo addgroup dba
sudo useradd -g oinstall -G dba -m -s /bin/bash oracle
sudo passwd oracle
sudo groupadd nobody
sudo usermod -g nobody nobody

 

4、修改 sysctl.conf

sudo nano /etc/sysctl.conf

 

kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

 

5、修改 limits.conf

sudo nano /etc/security/limits.conf

oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384

 

6、使修改生效

sudo sysctl -p

 

7、创建程序链接

sudo ln -s /usr/bin/awk /bin/awk

sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /usr/bin/basename /bin/basename

 

8、创建目录

sudo mkdir -p /opt/ora10
sudo mkdir -p /opt/oradata
sudo chown -R oracle:oinstall /opt/ora*
sudo chmod -R 775 /opt/ora*

 

9、以 oracle 用户登录

su oracle

 

10、创建.bash_oracle

nano .bash_oracle

内容如下:
# oracle 10g
export ORACLE_BASE=/opt/ora10
export ORACLE_HOME=/opt/ora10
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=compiere
export ORACLE_TERM=xterm
# Edit paths
export LD_LIBRARY_PATH=/usr/lib:/lib/:$LD_LIBRARY_PATH:/opt/ora10/lib:/opt/ora10/lib/stubs/
export PATH=/opt/ora10/bin:$PATH

 

11、修改~/.bashrc

nano .bashrc

添加如下行
source .bash_oracle

 

12、设置client端的Xserver监听相应的TCP端口

sudo gedit /etc/X11/xinit/xserverrc

内容如下,去掉其中的  -nolisten tcp
exec /usr/bin/X -nolisten tcp "$@"

 

13、client端重启gdm

Ctrl+Alt+F1

sudo /etc/init.d/gdm restart

 

14、在client端添加server对XServer的访问

host + client端IP

 

15、设置server端显示输出

export DISPLAY client端IP:0.0

测试输出: xclock

 

你可能感兴趣的:(oracle10g)