When attempting to install Bundler for Ruby on Ubuntu 10.04, I got the following error:
shell> sudo gem install bundler
ERROR: Error installing bundler:
bundler requires RubyGems version >= 1.3.6
sudo gem -v I saw that I had 1.3.5. To get around this, simply install the available updater gem, then run it:
shell> sudo gem install rubygems-update
shell> sudo /var/lib/gems/1.8/bin/update_rubygems
gem -v I see that I have 1.8.15 and I am able to install bundler:
shell> gem install bundler
Fetching: bundler-1.0.21.gem (100%)
Successfully installed bundler-1.0.21
1 gem installed
Installing ri documentation for bundler-1.0.21...
Installing RDoc documentation for bundler-1.0.21...
Here's a quickie tutorial on how to add Virtual Hosts to Apache on Ubuntu. This tutorial assumes that you have a basic understanding of Apache configuration and that your Apache is installed and able to serve websites.
- cd /etc/apache2/sites-available
- sudo vim yourdomain.com.conf and enter your VirtualHost directive. Below I've put the most basic example, see Apache docs for details and additional features:
Save & exit.
- sudo vim /etc/hosts and add your new domain to the 127.0.0.1 localhost line so it looks like this:
127.0.0.1 localhost yourdomain.com
Save & exit.
- Enable your new virtualhost:
sudo a2ensite yourdomain.com.conf
- Reload the Apache configuration:
sudo /etc/init.d/apache2 reload
That's it! Repeat for each of your VirtualHosts.
I recently purchased a cheapie Dell Inspiron 530 to use as a new local devbox with the intent of installing Fedora 7 on it (the machine came with Ubuntu Desktop pre-installed). Foolish me, I just assumed that if Ubuntu was compatible with the hardware, then Fedora surely would be as well. WRONG. Fedora was unable to detect/install both the SATA controller and the integrated ethernet port. After a few hours trying to get Fedora to install, I decided to give up and give Ubuntu Server a try. Of course it wasn't easy, so here are some of my notes in getting Ubuntu Server installed onto the Dell Inspiron 530.
I wanted to keep it simple so I just installed all of the defaults presented by the installer, including the LAMP package. Everything installed fine, however, the Integrated Network card was not detected/installed, so here's how to get it up and running by compiling and installing the driver.
- First we need to install some prerequisites that are required in order to compile the driver. Make sure your Ubuntu Server CD is in the CD drive and run the following:
sudo apt-get install linux-headers-2.6.20-15-server
sudo apt-get install gcc
- Download the ethernet driver from Intel. The one I used is e1000-7.6.5.tar.gz. If you can't find it at Intel, just Google the filename and I'm sure you'll be able to find it somewhere.
- Burn the driver to a CD, mount it on your Ubuntu machine, and copy it to a local dir:
sudo mkdir /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
sudo cp /mnt/cdrom/e1000-7.6.5.tar.gz /usr/src
- Compile and install the driver:
tar xfvz e1000-7.6.5.tar.gz
sudo make install
sudo modprobe e1000
- Now configure your network card:
sudo vim /etc/network/interfaces and your file should look like this (substitute your IP of choice):
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
# The primary network interface
iface eth0 inet static
- Setup your DNS servers:
sudo vim /etc/resolv.conf and it should look like this (I am using OpenDNS here but you can substitute your own):
- Restart the network:
sudo /etc/init.d/networking restart
- Upgrade your system for good measure:
sudo apt-get upgrade
That should be enough to get your Ubuntu Server up and running on the Dell Inspiron 530 with full network connectivity. Once you're up and running, here are some other tweaks I did, although some of these may be personal preference.
- I don't like Ubuntu's sudo setup (I prefer log in in as root when needed). Out of the box the root account is disabled and your default account is given admin rights to run commands via sudo. To get around this, simply reset root's password:
sudo passwd root
Now you will be able to su - and log in as root directly.
- Install SSH
sudo apt-get install ssh
- Disable root login to SSH:
sudo vim /etc/ssh/sshd_config and set the following:
- Change the MySQL root password:
mysqladmin -u root password "newpassword"
- Enable Apache's mod_rewrite:
sudo a2enmod rewrite
sudo /etc/init.d/apache2 force-reload
- Install some other useful goodies:
sudo apt-get install vim
sudo apt-get install php5-mcrypt
sudo apt-get install php5-curl
sudo apt-get install php5-gd
sudo apt-get install php-pear
sudo pear upgrade-all
sudo pear install mdb2
sudo pear install pear/MDB2#mysqli
If you've ever tried to edit a Windows-created file in Unix or OSX, you've probably encountered a messy translation in line breaks: A file full of "^M" characters. There is an easy search/replace you can use in vi/vim to format the file Unix-style: