Ⅰ linux怎么安装oracle
安装ORACLE 需要提前装需要安装oracle配置的包,之后才能安装oracle,这个网上找的到的,或者你上oracle官网上看看。
Ⅱ 远程 linux 安装oracle 12c 教程 xshell
图文的自己去找,这里我就告诉你如何安装:
检查cpu:grep "model name" /proc/cpuinfo
cat /proc/cpuinfo | grep "processor" | wc -l
cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
检查内存:grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
free -g
Oracle 12c 对系统内存的最低要求为1G,推荐2G或更大的内存
交换分区建议16G
检查磁盘空间:df -h
Oracle 12c 企业版的需要6.4G大小的磁盘空间,标准版需要6.1G大小的磁盘空间。/tmp 需要至少1G的大小
系统:Oracle 12 c 只支持64位的Linux系统。不支持32Linux平台
uname -m
uname -r
more /etc/redhat-release
uname -a
lsb_release -id
安装所需的包:rpm -q binutils compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh lio lio-devel libgcc libstdc++ libstdc++-devel libXext libXtst libX11 libXau libXi make sysstat
rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm
rpm -ivh compat-libstdc++-33-3.2.3-61.x86_64.rpm
ls *lio-devel*
rpm -ivh lio-devel-0.3.106-5.i386.rpm
rpm -ivh lio-devel-0.3.106-5.x86_64.rpm
创建Oracle用户和用户组
groupadd dba
groupadd oinstall
useradd -g oinstall -G dba oracle
id oracle
创建安装目录
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
设置:/usr/sbin/getenforce disabled
/usr/sbin/sestatus
修改系统内核参数:
在修改系统内核参数前,你可以用命令先查看一下当前各类系统参数的值,亦或直接查看配置文件/etc/sysctl.conf
getconf PAGESIZE
sysctl -a | grep sem
sysctl -a | grep shm
sysctl -a | grep file-max
sysctl -a | grep ip_local_port_range
cp /etc/sysctl.conf /etc/sysctl.conf.bak
vi /etc/sysctl.conf 添加或修改下面参数
kernel.shmmax = 68719476736
kernel.shmall = 6029312
kernel.shmmni = 4096
kernel.sem =250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.ip_local_port_range =9000 65500
fs.file-max=65536
fs.aio-max-nr=1048576
kernel.shmall =physical RAM size / pagesize (getconf PAGESIZE) -- If the defaults are greater then leave it.
kernel.shmall = 内存大小/4k=23G*1024*1024/4k = 6029312
kernel.shmmax = 20*1024*1024=20971520 而默认的为68719476736,那么使用默认值
修改完成后保存,然后运行sysctl -p 命令使之生效
17.设置用户限制
在/etc/security/limits.conf中添加如下配置。
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
Add the following line to the "/etc/pam.d/login" file,
if it does not already exist.
session required /lib/security/pam_limits.so
session required pam_limits.so
Add the following to
/etc/profile if Oracle user will use the bash shell.
if [ $USER = "oracle" ]; then
ulimit -u 16384
ulimit -n 65536
fi
18.设置环境变量:
首先切换到oracle账户 ,编辑修改主目录下 .bash_profile
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/proct/12.1.0/db_1; export ORACLE_HOME
ORACLE_SID=epps; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
使配置生效
[oracle@getoraclelnx01 ~]$ source .bash_profile
19.解压安装文件:
[oracle@getoraclelnx01 tmp]$ unzip V38500-01_1of2.zip
[oracle@getoraclelnx01 tmp]$ unzip V38500-01_2of2.zip
下面就开始正式安装了
http://images.cnitblog.com/blog/73542/201309/13184918-.gif
参考http://www.cnblogs.com/kerrycode/archive/2013/09/13/3319958.html
Ⅲ 如何在linux下安装Oracle 客户端
linux下安装Oracle客户端步骤如下:
1、下载
从Oracle官方网站上下载客户端和sqlplus程序。
以root用户安装
rpm-ivh oracle-instantclient-basic-11.1.0.1-1.x86_64.rpm
rpm-ivh oracle-instantclient-sqlplus-11.1.0.1-1.x86_64.rpm
2、配置
vim/etc/profile 添加
exportORACLE_HOME=/usr/lib/oracle/11.1.0.1/client64
exportORACLE_BASE=/usr/lib/oracle/11.1.0.1
exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
exportNLS_LANG=AMERICAN_AMERICA.AL32UTF8
设置好环境变量需要重启机器!
3、创建配置文件
在ORACLE_HOME目录下创建以下目录network/admin,并创建文件tnsnames.ora,内容如下:
vim/usr/lib/oracle/11.1.0.1/client64/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File:/opt/oracle10g/u01/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
111 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.15.111)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dmsdb)
)
)
4、测试
到ORACLE_HOME/bin目录下,执行命令:
[yleesun@centosbin]$ ./sqlplus zxd/zxd@111
SQL*Plus: Release 11.2.0.3.0 Proction on Mon Jul 9 19:14:25 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Proction
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
测试成功!
注:
如果出现以下错误:
sqlplus:error while loading shared libraries: libsqlplus.so: cannot open shared objectfile: No such file or directory
说明环境变量没有生效!