Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robbiegod/e27f46b5e884be92be4f to your computer and use it in GitHub Desktop.
Save robbiegod/e27f46b5e884be92be4f to your computer and use it in GitHub Desktop.

Mediatemple DV Hosting

TO DO LIST

  1. Enable root permission (BEWARE: there is no going back; only do this if you need complete control over the server)
  2. Install Developer Tools (this setting is located in the same section where you setup root access)
  3. Setup root password.
  4. Setup a domain or subdomain.
  5. Add a new ftp user and set "Access to the server over SSH" to "/bin/bash" (this will let you use putty and command line)

How to install PIP using yum

  1. Login to the server using Putty (I setup a profile and save the server settings)
  2. Login as root and enter password created above.
  3. Run this command: "yum -y install python-pip"
  4. Once installed you can now install packages via pip on command line.

How to install Git using yum

  1. run this command: "yum install git"

Creating a workflow using Github & FTPloy w/ Mediatemple DV Hosting and Rackspace Cloud Sites

Github Setup
  1. Create a new private repo.
  2. Create a new branch and call it "staging" or "development" or "dev". I used "staging"
  3. Click Settings -> Branches. Make the "staging" branch the default branch. Make staging branch "protected" (still testing this. I'm new to this feature)
Server Setup
  1. Add a new site to your webhost (I use Mediatemple and Rackspace Cloud Sites)
  2. Add new subdomain for your website called "staging" (ex: staging.yourwebsite.com)
  3. Add a new ftp user to your subdomain and to your live site. Save these details, you'll need them later. It can be the same ftp account, just make sure that it has access to both websites. At mediatemple, it should be easy enough because subdomains are added below the main site in ftp. Just note the path.
Register at FTPloy.com

This service will allow you to automatically update your server code from github.com when a merge happens on the specified branch. After you register with the website, you'll have to walkthrough the steps. You'll connect the website to your Github account, you'll add a server, and create a project to link them all together. I setup two projects and two servers for each website. One is for staging and the other is to deploy to the live site. Follow below:

Add a new server (FTPloy)
  1. Login and choose Servers -> New Server. Call this one staging.yourdomainname.com (the site we setup before)
  2. Enter in a host, user, pass and port. Test the connection.
  3. If it passes, click Save Server.
  4. That adds that server to your account.
Add a new project (FTPloy)
  1. Choose Projects -> New Project and fill out the form.
  2. Choose the repository.
  3. Enter a Project Name. Lets call this one "staging.yourdomainname.com".
  4. Choose the "staging" branch. You'll see all current branches listed in the list.
  5. Leave the "deploy from the following directory only" empty, unless you have code in a certain folder, then you'll need to specify the folder here.
  6. Choose the Server from the drop down menu.
  7. Enter the server path. (ex: For mediatemple, I used "/httpdocs/" for my main website as the path. The staging server will have a path like /staging.yourdomainname.com/)
  8. I left the Pre-deployment Hook and Post-deployment Hook fields empty.

Install postgreSQL

yum install postgresql postgresql-server

service postgresql initdb

/etc/init.d/postgresql start

See this page: https://mediatemple.net/community/products/dv/204404394/how-do-i-install-postgresql-on-my-server

Install Ruby RVM and Ruby v2.1.8

http://joshuapaling.com/blog/2013/08/07/how-to-install-rails-media-temple-dv.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment