nodetx

Centos 6.3 Installation Script ver 1

Nov 24th, 2012
558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.61 KB | None | 0 0
  1. # Download and create installation DVD at http://mirrors.arsc.edu/centos/6.3/isos/x86_64/CentOS-6.3-x86_64-LiveDVD.iso
  2. # Install to bare metal with default options
  3. # Log in and set up static IP address. Enable and start SSHd service. Specify system hostname in hosts file. Run yum update.
  4. # http://incubator.apache.org/cloudstack/docs/en-US/Apache_CloudStack/4.0.0-incubating/html/Installation_Guide/management-server-install-flow.html
  5. # This sequence of commands should not allow you to log into the cloudstack UI with admin and password after completing the installation.
  6.  
  7. # http://incubator.apache.org/cloudstack/docs/en-US/Apache_CloudStack/4.0.0-incubating/html/Installation_Guide/management-server-install-flow.html
  8.  
  9. # Information about my install
  10. $ uname -a
  11. Linux nodedev4.node.local 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
  12.  
  13. $ cat /proc/version
  14. Linux version 2.6.32-279.14.1.el6.x86_64 ([email protected]) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Tue Nov 6 23:43:09 UTC 2012
  15.  
  16. $ lsb_release -a
  17. LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
  18. Distributor ID: CentOS
  19. Description: CentOS release 6.3 (Final)
  20. Release: 6.3
  21. Codename: Final
  22.  
  23. $ cat /etc/yum.repos.d/CentOS-Base.repo
  24. [cloudstack]
  25. name=cloudstack
  26. baseurl=http://cloudstack.apt-get.eu/rhel/4.0/
  27. enabled=1
  28. gpgcheck=1
  29.  
  30. $ yum update
  31.  
  32. # 4.5.2. Prepare the Operating System
  33. $ hostname --fqdn
  34. $ cat /etc/hosts
  35.  
  36. $ ping www.google.com
  37.  
  38. $ yum install ntp
  39.  
  40. # 4.5.3.1. Downloading vhd-util
  41. $ cd /usr/lib64
  42. $ mkdir cloud
  43. $ cd cloud
  44. $ mkdir common
  45. $ cd common
  46. $ mkdir scripts
  47. $ cd scripts
  48. $ mkdir vm
  49. $ cd vm
  50. $ mkdir hypervisor
  51. $ cd hypvervisor
  52. $ mkdir xenserver
  53. $ cd xenserver
  54. $ wget http://download.cloud.com.s3.amazonaws.com/tools/vhd-util
  55.  
  56. # 4.5.3.2. Install on CentOS/RHEL
  57. $ yum install cloud-client --nogpgcheck
  58.  
  59. # 4.5.4.1. Install the Database on the Management Server Node
  60. $ yum install mysql-server
  61.  
  62. $ vim /etc/my.cnf
  63.  
  64. innodb_rollback_on_timeout=1
  65. innodb_lock_wait_timeout=600
  66. max_connections=350
  67. log-bin=mysql-bin
  68. binlog-format = 'ROW'
  69.  
  70. $ vim /etc/selinux/config
  71. permissive
  72.  
  73. $ reboot
  74.  
  75. $ service mysqld start
  76. $ mysql_secure_installation
  77. $ cloud-setup-databases cloud:cloud@localhost --deploy-as=root:12345
  78. $ mysql -u root -p
  79. GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY '12345';
  80.  
  81. # 4.5.5.2. Using the Management Server As the NFS Server
  82. $ mkdir -p /export/primary
  83. $ mkdir -p /export/secondary
  84.  
  85. $ vim /etc/exports
  86.  
  87. /export *(rw,async,no_root_squash)
  88.  
  89. $ exportfs -a
  90.  
  91. $ vim /etc/sysconfig/nfs
  92.  
  93. RQUOTAD_PORT=875
  94. LOCKD_TCPPORT=32803
  95. LOCKD_UDPPORT=32769
  96. MOUNTD_PORT=892
  97. STATD_PORT=662
  98. STATD_OUTGOING_PORT=2020
  99.  
  100. $ vim /etc/sysconfig/iptables
  101.  
  102. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p udp --dport 111 -j ACCEPT
  103. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p tcp --dport 111 -j ACCEPT
  104. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p tcp --dport 2049 -j ACCEPT
  105. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p tcp --dport 32803 -j ACCEPT
  106. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p udp --dport 32769 -j ACCEPT
  107. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p tcp --dport 892 -j ACCEPT
  108. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p udp --dport 892 -j ACCEPT
  109. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p tcp --dport 875 -j ACCEPT
  110. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p udp --dport 875 -j ACCEPT
  111. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p tcp --dport 662 -j ACCEPT
  112. -A INPUT -s 192.168.2.0/24 -m state --state NEW -p udp --dport 662 -j ACCEPT
  113.  
  114. $ service iptables restart
  115. $ service iptables save
  116.  
  117. $ vim /etc/idmapd.conf
  118. domain =
  119.  
  120. $ service rpcbind start
  121. $ service nfs start
  122. $ chkconfig nfs on
  123. $ chkconfig rpcbind on
  124.  
  125. $ reboot
  126.  
  127. $ service start tomcat6
  128. $ service start mysqld
  129. $ service nfs start
  130. $ service rpcbind start
  131. $ chkconfig nfs on
  132. $ chkconfig rpcbind on
  133.  
  134. $ mkdir /primarymount
  135. $ mount -t nfs localhost:/export/primary /primarymount
  136. $ mkdir /secondarymount
  137. $ mount -t nfs localhost:/export/secondary /secondarymount
  138.  
  139. # 4.5.7. Prepare the System VM Template
  140. $ /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /secondarymount -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2 -h xenserver -F
  141.  
  142. $ reboot
  143.  
  144. # 5.1. Log In to the UI
  145. $ service rpcbind start
  146. $ service nfs start
  147. $ service mysqld start
  148. $ service tomcat6 start
  149. $ cloud-setup-management
  150.  
  151. # HTTP://192.168.2.220:8080/client
  152. # username: admin
  153. # password: password
Advertisement
Add Comment
Please, Sign In to add comment