标签:oracle 11g安装
oracle 11g安装入门
修改shell限制
vi /etc/security/limits.conf
---------------------------------------------
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
修改内核参数
vi /etc/sysctl.conf
---------------------------------------------
kernel.shmmax = 4046471168
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
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 = 1048576
fs.aio-max-nr = 1048576
---------------------------------------------
使内核参数生效
sysctl -p
创建相关的组:
oinstall --> 产品所有者
dba --> 数据库的安全审核
groupadd oinstall
groupadd dba
创建用户
useradd -g oinstall -G dba -m oracle
设置oracle用户的口令:
passwd oracle
修改ora10g用户的系统环境变量
su - oracle
vi .bashrc
---------------------------------------------------------
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ORACLE_SID=orcl
export ORACLE_OWNER=oracle
export ORACLE_TERM=vt100
export THREADS_FLAG=native
export LANG=en_US
---------------------------------------------------------
使环境变量生效:
source .bashrc
创建安装数据库软件的目录:
mkdir -p /u01/app/oracle
chown -R oracle.oinstall /u01/app
oracle安装介质在服务器:
scp * oracle@172.25.0.11:/home/oracle/
/home/kiosk/Desktop/Oracle/installers/p13390677_112040_Linux-x86-64_1of7.zip
/home/kiosk/Desktop/Oracle/installers/p13390677_112040_Linux-x86-64_2of7.zip
将安装文件拷贝到本地并解压缩:
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
修改软件包目录的权限:
chown -R oracle.oinstall database
在root用户下打开普通用户调用Xserver的权利
ssh root@172.25.0.11 -X
# xhost +
exit
ssh oracle@172.25.0.11 -X
yum -y install unixODBC-devel*
调用安装程序:
cd ~/database
./runInstaller
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2、卸载oracle
卸载oracle软件:
1.停止oem
emctl stop dbconsole db
2.停止监听
lsnrctl stop
3.停止数据库
sqlplus / as sysdba
shut immediate
删除相关文件
rm -fr /u01/app/*
rm -fr /etc/ora*
rm -f /usr/local/bin/coraenv
rm -f /usr/local/bin/dbhome
rm -f /usr/local/bin/oraenv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3、oracle另外一种安装文档
使用另一种安装方法:静默安装
1.修改OUI安装向导保存的应答文件,指定数据库的初始口令
oracle.install.db.config.starterdb.password.ALL=Oracle11g
2.启动安装
cd ~/database
./runInstaller -silent -responseFile /home/oracle/soft.rsp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4、连接数据库
连接数据库:
sqlplus / as sysdba
SQL> show user
USER is "SYS"
查看当前数据库的状态:
SQL> select status from v$instance;
STATUS
------
OPEN
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
本文出自 “梁小明的博客” 博客,请务必保留此出处http://7038006.blog.51cto.com/7028006/1835437
标签:oracle 11g安装
原文地址:http://7038006.blog.51cto.com/7028006/1835437