Skip to content
Browse files

Adding code, web and db server creation scripts

  • Loading branch information...
1 parent 4c73c65 commit 62c054d94c2e975abb571a71d68800abe2947333 @buzypi committed Jul 8, 2011
Showing with 22 additions and 0 deletions.
  1. +8 −0
  2. +9 −0
  3. +5 −0
@@ -0,0 +1,8 @@
+./ codeserver
+#Install GIT
+ssh -t ubuntu@codeserver. sudo apt-get install git-core -y
+#Configure GIT
+ssh -t ubuntu@codeserver. git config --global "<your-name-here>"
+ssh -t ubuntu@codeserver. git config --global "<your-email-here>"
+ssh -t ubuntu@codeserver. mkdir git-data
+ssh -t ubuntu@codeserver. "cd git-data;git init;git config --bool core.bare true"
@@ -0,0 +1,9 @@
+./ dbserver
+#Install MySQL server
+ssh -t ubuntu@dbserver. sudo apt-get install mysql-server -y
+#Allowing external connections
+ssh -t ubuntu@dbserver. "cat /etc/mysql/my.cnf | sed 's/^bind-address.*/bind-address\t\t=' > /tmp/my.cnf"
+ssh -t ubuntu@dbserver. "sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bk"
+ssh -t ubuntu@dbserver. "sudo mv /tmp/my.cnf /etc/mysql/my.cnf"
+#Restart MySQL
+ssh -t ubuntu@dbserver. "sudo service mysql restart"
@@ -0,0 +1,5 @@
+./ webserver
+#Install Apache and PHP libs
+ssh -t ubuntu@webserver. sudo apt-get install apache2 php5-mysql libapache2-mod-php5 git-core -y
+#Restart Apache
+ssh -t ubuntu@webserver. sudo /etc/init.d/apache2 restart

0 comments on commit 62c054d

Please sign in to comment.
Something went wrong with that request. Please try again.