Oct 26 2007

Max OS X Leopard - Disappointed (but not how you think)

Tag: Apple, Techjs @ 8:02 pm

“New Macs will come with Leopard Pre-Installed…” - Apple’s Leopard Guided Tour Video

So today is the release of Apple’s next generation version of OS X: Leopard. I had planned on purchasing an iMac a couple months ago, but decided to delay my purchase until the release of Leopard. So I go down to the Apple store (which was PACKED) and proceeded to purchase a shiny new iMac. Excited to try out Leopard, I rip it out of the box and turn it on. And to my disappointment, it boots into Tiger. WTF!? I delayed buying a new iMac for Leopard and I get… TIGER?!!? Turns out Leopard isn’t pre-installed on my iMac. Apple simply threw a Leopard DVD into the box expecting me to sit through a manual upgrade. At the end of the day I don’t really care, but here I am ranting on my blog (from my Windows machine) instead of playing with my brand new Leopard-powered iMac. Ugh!

I always thought that Macs were supposed to just work! What’s with all this manual tinkering and upgrading and waiting and slowly-moving progress bar watching? For a minute there I thought I had bought a new PC running Windows… Shame on you Apple.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Sep 19 2007

Cacti on Fedora: Blank Graphs

Tag: Fedora, Linux, Techjs @ 6:08 pm

After getting Cacti up and running successfully on Fedora Core 5, I had a problem with the graphing. Caci was receiving the SNMP data correctly (the graph legends would show the proper data values), but the actual neato colors and lines were absent in the graph image. After some research I found a fix: Everything in the rra file must be owned by the cacti user, or the user running the poller crontab. Pretty simple:

chown -R cacti.cacti /usr/share/cacti/rra

Once the rra files were owned by the cacti user, the graphs started to appear in all their colored and lined splendor!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Aug 02 2007

Apache VirtualHost on Ubuntu

Tag: Apache, Tech, Ubuntujs @ 5:24 pm

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.

  1. cd /etc/apache2/sites-available
  2. 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:
    <VirtualHost *>
    ServerName yourdomain.com
    DocumentRoot /home/youruser/public_html
    </VirtualHost>

    Save & exit.

  3. sudo vim /etc/hosts and add your new domain to the 127.0.0.1 locahost line so it looks like this:
    127.0.0.1 localhost yourdomain.com

    Save & exit.

  4. Enable your new virtualhost:
    sudo a2ensite yourdomain.com.conf
  5. Reload the Apache configuration:
    sudo /etc/init.d/apache2 reload

That’s it! Repeat for each of your VirtualHosts.

—————-
Now playing: Alèmayèhu Eshèté - Tchero Adari Nègn
via FoxyTunes

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Aug 02 2007

Installing Ubuntu Server on a Dell Inspiron 530

Tag: Linux, Tech, Ubuntujs @ 1:53 pm

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.

  1. 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
  2. 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.
  3. 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
  4. Compile and install the driver:
    cd /usr/src
    tar xfvz e1000-7.6.5.tar.gz
    cd e1000-7.6.5/src
    sudo make install
    sudo modprobe e1000
  5. 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
    auto lo
    iface lo inet loopback

    # This is a list of hotpluggable network interfaces.
    # They will be activated automatically by the hotplug subsystem.
    mapping hotplug
    script grep
    map eth0

    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.1.66
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

  6. 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):

    nameserver 208.67.222.222
    nameserver 208.67.220.220
  7. Restart the network:
    sudo /etc/init.d/networking restart
  8. 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.

  1. 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.

  2. Install SSH
    sudo apt-get install ssh
  3. Disable root login to SSH:
    sudo vim /etc/ssh/sshd_config and set the following:

    PermitRootLogin no
  4. Change the MySQL root password:
    mysqladmin -u root password “newpassword”
  5. Enable Apache’s mod_rewrite:
    sudo a2enmod rewrite
    sudo /etc/init.d/apache2 force-reload
  6. 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

—————-
Now playing: Apparat - Steinholz (Monolake Remix)
via FoxyTunes

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Jul 23 2007

Trillian: AIM Error Code: 10054

Tag: Techjs @ 9:50 am

After a recent automatic update of Trillian, I was unable to connect to AIM. The console stated:

Error Code: 10054

After searching around and trying a bunch of things, I was unable to re-connect until I found the following in the Trillian Technical Support Forum:

  1. Click Trillian > Connections > Manage My Connections.
  2. Select your AIM account, click Change button.
  3. Under the Connection tab in the Server section, click Reset, then Save Settings.
  4. Click Trillian > Trillian Preferences > Plugins.
  5. Disable AIM & ICQ by unchecking it.
  6. Re-enable AIM & ICQ by checking it.
  7. Click Close.
  8. Click Trillian > Connections > Global Reconnect.

This worked for me and I was able to connect to AIM once again.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Jul 21 2007

PHP & imagettftext with Webcore TrueType fonts.

Tag: Fedora, Linux, PHP, Techjs @ 1:37 pm

If you’re trying to write some text using PHP/GD & the imagettftext function, you will of course need some TrueType fonts to work with. I’ve found a great set of fonts available for free: Webcore. Webcore contains all the fonts webdesigners constantly use, things like Arial, Tahoma, Verdana, Georgia, etc..

To install, simply download to your server and install the RPM (Fedora):

shell> wget http://avi.alkalay.net/software/webcore-fonts/webcore-fonts-3.0-1.noarch.rpm
shell> rpm -i webcore-fonts-3.0-1.noarch.rpm

These fonts will now be available to you in /usr/share/fonts/webcore/.

Make sure you specify the full path when calling imagettftext(), eg:

<?php

// Set the content-type
header(”Content-type: image/png”);

// Replace path by your own font path
$font = ‘/usr/share/fonts/webcore/arial.ttf’;

// Create the image
$im = imagecreatetruecolor(400, 30);

// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);

// The text to draw
$text = ‘Hello world!’;

// Add some text
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);

// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im);
imagedestroy($im);
?>

Your mileage may vary if you are using a different distribution, but the docs state that this RPM should work on other distros.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Jul 03 2007

vi: Get rid of Windows formatted linebreaks (^M)

Tag: Fedora, FreeBSD, Linux, Ubuntujs @ 11:10 am

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:

:%s/\r/\r/g
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

« Previous PageNext Page »