Welcome! Log In Create A New Profile

Advanced

Automated Server Setup - My Scripts

Posted by PicklePumpers 
Automated Server Setup - My Scripts
September 10, 2010 09:35AM
What's it do?
Automatically sets up a LAMP type sever using Nginx, SQLite3, Ruby Enterprise Edition 1.8.7, and Rails 2.3.9. I didn't need PHP in this install so it is lacking the P in LAMP.

Who's it for?
Mostly it's for Ruby on Rails developers that want a lightweight virtual server to test on. You can run this in 256MB no problem.
I actually use this setup for a tiny website that gets over a million hits every billion years or so, roughly. I'd have to check my logs...

Description:
When setting up a base system for development I take notes and make scripts so I can install up to the point right before I messed up. This happens often, doh! So to save myself some grief I use some simple scripts to install each major item. If I figure out later I should have done something differently I can backup to whatever step and add a new step or change a step.

This isn't meant as a framework for installs but is more like my notes as I'm doing an install. It's very brittle and I wouldn't try maintaining it. Anytime I need a new install I just follow the basics and update any scripts that need it.

This setup relies heavily on the BrightBox (http://www.brightbox.co.uk/) repositories for Ubuntu installs so I give much thanks to them.

Why do I care?
If you're setting up a server it can save you hours of fiddling and mucking about trying to find the exact right combination and order of installation up a server.
For instance the first time I setup the server I got to the very last step, setting up Passenger, and it said it needed to recompile the Nginx server. Argh!
And of course that totally hosed my install. Using these scripts I was able to remove the Nginx step from the beginning and let Passenger install it.

Requirements:
Ubuntu 10.04 Server. (Base install with no extras except SSH)
SSH server
ssh-copy-id script ()

This script assumes:
You have root access and can connect to the server using SSH.
You are running the script from an OS X machine.
(It probably works fine on other Unix type systems but I use Macs for development so...)

This script installs:

From the apt-get repository:
gcc g++ build-essential libssl-dev libreadline5-dev
zlib1g-dev linux-headers libpcre3 libpcre3-dev zlib1g
openssl openssl-devel

Nginx 7.64
SQLite3 3.7.2
RubyEE 1.8.7
RubyGems 1.3.7
Rails 2.3.9
Passenger 2.2.15

Instructions:
Extract to your computer, not the server, your computer.
(The whole point is you don't have to do anything to the server except install the OS.)

Open a shell and change into the directory you unzipped this package to

Make the setup and helper scripts executable: $ sudo chmod 700 *
Run the setup script: $ setup

When prompted enter the IP address of the server to setup. Or you can edit the script.
If prompted enter your local user password to make the ssh-copy-id script executable (if you ignored the above step to chmod).
When prompted for a password next enter the password for the root user on the remote system.

That's it.
Attachments:
open | download - Ubutu Nginx SQLite3 RubyEE Rails239 Passenger.zip (116.2 KB)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 287
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready