91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

rhel6.4 自動安裝oracle 11g客戶端

發布時間:2020-08-09 19:26:32 來源:ITPUB博客 閱讀:147 作者:a635186971 欄目:關系型數據庫

1、安裝過程

點擊(此處)折疊或打開

  1. [root@localhost ~]# cd /tmp/client/
  2. [root@localhost client]# ll
  3. total 640676
  4. -rw-r--r--. 1 root root 5554 Dec 13 16:24 auto_install_oracle_client.sh #主腳本
  5. -rw-r--r--. 1 root root 12062 Dec 13 16:24 client_install.rsp #靜默安裝配置文件
  6. -rw-r--r--. 1 root root 656026876 Dec 13 16:22 p13390677_112040_Linux-x86-64_4of7.zip #安裝包
  7. [root@localhost client]# chmod u+x auto_install_oracle_client.sh #賦權
  8. [root@localhost client]# ./auto_install_oracle_client.sh #在文件所在路徑使用root用戶執行
  9. tmp is.................................................... [ok] #檢查/tmp目錄,需要大于120 MB
  10. swap is.................................................... [ok] #檢查swap空間,需要大于150 MB
  11. finding sqlplus #通過find查找sqlplus,此處需要等待
  12. env is.................................................... [ok] #環境ok
  13. pkg is.................................................... [ok] #安裝包ok
  14. rsp is.................................................... [ok] #靜默安裝配置文件ok
  15. please input which user to install oracle client:oracle #可以是已經存在的用戶,也可以是新用戶
  16. please input ip addr:192.168.1.222 #輸入該系統ip地址
  17. unziping p13390677_112040_Linux-x86-64_4of7.zip #正在解壓安裝包,此處需要等待
  18. starting install,may be take a minutes,you can see log:/tmp/install_client.log #需要等待
  19. starting orainstRoot.sh,you can see /tmp/orainstRoot.sh.log
  20. The execution of the script is complete.
  21. #######################################################################
  22. #########please use root to run /tmp/del_client.sh to deinstall####### #卸載腳本
  23. #########dba oinstall oracle need your check################### #若需要,用戶和組需手動刪除
  24. #######################################################################
2、驗證過程

點擊(此處)折疊或打開

  1. [root@localhost client]# su - oracle
  2. [oracle@localhost ~]$ cd $ORACLE_HOME/network/admin/
  3. [oracle@localhost admin]$ vi tnsnames.ora
  4. [oracle@localhost admin]$ cat tnsnames.ora
  5. ORCL =
  6.     (DESCRIPTION =
  7.         (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.42)(PORT = 1521))
  8.         (CONNECT_DATA =
  9.             (SERVER = DEDICATED)
  10.             (SERVICE_NAME = orcl)
  11.         )
  12.      )
  13. [oracle@localhost admin]$ sqlplus scott/tiger@orcl
  14. SQL>
3、卸載過程(需根據實際需求手動刪除用戶組和用戶)

點擊(此處)折疊或打開

  1. [root@localhost client]# /tmp/del_client.sh
  2. [root@localhost client]# su - oracle
  3. [oracle@localhost ~]$ sqlplus
  4. -bash: sqlplus: command not found

auto_install_oracle_client.sh的內容:

點擊(此處)折疊或打開

  1. #!/bin/bash
  2. #檢查/tmp空間
  3. if [ `df -m /tmp|wc -l` -eq 2 ];then
  4.     tmp=`df -m /tmp|tail -1|awk '{print $4}'`
  5. else
  6.     tmp=`df -m /tmp|tail -1|awk '{print $3}'`
  7. fi
  8. if [ $tmp -gt 120 ];then
  9.     echo "tmp is.................................................... [ok]"
  10. else
  11.     echo "[fail]====>/tmp must more than 120MB"
  12. exit 5
  13. fi
  14. #檢查swap空間
  15. if [ `free -m|grep Swap|awk '{print $2}'` -gt 150 ];then
  16.     echo "swap is.................................................... [ok]"
  17. else
  18.     echo "[fail]====>swap must more than 150MB"
  19. exit 5
  20. fi
  21. #檢查該主機是否已經安裝了sqlplus
  22. echo "finding sqlplus"
  23. if [ `find / -name "sqlplus"|grep sqlplus|wc -l` -gt 0 ]
  24. then
  25.     echo "this system has installed oracle client.install process exit!"
  26.     echo "install process stop!"
  27.     exit 0
  28. else
  29.     echo "env is.................................................... [ok]"
  30. fi
  31. #檢查客戶端安裝包是否已經上傳
  32. LOCALDIR=`pwd`
  33. if [ `ls -l $LOCALDIR|grep "p13390677_112040_Linux-x86-64_4of7.zip" |wc -l` -gt 0 ]
  34. then
  35.     echo "pkg is.................................................... [ok]"
  36. else
  37.     echo "please upload p13390677_112040_Linux-x86-64_4of7.zip in $LOCALDIR"
  38.     echo "install process stop!"
  39.     exit 0
  40. fi
  41. #檢查配置文件是否已經上傳
  42. LOCALDIR=`pwd`
  43. if [ `ls -l $LOCALDIR|grep client_install.rsp|wc -l` -gt 0 ]
  44. then
  45.     echo "rsp is.................................................... [ok]"
  46. else
  47.     echo "please upload client_install.rsp in $LOCALDIR"
  48.     echo "install process stop!"
  49.     exit 0
  50. fi
  51. #獲取用戶名、ORACLE_BASE、ip地址信息
  52. echo -e "please input which user to install oracle client:\c"
  53. read USERNAME
  54. ORACLE_BASE=/home/$USERNAME/oracle_client
  55. echo -e "please input ip addr:\c"
  56. read ip_addr
  57. #備份和修改/etc/hosts文件
  58. cp /etc/hosts /etc/hosts_lihbbak
  59. echo "$ip_addr `hostname`">>/etc/hosts
  60. #備份oraInst.loc文件
  61. mv -f /etc/oraInst.loc /etc/oraInst.loc_lihbbak >/dev/null 2>&1
  62. #創建dba、oinstall用戶組,創建用戶
  63. /usr/sbin/groupadd dba >/dev/null 2>&1
  64. /usr/sbin/groupadd oinstall >/dev/null 2>&1
  65. /usr/sbin/useradd -m -g oinstall -G dba $USERNAME >/dev/null 2>&1
  66. #創建目錄并附權
  67. mkdir -p $ORACLE_BASE >/dev/null 2>&1
  68. cd $ORACLE_BASE
  69. mkdir oraInventory
  70. chown -R $USERNAME:oinstall $ORACLE_BASE
  71. #解壓安裝包并附權
  72. echo "unziping p13390677_112040_Linux-x86-64_4of7.zip"
  73. cd $LOCALDIR
  74. /usr/bin/unzip p13390677_112040_Linux-x86-64_4of7.zip >/dev/null 2>&1
  75. chown -R $USERNAME:oinstall client
  76. chown $USERNAME:oinstall client_install.rsp
  77. #備份并修改配置文件
  78. cp client_install.rsp client_install.rsp_lihbbak
  79. sed -i "s|/u01/app|$ORACLE_BASE|g" client_install.rsp
  80. #配置用戶環境并安裝軟件
  81. echo "starting install,may be take a minutes,you can see log:/tmp/install_client.log"
  82. su - $USERNAME </tmp/install_client.log
  83.     echo "export ORACLE_BASE=$ORACLE_BASE" >>/home/$USERNAME/.bash_profile
  84.     echo "export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0.4/client_1" >>/home/$USERNAME/.bash_profile
  85.     echo 'export PATH=\$ORACLE_HOME/bin:\$PATH' >>/home/$USERNAME/.bash_profile
  86.     echo 'export LD_LIBRARY_PATH=$ORACLE_BASE/oracle/product/11.2.0.4/client_1/lib' >>/home/$USERNAME/.bash_profile
  87.     source ~/.bash_profile >/dev/null 2>&1
  88.     cd $LOCALDIR/client
  89.     ./runInstaller -silent -showProgress -ignorePrereq -waitforcompletion -responseFile $LOCALDIR/client_install.rsp
  90. EOF
  91. #執行root.sh腳本
  92. sleep 2s
  93. echo "starting orainstRoot.sh,you can see /tmp/orainstRoot.sh.log"
  94. $ORACLE_BASE/oraInventory/orainstRoot.sh >/tmp/orainstRoot.sh.log 2>&1
  95. tail -1 /tmp/orainstRoot.sh.log
  96. #修改ORACLE_HOME/bin的權限
  97. chmod 755 $ORACLE_BASE/oracle/product/11.2.0.4/client_1/bin/*
  98. #配置tnsnames.ora文件用于測試
  99. su - $USERNAME </dev/null
  100.     source ~/.bash_profile
  101.     cd $ORACLE_BASE/oracle/product/11.2.0.4/client_1/network/admin
  102.     touch tnsnames.ora
  103.     echo 'ORATEST1 ='>>tnsnames.ora
  104.     echo ' (DESCRIPTION = ' >>tnsnames.ora
  105.     echo ' (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.75.249)(PORT = 1521)) ' >>tnsnames.ora
  106.     echo ' (CONNECT_DATA = ' >>tnsnames.ora
  107.     echo ' (SERVER = DEDICATED) ' >>tnsnames.ora
  108.     echo ' (SERVICE_NAME = oratest1) ' >>tnsnames.ora
  109.     echo ' ) ' >>tnsnames.ora
  110.     echo ' ) ' >>tnsnames.ora
  111. EOF
  112. #生成卸載腳本
  113. touch /tmp/del_client.sh >/dev/null 2>&1
  114. echo "#!/bin/bash" >/tmp/del_client.sh
  115. echo "cd $LOCALDIR" >>/tmp/del_client.sh
  116. echo 'rm -rf client' >>/tmp/del_client.sh
  117. echo 'mv -f /etc/hosts_lihbbak /etc/hosts >/dev/null 2>&1' >>/tmp/del_client.sh
  118. echo 'mv -f client_install.rsp_lihbbak client_install.rsp >/dev/null 2>&1' >>/tmp/del_client.sh
  119. echo "rm -rf $ORACLE_BASE" >>/tmp/del_client.sh
  120. echo "mv -f /etc/oraInst.loc_lihbbak /etc/oraInst.loc >/dev/null 2>&1 " >>/tmp/del_client.sh
  121. chmod u+x /tmp/del_client.sh
  122. echo '#########################################################################'
  123. echo '###########please use root to run /tmp/del_client.sh to deinstall#######'
  124. echo "###########dba oinstall $USERNAME need your check################"
  125. echo '#########################################################################'
client_install.rsp 的內容:

點擊(此處)折疊或打開

  1. [root@localhost client]# cat client_install.rsp |grep -v ^# |grep -v ^$
  2. oracle.install.responseFileVersion=/oracle/install/rspfmt_clientinstall_response_schema_v11_2_0
  3. ORACLE_HOSTNAME=
  4. UNIX_GROUP_NAME=oinstall
  5. INVENTORY_LOCATION=/u01/app/oraInventory
  6. SELECTED_LANGUAGES=en
  7. ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/client_1
  8. ORACLE_BASE=/u01/app/oracle
  9. oracle.install.client.installType=Administrator
  10. oracle.install.client.upgrading=false
  11. oracle.install.client.customComponents="oracle.sqlj:11.2.0.4.0","oracle.rdbms.util:11.2.0.4.0","oracle.javavm.client:11.2.0.4.0","oracle.sqlplus:11.2.0.4.0","oracle.dbjava.jdbc:11.2.0.4.0","oracle.ldap.client:11.2.0.4.0","oracle.rdbms.oci:11.2.0.4.0","oracle.precomp:11.2.0.4.0","oracle.xdk:11.2.0.4.0","oracle.network.aso:11.2.0.4.0","oracle.assistants.oemlt:11.2.0.4.0","oracle.oraolap.mgmt:11.2.0.4.0","oracle.network.client:11.2.0.4.0","oracle.network.cman:11.2.0.4.0","oracle.network.listener:11.2.0.4.0","oracle.ordim.client:11.2.0.4.0","oracle.odbc:11.2.0.4.0","oracle.has.client:11.2.0.4.0","oracle.dbdev:11.2.0.4.0","oracle.rdbms.scheduler:11.2.0.4.0"
  12. oracle.install.client.schedulerAgentHostName=
  13. oracle.install.client.schedulerAgentPortNumber=
  14. oracle.installer.autoupdates.option=SKIP_UPDATES
  15. oracle.installer.autoupdates.downloadUpdatesLoc=
  16. AUTOUPDATES_MYORACLESUPPORT_USERNAME=
  17. AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
  18. PROXY_HOST=
  19. PROXY_PORT=
  20. PROXY_USER=
  21. PROXY_PWD=
  22. PROXY_REALM=






向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

镇雄县| 南充市| 东阿县| 大洼县| 绥化市| 泗阳县| 巨鹿县| 东乌珠穆沁旗| 和静县| 昌图县| 达孜县| 乌什县| 米易县| 探索| 县级市| 长丰县| 礼泉县| 通州市| 定日县| 苏尼特左旗| 扎囊县| 英吉沙县| 巴彦淖尔市| 东源县| 太白县| 河池市| 石楼县| 土默特左旗| 湛江市| 威远县| 乐安县| 阜宁县| 彭阳县| 阆中市| 奉化市| 湘西| 舟曲县| 信阳市| 明光市| 灵山县| 临海市|