Skip to content

Instantly share code, notes, and snippets.

@charliepark
Created October 2, 2009 19:30
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 charliepark/200031 to your computer and use it in GitHub Desktop.
Save charliepark/200031 to your computer and use it in GitHub Desktop.
FOLLOW THESE TUTORIALS:
SET UP UBUNTU
1. http://articles.slicehost.com/2008/11/28/ubuntu-intrepid-setup-page-1
2. http://articles.slicehost.com/2008/11/28/ubuntu-intrepid-setup-page-2
SET UP RUBY / RAILS
3. http://articles.slicehost.com/2009/1/6/ubuntu-intrepid-ruby-on-rails
SET UP APACHE
4. http://articles.slicehost.com/2008/12/11/ubuntu-intrepid-installing-apache-and-php5
5. http://articles.slicehost.com/2008/12/11/ubuntu-intrepid-apache-config-layout
6. https://articles.slicehost.com/2008/12/11/ubuntu-intrepid-apache-configuration-1
7. http://articles.slicehost.com/2008/12/11/ubuntu-intrepid-apache-configuration-2
SET UP MYSQL
8. http://articles.slicehost.com/2009/2/2/ubuntu-intrepid-installing-mysql-with-rails-and-php-options
SET UP PHUSION PASSENGER
9. http://articles.slicehost.com/2009/2/2/ubuntu-intrepid-mod_rails-installation
10. http://articles.slicehost.com/2009/2/2/ubuntu-intrepid-using-mod_rails-to-serve-your-application
SET UP GIT
11. http://articles.slicehost.com/2009/5/13/capistrano-series-setting-up-git
SET UP CAPISTRANO
==============================
Go to https://manage.slicehost.com/slices/new
Add a 256 slice. I picked Ubuntu Intrepid. When the page redirects you, note the server password. You'll change this in a minute.
They'll build the server and will send you an e-mail when it's done.
While you're waiting, read this: http://articles.slicehost.com/2008/11/28/ubuntu-intrepid-setup-page-1
SSH into it. From terminal, type in:
ssh root@<the IP address they included in your e-mail>
It'll ask you for a password. Paste in the password they sent you via e-mail, or that you saw on the Slicehost page while you were waiting for the server to build.
In terminal, type in:
passwd
It'll ask you to set a new password, then confirm it.
adduser charlie
Add a password and accept the other defaults
in terminal, type in
visudo
This will bring up the vi screen. Just below the line that says
root ALL=(ALL) ALL
... type in
charlie ALL=(ALL) ALL
Then, hit ctrl+x, then hit "y" to accept the changes, then hit Enter to commit it.
Assuming you already have an id_rsa key on your computer. If not, go here: http://articles.slicehost.com/2008/11/28/ubuntu-intrepid-setup-page-1 and ctrl-f for "SSH Keygen". Otherwise ...
In terminal, in a new window (that is, on your LOCAL machine):
scp ~/.ssh/id_rsa.pub charlie@173.45.224.156:/home/charlie/
(and be sure that the IP address is the appropriate one for the server)
back on ssh'd window of terminal:
cd home/charlie
ls
This should show a single file: id_rsa.pub
If it doesn't, cd .. and ls until you see a "home" directory, then cd home/charlie, then ls. Bottom line: you should see an id_rsa.pub file.
in terminal:
mkdir .ssh
mkdir .ssh/authorized_keys
mv id_rsa.pub .ssh/authorized_keys
cd .. (should now be in root directory)
chown -R charlie:charlie /home/charlie/.ssh
chmod 700 /home/charlie/.ssh
chmod 600 /home/charlie/.ssh/authorized_keys
We're now going to configure SSH
in terminal
nano /etc/ssh/sshd_config
Make sure these are present / set:
Port 30000 <--- change to a port of your choosing
Protocol 2
PermitRootLogin no
PasswordAuthentication no
X11Forwarding no
UsePAM no
UseDNS no
AllowUsers charlie
Then Ctrl+x, y, Enter
From the tutorial page at http://articles.slicehost.com/2008/12/11/ubuntu-intrepid-installing-apache-and-php5,
Install Apache:
sudo aptitude install apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment