您的位置:首页 > 数据库 > Oracle

linux下安装oracle 10g

2012-01-01 14:51 323 查看
install oracle 10g steps:

1. preinstall,install all of the package witch oracle 10g depand on

#>rpm -ivh compat-libcwait-2.1-2.x86_64.rpm

#>rpm -ivh compat-db-4.2.52-5.1.i386.rpm

#>rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm

#>rpm -ivh libXp-devel-1.0.0-8.1.el5.i386.rpm

#>rpm -ivh openmotif-2.3.0-0.3.el5.i386.rpm

#>rpm -ivh openmotif-devel-2.3.0-0.3.el5.i386.rpm

#>rpm -ivh glib-1.2.10-26.fc7.i386.rpm

#>rpm -ivh libpng10-1.0.18-2.i386.rpm

#>rpm -ivh ORBit-0.5.17-22.rhel5.i386.rpm

#>rpm -ivh gtk+-1.2.10-57.fc7.i386.rpm

#>rpm -ivh imlib-1.9.15-2.fc7.i386.rpm

#>rpm -ivh gnome-libs-1.4.2-7.rhel5.i386.rpm

#>rpm -ivh kernel-debug-devel-2.6.18-128.el5.x86_64.rpm

#>rpm -ivh kernel-debug-2.6.18-128.el5.x86_64.rpm

#>rpm -ivh kernel-devel-2.6.18-128.el5.x86_64.rpm

#>rpm -ivh kernel-2.6.18-128.el5.x86_64.rpm

2. #>vi /etc/sysctl.conf

kernel.shmmni = 4096

kernel.sem = 500 64000 500 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

3. #>sysctl -p

4. #>vi /etc/security/limits.conf

* soft nproc 2047

* hard nproc 16384

* soft nofile 1024

* hard nofile 65536

5. create linux user and credate install dir

#>groupadd oinstall

#>groupadd dba

#>useradd -m -g oinstall -G dba oracle

#>passwd oracle

#>mkdir -p /opt/oracle

#>chown -R oracle:oinstall /ora/oracle

#>chmod -R 775 /ora/oracle

6. login with oracle,edit the default config file of oracle

$>vi ~/.bash_profile

export ORACLE_BASE=/ora/oracle

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

export ORACLE_SID=dbserver

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH

7. unzip the oracle install file,for 64bit system the file is 10201_database_linux_x86_64.cpio.gz

$>gunzip 10201_database_linux_x86_64.cpio.gz

$>cpio -idmv < 10201_database_linux_x86_64.cpio

8. $>./database/runInstaller

config oracle 10g steps:

(need to edit oraclesvc file,because oracle install path will be changed every install)

0.#>vi /etc/oratab

rewrite orcl=...oracle/product/10.2.0/db_1:N to orcl=.../oracle/product/10.2.0/db_1:Y

//#>iptables -I INPUT -i eth0 -P tcp --dport 1521 -j ACCEPT

# su - ORACLE

$> cd $ORACLE_HOME/bin

$> vi dbstart

find ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle

change it to ORACLE_HOME_LISTNER=$ORACLE_HOME

1. #>cp oraclesvc /etc/init.d/oraclesvc

#>chmod 775 oraclesvc

2. #>chkconfig --add oraclesvc

3. #>chkconfig --level 345 oraclesvc on

/*

#>vi /etc/rc.local

//add in the end of text:

su - oracle -c "/ora/product/10.2.0/db_1/bin/lsnrctl start"

su - oracle -c "/ora/product/10.2.0/db_1/bin/dbstart"

su - oracle -c "/ora/product/10.2.0/db_1/bin/emctl start dbconsole"

*/

4. $>emctl start dbconsole

$>lsnrctl start

$>sqlplus /nolog

sql>connect / as sysdba;

sql>startup

$>emctl stop dbconsole

5. use sql*plus tools to create user of oracle10g

sql>create user ecrm

>profile default

>identified by ecrm

>default tablespace users

>temporary tablespace temp

>account unlock;

6. grant

sql>grant Connect to ecrm;

sql>grant Resource to ecrm;

sql>grant dba to ecrm;

7. auto backup,edit the crontab config,backup in 2:00 every day

(need to edit bashup.sh file,because oracle install path and the username will be changed every install)

$>cp backup.sh /home/oracle/backup/bashup.sh

#>chmod 775 bashup.sh

#>vi /etc/crontab

00 2 * * * root /home/oracle/backup/backup.sh

#>service crond stop

#>service crond start

config ip steps:

1.#>vi /etc/rc.local

//add in the end of text:

ifconfig eth0 192.168.*.* netmask 255.255.*.*

route add default gw 192.168.*.*

2.#>vi /etc/resolv.conf //config dns not must
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: