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 [[email protected] ~]# 2 MEMTOTAL=$(free -b | sed -n ‘2p‘ | awk ‘{print $2}‘) 3 4 [[email protected] ~]# 5 SHMMAX=$(expr $MEMTOTAL / 2) 6 7 [[email protected]dlp ~]# 8 SHMMNI=4096 9 10 [[email protected] ~]# 11 PAGESIZE=$(getconf PAGE_SIZE) 12 [[email protected] ~]# 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 [[email protected] ~]# 27 sysctl -p
[[email protected] ~]# i=54321; for group in oinstall dba backupdba oper dgdba kmdba; do groupadd -g $i $group; i=`expr $i + 1` done [[email protected] ~]# useradd -u 1200 -g oinstall -G dba,oper,backupdba,dgdba,kmdba -d /home/oracle oracle [[email protected] ~]# passwd oracle Changing password for user oracle. New password: Retype new password: passwd: all authentication tokens updated successfully. [[email protected] ~]# mkdir -p /u01/app/oracle [[email protected] ~]# chown -R oracle:oinstall /u01/app [[email protected] ~]# chmod -R 775 /u01 [[email protected] ~]# 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
[[email protected] ~]$ 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