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 code-server-create.sh
  2. +9 −0 db-server-create.sh
  3. +5 −0 web-server-create.sh
View
8 code-server-create.sh
@@ -0,0 +1,8 @@
+./create-new-domain.sh codeserver
+#Install GIT
+ssh -t ubuntu@codeserver. sudo apt-get install git-core -y
+#Configure GIT
+ssh -t ubuntu@codeserver. git config --global user.name "<your-name-here>"
+ssh -t ubuntu@codeserver. git config --global user.email "<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"
View
9 db-server-create.sh
@@ -0,0 +1,9 @@
+./create-new-domain.sh 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= 0.0.0.0/g' > /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"
View
5 web-server-create.sh
@@ -0,0 +1,5 @@
+./create-new-domain.sh 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.