Ⅰ 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
說明環境變數沒有生效!