-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.json
1 lines (1 loc) · 17.1 KB
/
search.json
1
[{"title":"Hello World","url":"/2018/04/23/hello-world/","content":"Welcome to [Hexo](https://hexo.io/)! This is your very first post. Check [documentation](https://hexo.io/docs/) for more info. If you get any problems when using Hexo, you can find the answer in [troubleshooting](https://hexo.io/docs/troubleshooting.html) or you can ask me on [GitHub](https://github.com/hexojs/hexo/issues).\n\n## Quick Start\n\n\n<!-- more -->\n\n\n### Create a new post\n\n``` bash\n$ hexo new \"My New Post\"\n```\n\nMore info: [Writing](https://hexo.io/docs/writing.html)\n\n### Run server\n\n``` bash\n$ hexo server\n```\n\nMore info: [Server](https://hexo.io/docs/server.html)\n\n### Generate static files\n\n``` bash\n$ hexo generate\n```\n\nMore info: [Generating](https://hexo.io/docs/generating.html)\n\n### Deploy to remote sites\n\n``` bash\n$ hexo deploy\n```\n\nMore info: [Deployment](https://hexo.io/docs/deployment.html)\n"},{"title":"CentOS下 Oracle 12c R2 静默安装","url":"/2018/04/22/Oracle-12c-R2_静默安装/","content":"\n\n## 环境:\n\n\n### 文件准备\n\n\n 阿里云ECS:centos7 ,也可使用其他linux 环境\n Oracle: Oracle 12.2.0.1 [下载链接](http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html)\n \n---\n\n<!-- more -->\n\n## 安装准备\n\n \n### Hosts file \n\n \n\t\tcat /etc/hosts \n\t\t127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 \n\t\t::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 \n\t\t192.168.0.109 centos7 \n\n### 配置/etc/sysctl.conf\n\n\n\t\t[root@centos7 ~]# vim /etc/sysctl.conf \n\t\t# System default settings live in /usr/lib/sysctl.d/00-system.conf. \n\t\t# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file \n\t\t# \n\t\t# For more information, see sysctl.conf(5) and sysctl.d(5). \n\t\t# \n\t\tfs.file-max = 6815744 \n\t\tkernel.sem = 250 32000 100 128 \n\t\tkernel.shmmni = 4096 \n\t\tkernel.shmall = 1073741824 \n\t\tkernel.shmmax = 4398046511104 \n\t\tkernel.panic_on_oops = 1 \n\t\tnet.core.rmem_default = 262144 \n\t\tnet.core.rmem_max = 4194304 \n\t\tnet.core.wmem_default = 262144 \n\t\tnet.core.wmem_max = 1048576 \n\t\tnet.ipv4.conf.all.rp_filter = 2 \n\t\tnet.ipv4.conf.default.rp_filter = 2 \n\t\tfs.aio-max-nr = 1048576 \n\t\tnet.ipv4.ip_local_port_range = 9000 65500 \n\t\t\n\t\t\n\t\t#使配置生效\n\t\t[root@centos7 ~]# /sbin/sysctl -p\n\n\n### 配置/etc/security/limits.d/20-nproc.conf\n \n\n\t\t[root@centos7 ~]# vim /etc/security/limits.d/20-nproc.conf \n\t\t# Default limit for number of user's processes to prevent \n\t\t# accidental fork bombs. \n\t\t# See rhbz #432903 for reasoning. \n\t\t \n\t\t* soft nproc 4096 \n\t\troot soft nproc unlimited \n\t\toracle soft nofile 1024 \n\t\toracle hard nofile 65536 \n\t\toracle soft nproc 16384 \n\t\toracle hard nproc 16384 \n\t\toracle soft stack 10240 \n\t\toracle hard stack 32768 \n\t\toracle hard memlock 134217728 \n\t\toracle soft memlock 134217728 \n\n\n### 安装一些包:\n\n\n\t\tyum install -y binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libX11 libX11.i686 libXau libXau.i686 libXi libXi.i686 libXtst libXtst.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libxcb libxcb.i686 make nfs-utils net-tools smartmontools sysstat unixODBC unixODBC-devel gcc gcc-c++ libXext libXext.i686 zlib-devel zlib-devel.i686\n\n\n### 创建用户和组\n \n\n\t\t[root@centos7 ~]# unzip linuxx64_12201_database.zip ^C \n\t\t[root@centos7 ~]# groupadd -g 54321 oinstall \n\t\t[root@centos7 ~]# groupadd -g 54322 dba \n\t\t[root@centos7 ~]# groupadd -g 54323 oper \n\t\t[root@centos7 ~]# useradd -u 54321 -g oinstall -G dba,oper oracle \n\t\t[root@centos7 ~]# passwd oracle \n\n\n### 关闭selinux和防火墙:\n\n\n\t\tvim /etc/selinux/config \n\t\tSELINUX=disabled \n\t\t[root@centos7 ~]# systemctl stop firewalld \n\t\t[root@centos7 ~]# systemctl disable firewalld \n\n\n\n### 创建目录:\n\n\n\t\t[root@centos7 ~]# mkdir -p /u01/app/oracle/product/12.2.0.1/db_1 \n\t\t[root@centos7 ~]# \n\t\t[root@centos7 ~]# chown -R oracle:oinstall /u01 \n\t\t[root@centos7 ~]# chmod 775 /u01 \n\n\n\n\n### 配置环境变量:\n\n\n\t\t[root@centos7 ~]# vim /home/oracle/.bash_profile \n\t\t# .bash_profile \n\t\t \n\t\t# Get the aliases and functions \n\t\tif [ -f ~/.bashrc ]; then \n\t\t . ~/.bashrc \n\t\tfi \n\t\t \n\t\t# User specific environment and startup programs \n\t\t \n\t\tPATH=$PATH:$HOME/.local/bin:$HOME/bin \n\t\t \n\t\texport PATH \n\t\t# Oracle Settings \n\t\texport TMP=/tmp \n\t\texport TMPDIR=$TMP \n\t\t \n\t\texport ORACLE_HOSTNAME=centos7 \n\t\texport ORACLE_UNQNAME=cdb \n\t\texport ORACLE_BASE=/u01/app/oracle \n\t\texport ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1 \n\t\texport ORACLE_SID=cdb \n\t\t \n\t\texport PATH=/usr/sbin:$PATH \n\t\texport PATH=$ORACLE_HOME/bin:$PATH \n\t\t \n\t\texport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib \n\t\texport CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib \n\n----\n\n\n## 安装\n\n\n### 编辑应答文件: vi /u01/database/response/db_install.rsp\n\n\n\t\toracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0 \n\t\toracle.install.option=INSTALL_DB_SWONLY \n\t\tUNIX_GROUP_NAME=oinstall \n\t\tINVENTORY_LOCATION=/u01/app/oracle/oraInventory \n\t\tORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1 \n\t\tORACLE_BASE=/u01/app/oracle \n\t\toracle.install.db.InstallEdition=EE \n\t\toracle.install.db.OSDBA_GROUP=dba \n\t\toracle.install.db.OSOPER_GROUP=oper \n\t\toracle.install.db.OSBACKUPDBA_GROUP=dba \n\t\toracle.install.db.OSDGDBA_GROUP=dba \n\t\toracle.install.db.OSKMDBA_GROUP=dba \n\t\toracle.install.db.OSRACDBA_GROUP=dba \n\t\toracle.install.db.config.starterdb.type=GENERAL_PURPOSE \n\t\toracle.install.db.config.starterdb.globalDBName=db1 \n\t\toracle.install.db.config.starterdb.SID=db1 \n\t\toracle.install.db.config.starterdb.characterSet=AL32UTF8 \n\t\tSECURITY_UPDATES_VIA_MYORACLESUPPORT=false \n\t\tDECLINE_SECURITY_UPDATES=true \n\n\n### 开始安装:\n\n\n\t\t[oracle@centos7 database]$ ./runInstaller -force -silent -noconfig -responseFile /u01/database/response/db_install.rsp \n\t\tStarting Oracle Universal Installer... \n\t\t \n\t\tChecking Temp space: must be greater than 500 MB. Actual 11715 MB Passed \n\t\tChecking swap space: must be greater than 150 MB. Actual 2047 MB Passed \n\t\tPreparing to launch Oracle Universal Installer from /tmp/OraInstall2017-04-15_08-36-48PM. P[oracle@centos7 database]$ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base. \n\t\t ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory. \n\t\tYou can find the log of this install session at: \n\t\t /u01/app/oracle/oraInventory/logs/installActions2017-04-15_08-36-48PM.log \n\t\tThe installation of Oracle Database 12c was successful. \n\t\tPlease check '/u01/app/oracle/oraInventory/logs/silentInstall2017-04-15_08-36-48PM.log' for more details. \n\t\t \n\t\tAs a root user, execute the following script(s): \n\t\t 1. /u01/app/oracle/oraInventory/orainstRoot.sh \n\t\t 2. /u01/app/oracle/product/12.2.0.1/db_1/root.sh \n\t\t \n\t\t \n\t\t \n\t\tSuccessfully Setup Software. \n\n\n\n### 安装提示执行两个脚本:\n\n\n\n\t\t[root@centos7 ~]# /u01/app/oracle/oraInventory/orainstRoot.sh \n\t\tChanging permissions of /u01/app/oracle/oraInventory. \n\t\tAdding read,write permissions for group. \n\t\tRemoving read,write,execute permissions for world. \n\t\t \n\t\tChanging groupname of /u01/app/oracle/oraInventory to oinstall. \n\t\tThe execution of the script is complete. \n\t\t[root@centos7 ~]# /u01/app/oracle/product/12.2.0.1/db_1/root.sh \n\t\tCheck /u01/app/oracle/product/12.2.0.1/db_1/install/root_centos7_2018-04-15_22-08-27-846246575.log for the output of root script \n\n\n\n### 配置,添加监听:\n\n\n\n\t\t[oracle@centos7 response]$ cat /home/oracle/database/response/netca.rsp | grep -Ev \"^#|^$\" \n\t\t \n\t\t[GENERAL] \n\t\tRESPONSEFILE_VERSION=\"12.2\" \n\t\tCREATE_TYPE=\"CUSTOM\" \n\t\t[oracle.net.ca] \n\t\tINSTALLED_COMPONENTS={\"server\",\"net8\",\"javavm\"} \n\t\tINSTALL_TYPE=\"\"typical\"\" \n\t\tLISTENER_NUMBER=1 \n\t\tLISTENER_NAMES={\"LISTENER\"} \n\t\tLISTENER_PROTOCOLS={\"TCP;1521\"} \n\t\tLISTENER_START=\"\"LISTENER\"\" \n\t\tNAMING_METHODS={\"TNSNAMES\",\"ONAMES\",\"HOSTNAME\"} \n\t\tNSN_NUMBER=1 \n\t\tNSN_NAMES={\"EXTPROC_CONNECTION_DATA\"} \n\t\tNSN_SERVICE={\"PLSExtProc\"} \n\t\tNSN_PROTOCOLS={\"TCP;HOSTNAME;1521\"} \n\n\t\t[oracle@centos7 response]$ netca -silent -responsefile /u01/database/response/netca.rsp \n\t\t \n\t\tParsing command line arguments: \n\t\t Parameter \"silent\" = true \n\t\t Parameter \"responsefile\" = /u01/database/response/netca.rsp \n\t\tDone parsing command line arguments. \n\t\tOracle Net Services Configuration: \n\t\tProfile configuration complete. \n\t\tOracle Net Listener Startup: \n\t\t Running Listener Control: \n\t\t /u01/app/oracle/product/12.2.0.1/db_1/bin/lsnrctl start LISTENER \n\t\t Listener Control complete. \n\t\t Listener started successfully. \n\t\tListener configuration complete. \n\t\tOracle Net Services configuration successful. The exit code is 0 \n\t\t[oracle@centos7 response]$ lsnrctl status \n\t\t \n\t\tLSNRCTL for Linux: Version 12.2.0.1.0 - Production on 15-APR-2018 22:15:32 \n\t\t \n\t\tCopyright (c) 1991, 2016, Oracle. All rights reserved. \n\t\t \n\t\tConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=centos7)(PORT=1521))) \n\t\tSTATUS of the LISTENER \n\t\t------------------------ \n\t\tAlias LISTENER \n\t\tVersion TNSLSNR for Linux: Version 12.2.0.1.0 - Production \n\t\tStart Date 15-APR-2018 22:10:43 \n\t\tUptime 0 days 0 hr. 0 min. 8 sec \n\t\tTrace Level off \n\t\tSecurity ON: Local OS Authentication \n\t\tSNMP OFF \n\t\tListener Parameter File /u01/app/oracle/product/12.2.0.1/db_1/network/admin/listener.ora \n\t\tListener Log File /u01/app/oracle/diag/tnslsnr/centos7/listener/alert/log.xml \n\t\tListening Endpoints Summary... \n\t\t (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos7)(PORT=1521))) \n\t\t (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) \n\t\tThe listener supports no services \n\t\tThe command completed successfully \n\n\n### 创建数据库,修改相应文件,有些参数有默认值就不需要\n\n\n\t\t[oracle@centos7 response]$ cat /home/oracle/dbca.rsp | grep -Ev '^#|^$' \n\t\tresponseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0 \n\t\tgdbName=db1 \n\t\tsid=db1 \n\t\tdatabaseConfigType=SI \n\t\tRACOneNodeServiceName= \n\t\tpolicyManaged=false \n\t\tcreateServerPool=false \n\t\tserverPoolName= \n\t\tcardinality= \n\t\tforce=false \n\t\tpqPoolName= \n\t\tpqCardinality= \n\t\tcreateAsContainerDatabase=true \n\t\tnumberOfPDBs=1 \n\t\tpdbName=db1pdb \n\t\tuseLocalUndoForPDBs=true \n\t\tpdbAdminPassword= \n\t\tnodelist= \n\t\ttemplateName=/u01/app/oracle/product/12.2.0.1/db_1/assistants/dbca/templates/General_Purpose.dbc \n\t\tsysPassword= \n\t\tsystemPassword= \n\t\tserviceUserPassword= \n\t\temConfiguration= \n\t\temExpressPort=5500 \n\t\trunCVUChecks=false \n\t\tdbsnmpPassword= \n\t\tomsHost= \n\t\tomsPort=0 \n\t\temUser= \n\t\temPassword= \n\t\tdvConfiguration=false \n\t\tdvUserName= \n\t\tdvUserPassword= \n\t\tdvAccountManagerName= \n\t\tdvAccountManagerPassword= \n\t\tolsConfiguration=false \n\t\tdatafileJarLocation={ORACLE_HOME}/assistants/dbca/templates/ \n\t\tdatafileDestination={ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/ \n\t\trecoveryAreaDestination={ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME} \n\t\tstorageType=FS \n\t\tdiskGroupName= \n\t\tasmsnmpPassword= \n\t\trecoveryGroupName= \n\t\tcharacterSet=AL32UTF8 \n\t\tnationalCharacterSet=AL16UTF16 \n\t\tregisterWithDirService=false \n\t\tdirServiceUserName= \n\t\tdirServicePassword= \n\t\twalletPassword= \n\t\tlisteners=LISTENER \n\t\tvariablesFile= \n\t\tvariables=DB_UNIQUE_NAME=db1,ORACLE_BASE=/u01/app/oracle,PDB_NAME=,DB_NAME=db1,ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1,SID=db1 \n\t\tinitParams=undo_tablespace=UNDOTBS1,memory_target=796MB,processes=300,db_recovery_file_dest_size=2780MB,nls_language=AMERICAN,dispatchers=(PROTOCOL=TCP) (SERVICE=db1),db_recovery_file_dest={ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME},db_block_size=8192BYTES,diagnostic_dest={ORACLE_BASE},audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump,nls_territory=AMERICA,local_listener=LISTENER_DB1,compatible=12.2.0,control_files=(\"{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/control01.ctl\", \"{ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME}/control02.ctl\"),db_name=db1,audit_trail=db,remote_login_passwordfile=EXCLUSIVE,open_cursors=300 \n\t\tsampleSchema=false \n\t\tmemoryPercentage=40 \n\t\tdatabaseType=MULTIPURPOSE \n\t\tautomaticMemoryManagement=true \n\t\ttotalMemory=0 \n\n### 创建数据库\n\n\n\n\t\t[oracle@centos7 response]$ dbca -silent -createDatabase -responseFile /home/oracle/dbca.rsp \n\t\t \n\t\t[WARNING] [DBT-06801] Specified Fast Recovery Area size (2,780 MB) is less than the recommended value. \n\t\t CAUSE: Fast Recovery Area size should at least be three times the database size (2,730 MB). \n\t\t ACTION: Specify Fast Recovery Area Size to be at least three times the database size. \n\t\t[WARNING] [DBT-11209] Current available physical memory is less than the required physical memory (796MB) for creating the database. \n\t\tEnter SYS user password: \n\t\t \n\t\tEnter SYSTEM user password: \n\t\t \n\t\tEnter PDBADMIN User Password: \n\t\t \n\t\t[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards. \n\t\t CAUSE: \n\t\ta. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. \n\t\tb.The password entered is a keyword that Oracle does not recommend to be used as password \n\t\t ACTION: Specify a strong password. If required refer Oracle documentation for guidelines. \n\t\t[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards. \n\t\t CAUSE: \n\t\ta. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. \n\t\tb.The password entered is a keyword that Oracle does not recommend to be used as password \n\t\t ACTION: Specify a strong password. If required refer Oracle documentation for guidelines. \n\t\t[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards. \n\t\t CAUSE: \n\t\ta. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. \n\t\tb.The password entered is a keyword that Oracle does not recommend to be used as password \n\t\t ACTION: Specify a strong password. If required refer Oracle documentation for guidelines. \n\t\t[WARNING] [DBT-06801] Specified Fast Recovery Area size (2,780 MB) is less than the recommended value. \n\t\t CAUSE: Fast Recovery Area size should at least be three times the database size (3,571 MB). \n\t\t ACTION: Specify Fast Recovery Area Size to be at least three times the database size. \n\t\tCopying database files \n\t\t1% complete \n\t\t13% complete \n\t\t25% complete \n\t\tCreating and starting Oracle instance \n\t\t26% complete \n\t\t30% complete \n\t\t31% complete \n\t\t35% complete \n\t\t38% complete \n\t\t39% complete \n\t\t41% complete \n\t\tCompleting Database Creation \n\t\t42% complete \n\t\t43% complete \n\t\t44% complete \n\t\t46% complete \n\t\t49% complete \n\t\t50% complete \n\t\tCreating Pluggable Databases \n\t\t55% complete \n\t\t75% complete \n\t\tExecuting Post Configuration Actions \n\t\t100% complete \n\t\tLook at the log file \"/u01/app/oracle/cfgtoollogs/dbca/db1/db1.log\" for further details. \n\n### 查看状态\n\n\n\t\t[oracle@centos7 response]$ sqlplus / as sysdba \n\t\tSQL*Plus: Release 12.2.0.1.0 Production on Sun Apr 15 23:07:08 2018 \n\t\t \n\t\tCopyright (c) 1982, 2016, Oracle. All rights reserved. \n\t\t \n\t\t \n\t\tConnected to: \n\t\tOracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production \n\t\t \n\t\tSQL> select open_mode from v$database; \n\t\t \n\t\tOPEN_MODE \n\t\t-------------------- \n\t\tREAD WRITE \n\t\t \n\t\tSQL> select status from v$instance; \n\t\t \n\t\tSTATUS \n\t\t------------ \n\t\tOPEN \n\n\n","tags":["oracle安装"],"categories":["oracle"]},{"title":"firstArticle","url":"/2018/04/20/firstArticle/","content":"\n### firstArticle\n\n\n\n"}]