1、最小化安装linux,配置好yum源
安装依赖包
yum -y install binutils compat-libcap1 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc.i686 ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++l7.i686 libstdc++-devel libstdc++-devel.i686 compat-libstdc++-33 compat-libstdc++-33.i686 libXi libXi.i686 libXtst libXtst.i686 make sysstat smartmontools net-tools
---其他包 解压,xmanager远程
yum -y install unzip install xorg-x11-server-utils xorg-x11-utils
---sysctl
1 [root@dlp ~]# 2 MEMTOTAL=$(free -b | sed -n '2p' | awk '{print $2}') 3 4 [root@dlp ~]# 5 SHMMAX=$(expr $MEMTOTAL / 2) 6 7 [root@dlp ~]# 8 SHMMNI=4096 9 10 [root@dlp ~]# 11 PAGESIZE=$(getconf PAGE_SIZE) 12 [root@dlp ~]# 13 cat >> /etc/sysctl.conf << EOF 14 fs.aio-max-nr = 1048576 15 fs.file-max = 6815744 16 kernel.shmmax = $SHMMAX 17 kernel.shmall = `expr $SHMMAX/$PAGESIZE* $SHMMNI/16` 18 kernel.shmmni = $SHMMNI 19 kernel.sem = 250 32000 100 128 20 net.ipv4.ip_local_port_range = 9000 65500 21 net.core.rmem_default = 262144 22 net.core.rmem_max = 4194304 23 net.core.wmem_default = 262144 24 net.core.wmem_max = 1048576 25 EOF 26 [root@dlp ~]# 27 sysctl -p
[root@dlp ~]# i=54321; for group in oinstall dba backupdba oper dgdba kmdba; do groupadd -g $i $group; i=`expr $i + 1` done [root@dlp ~]# useradd -u 1200 -g oinstall -G dba,oper,backupdba,dgdba,kmdba -d /home/oracle oracle [root@dlp ~]# passwd oracle Changing password for user oracle. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@dlp ~]# mkdir -p /u01/app/oracle [root@dlp ~]# chown -R oracle:oinstall /u01/app [root@dlp ~]# chmod -R 775 /u01 [root@dlp ~]# vi /etc/pam.d/login # near line 14: add session required pam_selinux.so open session required pam_namespace.so session required pam_limits.so session optional pam_keyinit.so force revoke session include system-auth -session optional pam_ck_connector.so
[oracle@dlp ~]$ vi ~/.bash_profile # add to the end umask 022 export ORACLE_BASE=/u01/app/oracle export ORACLE_OWNER= oracle export ORACLE_HOME= /u01/app/oracle/product/12.2.0/dbhome_1 export PATH=$PATH:$ORACLE_HOME/bin
参考:
http://blog.csdn.net/hanzheng260561728/article/details/51323816