簡單oracle安裝步驟
<strong><span style="font-size:18px;">簡單oracle安裝步驟</span></strong>
<hr />
<br />
一: 安裝包:<br />
cd /etc/yum.repos.d/<br />
vi rhel54.repo<br />
[Server]<br />
name=Red Hat Enterprise Linux Server<br />
baseurl=ftp://172.26.0.11/Server64/<br />
enabled=1<br />
gpgcheck=1<br />
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release<br />
yum -y install <br />
<br />
<br />
yum -y install binutils<br />
yum -y install compat-libstdc++-33<br />
yum -y install elfutils-libelf<br />
yum -y install glibc<br />
yum -y install glibc-common<br />
yum -y install ksh<br />
yum -y install libaio<br />
yum -y install libgcc<br />
yum -y install libstdc++<br />
yum -y install make<br />
yum -y install elfutils-libelf-devel<br />
yum -y install glibc-headers<br />
yum -y install glibc-devel<br />
yum -y install gcc<br />
yum -y install libstdc++-devel<br />
yum -y install gcc-c++<br />
yum -y install libaio-devel<br />
yum -y install sysstat<br />
yum -y install unixODBC<br />
yum -y install unixODBC-devel<br />
yum -y install libXp<br />
<br />
<br />
二:修改核心引數 <br />
1:/etc/sysctl.conf中新增<br />
kernel.shmall = 4294967296<br />
kernel.shmmax = 68719476736<br />
kernel.shmmni = 4096 <br />
kernel.sem = 310 32000 100 128 <br />
fs.file-max = 6815744<br />
fs.aio-max-nr = 1048576<br />
net.ipv4.ip_local_port_range = 9000 65500<br />
net.core.rmem_default = 262144 <br />
net.core.rmem_max = 4194304 <br />
net.core.wmem_default = 262144 <br />
net.core.wmem_max = 1048576<br />
sysctl -p --需要在/etc/目錄下<br />
kernel.shmall = physical RAM size / pagesize For most systems, this will be the value 2097152. See Note 301830.1 for more information. <br />
kernel.shmmax = 1/2 of physical RAM, but not greater than 4GB. This would be the value 2147483648 for a system with 4Gb of physical RAM. <br />
kernel.shmmni = 4096 <br />
kernel.sem = 250 32000 100 128 <br />
fs.file-max = 512 x processes (for example 6815744 for 13312 processes)<br />
fs.aio-max-nr = 1048576<br />
net.ipv4.ip_local_port_range = 9000 65500 <br />
net.core.rmem_default = 262144 <br />
net.core.rmem_max = 4194304 <br />
net.core.wmem_default = 262144 <br />
net.core.wmem_max = 1048576<br />
<br />
<br />
2: 修改/etc/security/limits.conf<br />
新增:<br />
* soft nproc 2047 <br />
* hard nproc 16384 <br />
* soft nofile 1024 <br />
* hard nofile 65536<br />
<br />
<br />
3:修改/etc/pam.d/login<br />
新增:<br />
<br />
<br />
session required pam_limits.so<br />
4:修改/etc/profile<br />
新增:<br />
<br />
<br />
<br />
<br />
5: 建立oracle使用者<br />
[root@esalespreapp1 etc]# groupadd -g 500 dba<br />
[root@esalespreapp1 etc]# groupadd -g 501 oinstall<br />
[root@esalespreapp1 etc]# groupadd -g 502 oper<br />
[root@esalespreapp1 etc]# useradd -u 500 -g oinstall -G dba,oper oracle<br />
[root@esalespreapp1 etc]# id oracle<br />
uid=500(oracle) gid=501(oinstall) groups=501(oinstall),500(dba),502(oper)<br />
[root@esalespreapp1 etc]# passwd oracle<br />
Changing password for user oracle.<br />
New UNIX password: <br />
BAD PASSWORD: it is based on a dictionary word<br />
Retype new UNIX password: <br />
passwd: all authentication tokens updated successfully.<br />
<br />
<br />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">groupadd -g 500 oinstall</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">groupadd -g 501 dba</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">groupadd -g 502 oper</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">groupadd -g 503 asmdba</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">groupadd -g 504 asmadmin</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">groupadd -g 505 asmoper</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">useradd -u 500 -g oinstall -G dba,oper,asmdba oracle</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">useradd -u 501 -g oinstall -G dba,oper,asmdba,asmadmin,asmoper grid</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">passwd oracle</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">passwd grid</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">[root@rac1 tmp]# id oracle</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba),502(oper),503(asmdba)</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">[root@rac1 tmp]# id grid</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">uid=501(grid) gid=500(oinstall) groups=500(oinstall),501(dba),502(oper),503(asmdba),504(asmadmin),505(asmoper)</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">2.3 建立密碼不過期</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chage -M 99999 oracle</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chage -M 99999 grid</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<br />
<br />
<br />
<br />
配置vnc:<br />
vncserver<br />
或者:<br />
vncserver -geometry 1280x900<br />
<br />
vncserver -kill szdevdb3:1<br />
cd .vnc 目錄<br />
<br />
<br />
[oracle@szruledb2 .vnc]$ vi xstartup <br />
註釋並加入一行<br />
gnome-session &<br />
<br />
<br />
<br />
<br />
[oracle@szsgisuatdb1 .vnc]$ vi xstartup<br />
#!/bin/sh<br />
<br />
<br />
# Uncomment the following two lines for normal desktop:<br />
# unset SESSION_MANAGER<br />
# exec /etc/X11/xinit/xinitrc<br />
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup<br />
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources<br />
xsetroot -solid grey<br />
vncconfig -iconic &<br />
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &<br />
#twm &<br />
gnome-session &<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
6:修改ORACLE使用者的profile<br />
[oracle@esalespreapp1 ~]$ vi .bash_profile<br />
# .bash_profile<br />
# Get the aliases and functions<br />
if [ -f ~/.bashrc ]; then<br />
. ~/.bashrc<br />
fi<br />
# User specific environment and startup programs<br />
PATH=$PATH:$HOME/bin<br />
export PATH<br />
export ORACLE_BASE=/app<br />
export ORACLE_SID=esales<br />
export ORACLE_HOME=$ORACLE_BASE/product/ora11g<br />
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib<br />
export PATH=$ORACLE_HOME/bin:$PATH<br />
export EDITOR=vi<br />
export NLS_LANG='SIMPLIFIED CHINESE_CHINA.ZHS16GBK'<br />
umask 022<br />
<br />
<br />
<br />
<br />
生效配置檔案<br />
<br />
<br />
. prof_grp<br />
source prof_grp<br />
<br />
<br />
建目錄:<br />
<br />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">mkdir -p /app/grid</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">mkdir -p /app/oracle</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">mkdir -p /app/oraInventory</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">mkdir -p /app/soft</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">mkdir -p /app/soft/grid</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">mkdir -p /app/soft/oracle</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">mkdir -p /app/soft/asmlib</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">mkdir -p /backup</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">mkdir -p /arch</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chown -R oracle:oinstall /app</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chown -R oracle:oinstall /arch</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chown -R oracle:oinstall /backup</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chown -R grid:oinstall /app/grid</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chown -R oracle:oinstall /app/oracle</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chown -R grid:oinstall /app/oraInventory</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chown -R grid:oinstall /app/soft/grid</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chown -R oracle:oinstall /app/soft/oracle</span><br style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;" />
<span style="color:#666666;font-family:宋體, Arial;line-height:26px;white-space:normal;background-color:#FFFFFF;">chmod -R 755 /app</span><br />
<br />
<br />
7: 停止防火牆<br />
[root@szuatdb1 oracle]# service iptables stop<br />
Flushing firewall rules: [ OK ]<br />
Setting chains to policy ACCEPT: filter [ OK ]<br />
Unloading iptables modules: [ OK ]<br />
[root@szuatdb1 oracle]# chkconfig iptables off<br />
[root@szuatdb1 oracle]# <br />
<br />
<br />
<br />
<br />
<br />
<br />
三: 安裝資料庫軟體:<br />
dbca<br />
$ dbca<br />
DISPLAY not set.<br />
Set DISPLAY environment variable, then re-run.<br />
$<br />
export DISPLAY=ip:0.0<br />
<br />
<br />
四:修改引數<br />
alter profile default limit password_life_time unlimited;<br />
alter profile default limit FAILED_LOGIN_ATTEMPTS unlimited;<br />
alter system set sec_case_sensitive_logon=false;<br />
<br />
<br />
建庫<br />
<br />
<br />
語言選擇:zh16gbk<br />
<br />
<br />
<br />
<br />
啟動<br />
<br />
<br />
echo $ORACLE_SID<br />
ps -ef|grep smon<br />
export ORACLE_SID=testdb<br />
sqlplus "/as sysdba"<br />
shutdown immediate<br />
<br />
<br />
<br />
<br />
配置監聽<br />
netca<br />
<br />
<br />
alter system set local_listener=LISTENER_ATP;<br />
<br />
<br />
alter system register;<br />
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29674916/viewspace-2084911/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Toad for Oracle 2020 安裝教程(附安裝方法步驟)Oracle
- Oracle RAC叢集解除安裝步驟Oracle
- PostgreSQL簡介及安裝步驟SQL
- Linux下編譯安裝Mysql 5.5的簡單步驟Linux編譯MySql
- vnc安裝步驟,vnc安裝步驟詳解VNC
- [ 安裝 ] Zeppelin安裝步驟!
- linux下安裝redis 單節點安裝操作步驟LinuxRedis
- xftp安裝步驟,xftp安裝的2大步驟FTP
- Nagios安裝步驟iOS
- STF 安裝步驟
- anaconda安裝步驟
- Linux 安裝步驟Linux
- 安卓開發中RecycleView簡單使用步驟安卓View
- Mongoose簡單使用步驟Go
- vnc安裝步驟,如何在Linux(CentOS 7)下vnc安裝步驟VNCLinuxCentOS
- Sublime Text安裝步驟
- aws安裝jenkins步驟Jenkins
- Iris 框架安裝步驟框架
- zookeeper安裝部署步驟
- windows安裝cnpm步驟WindowsNPM
- Maya 2023安裝步驟
- charles的安裝步驟
- Linux安裝Nginx步驟LinuxNginx
- 安裝jdk的步驟JDK
- 超詳細oracle 11g安裝步驟 win版本Oracle
- vnc安裝步驟,4個在Linux下vnc的個安裝步驟VNCLinux
- Oracle 12c升級需遵循的簡單步驟NFOracle
- 大資料(Hadoop)元件安裝 Linux環境準備 步驟簡單 詳細大資料Hadoop元件Linux
- ORACLE11GR2 RAC解除安裝ASM例項步驟OracleASM
- ubuntu 下安裝nginx步驟UbuntuNginx
- linux下安裝docker步驟LinuxDocker
- CDH6.2.0安裝步驟
- Android studio的安裝步驟Android
- MHA安裝和部署步驟
- 【Nginx1.12.2安裝步驟】Nginx
- 國內Kubernetes安裝步驟
- Linux安裝JDK完整步驟LinuxJDK
- 如何安裝discuz論壇,discuz安裝步驟
- Mac安裝Redis,詳細redis安裝步驟MacRedis