Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to setup a development server at work that will ideally be able to test drive a couple of projects in PHP, Rails, or Django (not always running at the same time). I develop the apps locally on a Mac and then I'll put the projects up on this server for testing with my actual users (non-techies) before deploying to a production server.

My problem is that we have a very poor internet connection (almost negligible) at work and doing the usual apt-get/yum/ports (make, clean, install) processes for setting up servers always get their packages from online repositories somewhere. I know I could probably download the source and then compile them myself but that's going to be too much of a hassle for me.

I'm thinking about two solutions:

Plan A:

Run a server VM on my Mac and then use this VM as the source repository for the offline server. I've read about Ubuntu's apt-proxy and it seems to be good enough though I haven't tried it yet.

I'm not sure if this is possible but can I simply do apt-get install nginx --downloadonly so that the package and its dependencies will be downloaded into my VM and my server can use the VM as the source repo for apt-get?

Plan B:

Run a server VM on my Mac (which I can setup/update easily when I'm home) and then clone the VM to the offline development server. Maybe I should simply make the server a VM host so I can simply copy the VM over.

I think this is okay for the first-time setup but subsequent updates will take too long (cloning the VM image).

If I was working on Windows, I imagine it'd be easier because most services have an installer file that I can download and then run at the server.

If you could suggest another way, it would be much appreciated.

Update:

From Michael Hampton's answer, I found a possible solution which is apt-cacher.

I also found this page on Ubuntu's website.

I wonder if there is a better tool than this one.

share|improve this question
add comment

4 Answers 4

Consider using apt-mirror to create a local mirror.

share|improve this answer
    
Apt-mirror requires 15GB for the entire repository. I don't need to mirror the entire repository. Thanks for the link though. It pointed me to apt-cacher. –  dashmug Oct 23 '12 at 21:07
    
What else are you doing with that 3TB drive? :) –  Michael Hampton Oct 23 '12 at 21:08
    
I didn't mention anything about a 3TB drive. That server is simply a re-purposed i7 Desktop with 4GB Ram and 500GB HD. Not really an ideal server but I'll make do with it. –  dashmug Oct 23 '12 at 21:12
add comment

You could look into apt-offline(see debian-administration.org) ...

share|improve this answer
add comment

I'm running small Ubuntu devel virtual on VMware Fusion. 4GB disk and 512MB RAM is enough for development. Network of VM is in NAT mode, so I can access it even when not on Internet. I also configured AFPd so I can edit files directly mounting share. As far as I'm doing Django only that way setup is as following... Django app running under some user account I created, that user homedir is also a virtualenv root (loaded on login), I use that user to login to AFP. When new project I just clone template machine and create new user account + virtualenv. Installing to VMware Ubuntu chooses kernel that holds main virtualisation abilities... thus XEN, KVM, VMware. Deploymnet should then be DevOps way... just copying VM files to cloud and starting it online (maybe conversion of disk file or its growing to production size).

share|improve this answer
add comment

I use apt-cacher for a private cloud and just use the defaults and it just works. I'm a big fan. You'll have to update your sources.list unless they are installed using the location of your apt-cacher.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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