linux安装oracle
修改shell限制
vi /etc/security/limits.conf
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16834
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 -Gdba -m oracle
设置oracle用户的口令:
password oracle
创建安装数据库软件的目录:
mkdir -p /u01/app/oracle
chown -R oracle.oinstall /u01/app
修改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
修改压缩包的所属组
chown oracle. *.zip
解压压缩包
unzip *.zip
ssh连接:
-X代表图形连接
ssh root@172.25.0.11 -X
打开普通用户访问xserver的权力
xhost +
exit
ssh oracle@172.25.0.11 -X
测试图形连接(钟)
xclock
进入安装包解压路径database进行安装
./runInstaller
日志文件路径
/u01/app/oraInventory/logs
根据响应文件静默安装
./runInstaller -silent -responseFile /tmp/oracle/database/response/db_install.rsp
连接sqlplus
sqlplus / as dba
conn / as dba
conn scott/tiger
修改数据库用户锁定状态
alter user scott identified by tiger account unlock;