I recently acquired a personal development machine which will be used mostly for web development. I have installed Ubuntu Server Edition on it with LAMP stack and OpenSsh so far. I can SSH into it. Please remember that I will not be logging into this machine via GUI.

I do need to know a few specifics though:

  1. I want to know what are the steps I need to take from here or what do you think I should do. Any word of advice?

  2. What can I do to take an incremental backup of this server to save my code etc.? I have an external hard drive and a Dreamhost account and would like to backup to both.

  3. Since I will only be logging in via SSH, what is the best way to do a file transfer between my macbook and this box? SCP or SFTP?

  4. I want to install git or svn server on it and check in the code from my macbook. is that a good strategy? I was wondering how can I checkin code to that box's Git server and have the webserver serve it at the same time. Would I have to move the checked-in code to the web root everytime?

I apologize if this sounds very easy or stupid. I am a new person.

Thanks a lot.

link|improve this question

62% accept rate
1  
Maybe I should break this question into multiple small ones. – sabertooth Aug 6 '10 at 3:30
feedback

migrated from serverfault.com Aug 6 '10 at 11:00

This question came from our site for system administrators and desktop support professionals.

3 Answers

up vote 1 down vote accepted
  1. Get comfortable with aptitude. You will likely have to install further packages for php/perl/ruby/etc for web dev.
  2. For a dev box, you'll find a lot of tutorials out there recommend setups that are for production. These are for security purposes and can make development harder. I would say a lot of these things can be avoided on a dev box as long as it's on your own network and you're the only one that uses it. Example, no reason to password protect phpMyAdmin if you're using it.
  3. For backup, definitely rsync or rdiff-backup. It looks like Dreamhost does support rsync. For MySQL backups, I use & swear by AutoMySQLBackup.
  4. I strongly recommend Transmit for SFTP & much more. It is worth the $40. If you don't want to pay, use Cyberduck.
  5. What I usually do is keep the SVN or GIT repo in it's normal place then have some kind of hook that will checkout the code to the webserver root every time you commit a change.

** Edit **

Also, I used to do this myself... I had a separate dev box in my office. Now I just use MAMP on my laptop. It's easier and goes with me everywhere I go, and I have Crashplan backing up my work to their servers. Example, what if I want to go to Starbucks and work a little? Unless I have some sort of VPN into my office or home, that's not going to work. Even with VPN, it's a pain. I've found MAMP to be invaluable for basic development purposes, though I do realize there are a lot of scenarios where it is not ideal. I guess that's up to you.

link|improve this answer
I believe if I use Git or SVN to check in my code from Macbook to the dev server, then I might not need a lot of SFTPing into it. Moreover, I will have to expose the /var/www/ for sftp. right? – sabertooth Aug 6 '10 at 14:17
1  
Right, though I'm not that familiar with Git. I do know you can set up an SVN server that supports authentication and checkin/out directly over SVN. Though the SVN server uses a database type of file structure so the repo itself wouldn't be readable by a web server. That's why you'll have to look into hooks. Also, SSH/SCP/SFTP expose the entire filesystem unless you set up a chroot jail, which you probably don't want to do. – churnd Aug 6 '10 at 16:49
Thanks a lot. I really appreciate your help. – sabertooth Aug 6 '10 at 17:21
feedback
  1. Install development software?
  2. Tar, cpio, rsync, commercial software, etc.
  3. Lots of people use SFTP, it'd be my choice.
  4. Instructions for installing and configuring GIT.
link|improve this answer
2  
For #2, I'd recommend rdiff-backup. – Ryan Aug 6 '10 at 5:08
feedback

I guess it depends on what you want to use it for.

For example if you want it as a test environment for a website, then you should install all the software needed to run the website (apache, any apache modules, maybe mysql) then you should look into deployment frameworks to push your code there. Ive use Fabric before to do this and its quite nice.

In terms of moving data around, on OS X grab a program called Fugu and then you can use the ssh connection to connect just like an FTP client, except safer and you dont have to setup an ftp server.

Other than that your gonna have to be more specific with what you want to do with your "Personal Developement Server"

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.