First we need to get the latest build of Ruby Enterprise Edition (Ruby EE from now on) from http://www.rubyenterpriseedition.com
$ tar xzvf ruby-enterprise-1.8.7-2010.01.tar.gz
$ sudo ./ruby-enterprise-1.8.7-2010.01/installer
$ sudo yum install OpenSSL
$ which ruby
$ sudo nano /etc/profile.d/ruby.sh
$ source /etc/profile
$ ruby -v
ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2010.01
Sometimes your want to make your IP address to point to somewhere other than the host it’s currently point to. The way Apache works is that it loads vhosts in order number-alpahbetically. So when I created “adminnoob.conf” as my new config my IP now pointed to adminnoob.com. This is an easy fix. In my httpd.conf I load all my vhosts like so:
# Loads all vhosts
When you’re working at the airport or coffee shop, you should never trust their wifi to provide secure wireless internet. Especially if you plan to visit secure sites such as banks, server control panel, etc. You never know who might be at there with you. In this case you should tunnel your traffic through ssh. To do this, simply start a new session in your terminal.
First we need to connect to our server and we are going to create a SOCKS Proxy
$ ssh email@example.com -D 8080
So recently I ran into an issue where our backup script would only work properly when we ran it manually. That’s another story. However to try and catch what was wrong with the cron job we had to figure out a way to log what was happening. So what I did was the following on a CentOS machine. I opened the crontab file /etc/crontab and inside there you have four jobs that run at different times:
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
02 4 * * * root run-parts /etc/cron.daily >> /var/log/backup.log
One of the most secure things you can do to your server is to disable password logins. You should always disable root login. The first thing you need to do is locally retrieve or create your public ssh key. To see if you have one already created check in this location. On a Mac it’s
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/user/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/user/.ssh/id_rsa.
Your public key has been saved in /Users/user/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:
--[ RSA 2048]----
| . |
| = o O . |
| = * * |
| o = |
| o S . |
| o o = |
| o . E |
$ scp .ssh/id_rsa.pub firstname.lastname@example.org:.ssh/authorized_keys
$ cat ~/.ssh/id_rsa.pub | ssh email@example.com "cat >> .ssh/authorized_keys"