Introduction to Oracle installation script code

Source: Internet
Author: User

If you are very depressed about the actual operation steps of the Oracle installation script. You can browse the following article. I found an Oracle installation script on a reputable website, including some preparation activities such as modifying the host name, setting kernel variables, and creating users.

In this way, you don't have to repeat the same job. The following is the script I compiled and the Oracle Installation notes I just installed yesterday. There is no time to test it now ):

The test is complete.

 
 
  1. #!/bin/bash  
  2. # Oracle  
  3. # 2009/03/12 first twtcom  
  4. # set variable  
  5. # Oracle_BASE=/u1  
  6. echo -n "Please enter HOSTNAME(default Oracle):"  
  7. read HOSTNAME  
  8. if [ -z $HOSTNAME ]  
  9. then  
  10. HOSTNAME=Oracle 
  11. fi  
  12. echo -n "Please enter Oracle_BASE(default /u1):"  
  13. read Oracle_BASE  
  14. if [ -z $Oracle_BASE ]  
  15. then  
  16. Oracle_BASE=/u1  
  17. fi  
  18. # Oracle_HOME=$Oracle_BASE/Oracle  
  19. echo -n "Please enter HOME(default Oracle):"  
  20. read HOME  
  21. if [ -z $HOME ]  
  22. then  
  23. HOME=Oracle 
  24. fi  
  25. Oracle_HOME=$Oracle_BASE/$HOME  
  26. # Oracle_SID=oral 
  27. echo -n "Please enter Oracle_SID(default oral):"  
  28. read Oracle_SID  
  29. if [ -z $Oracle_SID ]  
  30. then  
  31. Oracle_SID=oral 
  32. fi  
  33. USER=Oracle 
  34. SYSCTL=/etc/sysctl.conf  
  35. LIMITS=/etc/security/limits.conf  
  36. PAM=/etc/pam.d/login  
  37. PROFILE=/etc/profile  
  38. BASH_PROFILE=$Oracle_HOME/.bash_profile  
  39. IPADDR=`ifconfig eth0|grep "inet addr"
  40. |cut -d : -f 2|cut -d ' ' -f 1`  
  41. HOSTS=/etc/hosts  
  42. NETWORK=/etc/sysconfig/network  
  43. # hostname  
  44. grep -v "HOSTNAME" $NETWORK > $NETWORK  
  45. echo "HOSTNAME=$HOSTNAME" >> $NETWORK  
  46. echo "$IPADDR $HOSTNAME">> $HOSTS  
  47. # useradd  
  48. mkdir -p $Oracle_BASE  
  49. groupadd oinstall  
  50. groupadd dba  
  51. useradd -g oinstall -G dba -d $Oracle_HOME $USER  
  52. chown -R $USER:oinstall $Oracle_BASE  
  53. cat >> $SYSCTL << EOF 
  54. kernel.shmall = 2097152 
  55. kernel.shmmax = 2147483648 
  56. kernel.shmmni = 4096 
  57. kernel.sem = 250 32000 100 128  
  58. net.ipv4.ip_local_port_range = 1024 65000  
  59. net.core.rmem_default = 262144 
  60. net.core.rmem_max = 4194304 
  61. net.core.wmem_default = 262144 
  62. net.core.wmem_max = 262144 
  63. EOF  
  64. cat >> $LIMITS <<EOF 
  65. Oracle soft nproc 2047  
  66. Oracle hard nproc 16384  
  67. Oracle soft nofile 1024  
  68. Oracle hard nofile 65536  
  69. EOF  
  70. cat >> $PAM <<EOF 
  71. session required pam_limits.so  

The above content is a description of the Oracle installation script, hoping to help you in this regard.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.