????#????????
????1???????????????? Linux????x86-64???μ???????
??????????棺??1GB
???????????????????1GB??2GB??????????????????????1.5????????????2GB??8GB??????????????????????1????????????8GB???????????????????????0.75????

???????????????4.35GB???????3.22GB??????壨???????3.45GB
????2?????????????
????# grep MemTotal /proc/meminfo
????# grep SwapTotal /proc/meminfo
????1.    ????????????Oracle?????
???????????? Oracle?????????
????????linux x86-64?汾?????????.zip???????Oracle?????????????????????????????棬???Oracle?????????????????????????????????????????????wget???????????????????????????????????
??????????????????????????????scp??????????????????????????????????????????linux????????????????????????linux?????????????????????????
????scp -P 8022 /home/oracle_linux_1.zip root@222.204.6.82:/home/oracle_linux_1.zip
?????????????????????-P??????д??8022???ssh????????????????????zip?????????????????????????????????λ?á????????????????? ssh????????? ??
???????????linux???????????????????ssh???????linux?????????????н??в??????(?????????root??????)
????ssh -p 8022 root@ip
?????????????.zip?????λ??????unzip????????????
????unzip oracle_linux_1.zip
????unzip oracle_linux_2.zip
??????????????????????????£??????????????????/database?????????????????????????????
????2.???Oracle????????????????
????????? CentOS 6.5 64λ??????Oracle11g
????2.1??????????????
??????????????仰????????????У???????????????
????yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat unixODBC unixODBC-devel
????2.2?????Oracle??????
????#????oinstall??dba?飬??oracle????????飬??????趨oracle?????????
????groupadd oinstall
????groupadd dba
????useradd -g oinstall -G dba oracle
????passwd oracle
????2.3???????????
????##?????/etc/sysctl.conf?????linux??vi????
????vi /etc/sysctl.conf
????##??????????????????2?????????????????????????????????ο?????????????????
????fs.aio-max-nr = 1048576
????fs.file-max = 6815744
????kernel.shmall = 2097152
????kernel.shmmax = 536870912
????kernel.shmmni = 4096
????kernel.sem = 250 32000 100 128
????net.ipv4.ip_local_port_range = 9000 65500
????net.core.rmem_default = 262144
????net.core.rmem_max = 4194304
????net.core.wmem_default = 262144
????net.core.wmem_max = 1048586
????##??????棬????????????????Ч
????sysctl -p
????2.4???????????????
????##1?????/etc/security/limits.conf???????
????vi /etc/security/limits.conf
????##??????????·????????2???
????oracle              soft    nproc  2047
????oracle              hard    nproc  16384
????oracle              soft    nofile  1024
????oracle              hard    nofile  65536
????oracle              soft    stack   10240
????##???沢???
????##2?????/etc/pam.d/login?????????
????vi /etc/pam.d/login
????##??????????м???
????session required /lib/security/pam_limits.so
????session required pam_limits.so
????2.5???????????
?????????????/usr/local/oracle   /usr/local/oraInventory  /usr/local/oradata?????????????????
????mkdir -p /usr/local/oracle /usr/local/oraInventory /usr/local/oradata/
????chown -R oracle:oinstall /usr/local/oracle /usr/local/oraInventory /usr/local/oradata/
????chmod -R 775 /usr/local/oracle /usr/local/oraInventory /usr/local/oradata/
????2.6??????oraInst.loc???
????##????/etc/oraInst.loc???
????vi /etc/oraInst.loc
????##????????????????
????inventory_loc=/usr/local/oraInventory
????inst_group=oinstall
????##????????????????????趨???????????鼰????
????chown oracle:oinstall /etc/oraInst.loc
????chmod 664 /etc/oraInst.loc
????2.7?????oracle????????????db_install.rsp???
????## 1??????????????????????????????????/home/database/response?£?
????## ??oracle????????????????????????? /usr/local/oracle???????
????cp /home/database/response/* /usr/local/oracle/
????## 2?????????????????????????????鼰???
????chown  oracle:oinstall /usr/local/oracle*.rsp
????chmod 755 /usr/local/oracle/*.rsp
????## 3??????db_install.rsp???
????vi /usr/local/oracle/db_install.rsp
????## 4?????????????????????????£?
????oracle.install.option=INSTALL_DB_SWONLY     //??????????????????
????ORACLE_HOSTNAME=serv2.lin.vm.ncu        //?????????????????????hostname?????
????UNIX_GROUP_NAME=oinstall            // ?????
????INVENTORY_LOCATION=/usr/local/oraInventory  //INVENTORY????**????????????????????????????????????????????
????SELECTED_LANGUAGES=en??zh_CN    // ???????
????ORACLE_HOME=/usr/local/oracle/product/11.2.0/db_1  // oracle_home *·????????????????? ???????·??/usr/local/oracle
????ORACLE_BASE=/usr/local/oracle                  // oracle_base *??????
????oracle.install.db.InstallEdition=EE          // oracle?汾
????oracle.install.db.isCustomInstall=false      //????尲??????????????
????oracle.install.db.DBA_GROUP=dba              //dba?????
????oracle.install.db.OPER_GROUP=oinstall        //oper?????
????oracle.install.db.config.starterdb.type=GENERAL_PURPOSE   //?????????
????oracle.install.db.config.starterdb.globalDBName=orcl      //globalDBName
????oracle.install.db.config.starterdb.SID=orcl  //SID??**????????????????????SID??£?
????oracle.install.db.config.starterdb.memoryLimit=81920      //??????????????(M)
????oracle.install.db.config.starterdb.password.ALL=oracle    //?趨???????????????????????
????SECURITY_UPDATES_VIA_MYORACLESUPPORT=false       //?????д??false??
????DECLINE_SECURITY_UPDATES=true // **??????? ?趨?????true
????2.8??????oracle???????
????## ??root?л??????????oracle???
????su – oracle
????## ????????????????????????????~???£??????????cd ????cd ~
????cd
????vi .bash_profile
????## ?????????????????????
????export ORACLE_BASE=/usr/local/oracle
????export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
????export ORACLE_SID=orcl
????export ORACLE_OWNER=oracle
????export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
????## ????????????source??????????Ч??
????source .bash_profile
????2.9????oracle??????????
????## ??????
????/home/oracle/database/./runInstaller -silent -force -ignorePrereq -responseFile /usr/local/oracle/db_install.rsp
????##???????
????/home/database ????????????·??????????????????????λ???????????????
????runInstaller ???????????
????-silent ?????
????-force ?????
????-ignorePrereq????warning???????
????-responseFile??????????????
????2.10?????н??
???????????????????????????1???????????????鶼?????????????????д????2??????????root???????????????
??????2????????/usr/local/oracle/product/11.2.0/db_1????????????????????????????????????????????root.sh?????????????
???????????1?????????????????????????????????????????????
????#-------------------------------------------------------------------
????/usr/oracle/oraInventory/orainstRoot.sh????????????С???????????????????????????????????????????????orainstRoot.sh?????
????/usr/oracle/product/11.2.0/db_1/root.sh
????To execute the configuration scripts:
????1. Open a terminal window
????2. Log in as "root"
????3. Run the scripts
????4. Return to this window and hit"Enter" key to continue
????Successfully Setup Software.
????#------------------
??????????????????2?????????root.sh???
????./root.sh
?????????????????????????????????á?
????3. ?????????ú????
????3.1 ???????????
?????????л???
????????/usr/local/oracle??????dbca.rsp?????????????????
????vi dbca.rsp
??????????????????????????????????????????? ?????????????????????????????????????? ??
????GDBNAME = “orcl”
????SID = “orcl”
????CHARACTERSET = “ZHS16GBK”
????NATIONALCHARACTERSET= “AL16UTF16”
????SOURCEDB = “serv2.lin.vm.ncu:1521:orcl”
????????????????dbca??????????
????dbca -silent -responseFile dbca.rsp
???????????????
????Copying database files
????1% complete
????3% complete
????11% complete
????18% complete
????26% complete
????37% complete
????Creating and starting Oracle instance
????40% complete
????…………………………
??????е?????????????
????3.2??????????????????
??????????????£??????netca.rsp????????????????
????netca -silent -responseFile netca.rsp
???????????
????lsnrctl start
????dbstart $ORACLE_HOME
????--???--
??????????????????????????????????????????????????????????????????Щ?????????????????????????л?????~??
????????????????????????????? Linux ?????????DB??????????docker?????????????Щ???????????????鷳??
?????????????docker???????滹?????????????о???????????????????