首页 > 代码库 > 【实战】静默安装-oracle 11.2.0.3 on centos 5.10
【实战】静默安装-oracle 11.2.0.3 on centos 5.10
发现网上静默安装的文章很多,乱七八糟,五花八门!来个扫盲的!
centos 5.10 下安装oracle 11g_r2******************************************************************************1.系统部分******************************************************************************------1.安装系统--applicationsgraphicsgraphical internettext-based internetoffce/productivityeditorssound and video--base systemAdministration Toolsbaselegacy software support: compat-libstdc- compat-db-X Window Systemsystem tools :sysstat----desktop envirementsgnome desktop environment--development默认选项后添加下面选项Development Libraries :libstdc-development tools :gcc-legacy software development --languageschinese support---serverftp serverlegacy network server:rsh-server telnet-serverprinting supportserver configure tools------2.配置xmanager连接linux---2.1 centos 6.5 1).yum install xdm 安装XDM2).vi /etc/X11/xdm/Xaccess49 * #any host can get a login window3).修改/etc/gdm/custom.conf文件。[xdmcp]Enable=trueDisplaysPerHost=5Port=177[security]AllowRemoteRoot=true4).重启gpm服务:service gpm restartchkconfig gpm on 确认GPM服务开机启动5).重启gdm服务/usr/sbin/gdm -restart---2.2 centos 5.10--1.编辑配置文件ls -al /usr/share/gdm/defaults.confchmod 644 /usr/share/gdm/defaults.confvi /usr/share/gdm/defaults.conf /****/usr/share/gdm/defaults.conf 和/etc/gdm/custom.conf 内容一致,修改任意一个即可****/[xdmcp]Enable=trueDisplaysPerHost=5Port=177[security]AllowRemoteRoot=truevi /usr/share/gdm/defaults.conf214行 AllowRemoteRoot=true263行 Enable=true279行 DisplaysPerHost=2284行 Port=177--2.重启gpm服务:service gpm restartchkconfig gpm on 确认GPM服务开机启动--2.重启gdm服务/usr/sbin/gdm-restart-------1.3 配置yum源cd /etc/yum.repos.dmv CentOS-Base.repo CentOS-Base.repo.oldwget http://mirrors.163.com/.help/CentOS6-Base-163.repoyum makecache检查可更新的rpm包#yum check-update 更新所有的rpm包#yum updateyum -y groupinstall 'Development Libraries' ******************************************************************************2.oracle安装部分******************************************************************************1、检查下列包是否安装,若未安装则要先安装:mount /dev/cdrom /mntcd /mnt/CentOSrpm -Uvh binutils-2.*rpm -Uvh compat-libstdc++-33*rpm -Uvh compat-libstdc++-33*.i386.rpmrpm -Uvh elfutils-libelf*rpm -Uvh gcc-4.*rpm -Uvh gcc-c++-4.*rpm -Uvh glibc-2.*rpm -Uvh glibc-common-2.*rpm -Uvh glibc-devel-2.*rpm -Uvh glibc-headers-2.*rpm -Uvh ksh*rpm -Uvh libaio-0.*rpm -Uvh libaio-devel-0.*rpm -Uvh libgomp-4.*rpm -Uvh libgcc-4.*rpm -Uvh libstdc++-4.*rpm -Uvh libstdc++-devel-4.*rpm -Uvh make-3.*rpm -Uvh sysstat-7.*rpm -Uvh numactl-devel-*rpm -Uvh unixODBC-2.*rpm -Uvh unixODBC-devel-2.*---使用yum安装unixODBC yum install unixODBC yum install elfutils-libelf-develyum install pdksh步骤4:配置系统[root@ora ~]# grep MemTotal /proc/meminfoMemTotal: 4946772 kB[root@ora ~]# grep SwapTotal /proc/meminfoSwapTotal: 12289716 kB[root@ora ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda2 17G 2.8G 14G 18% //dev/sda1 1012M 40M 921M 5% /bootnone 891M 0 891M 0% /dev/shm/dev/hdc 192M 192M 0 100% /media/cdrom二、参数修改1.设置需要的IP2、修改host文件在/etc/hosts文件中添加一个全限定域名,如:vi /etc/hosts192.168.5.199 ocpyang.sz.com ocpyang3. 查看修改结果hostnamecat /etc/hosts | grep `eval hostname`4、设置核心参数 1、在/etc/sysctl.conf文件中加入下列行:#vi /etc/sysctl.conffs.suid_dumpable = 1fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 2532755456 kernel.shmmni = 4096# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default=4194304net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048586net.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 0kernel.core_uses_pid = 1net.ipv4.tcp_syncookies = 1kernel.msgmnb = 65536 5、运行下列命令改变核心参数:#/sbin/sysctl -p 6、在/etc/security/limits.conf文件中加入下列行:# vi /etc/security/limits.conforacle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle hard stack 102407、在/etc/pam.d/login文件中加入下列行:# vi /etc/pam.d/loginsession required pam_limits.so8.关闭SELINUX的工作模式和防火墙 # vi /etc/selinux/config# 设置SELINUX为disabledSELINUX=disabled# service iptables stop三、创建下列组和用户groupadd oinstallgroupadd dbagroupadd operuseradd -g oinstall -G dba,oper -d /home/oracle oraclepasswd oracle四、创建安装oracle的目录mkdir -p /u01mkdir -p /u01/app/oracle/product/11.2.0/db_1chown -R oracle.oinstall /u01chmod -R 775 /u01说明:/u01/app/oracle/product/11.2.0/db_1目录是用于放置程序文件的位置。五、设置oracle用户的环境变量用oracle登录在:/home/oracle/.bash_profile文件末尾,注意把其中ORACLE_SID换成自己的实例名:# vi /home/oracle/.bash_profile也可以 #su - oracle#vi .bash_profile增加下列内容:# Oracle SettingsTMP=/tmp;export TMPTMPDIR=$TMP;export TMPDIRORACLE_BASE=/u01/app/oracle;export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1;export ORACLE_HOMEORACLE_SID=orcl;export ORACLE_SIDORACLE_TERM=xterm;export ORACLE_TERMPATH=/usr/sbin:$PATH;export PATHPATH=$ORACLE_HOME/bin:$PATH;export PATHexport NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;export CLASSPATH#LD_ASSUME_KERNEL=2.4.1;export LD_ASSUME_KERNEL#set languageNLS_LANG="SIMPLIFIED CHINESE"_CHINA.AL32UTF8export NLS_LANGEDITOR=viexport EDITORif [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifialias oratrace="cat $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/alert_orcl.log"alias oradata=http://www.mamicode.com/"cd $ORACLE_BASE/oradata/$ORACLE_SID">【实战】静默安装-oracle 11.2.0.3 on centos 5.10
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。