Ubuntu Server Challange

September 25th, 2008

Moments ago Harper challenged me to install Ubuntu Server on my Macbook and to use it as such for two weeks. He claims he will do the same.
I decided to go for it. The hope is that I’ll tighten up my Linux skills a bit. I am pretty confident that this will go pretty well for me. I’m currently running Mythbuntu, but I perform most tasks via command line.

Then again, I’ve only been using Ubuntu for around 6 months and most of my experience there is with the GUI.

Apache2 on Ubuntu issue

August 26th, 2008

At home I run all my development on a server which is running Ubuntu 8.04 (Hardy Heron). I’ve been somewhat annoyed at a reoccurring warning message that I receive every single time I restart apache2 from the command line:


sudo /etc/init.d/apache2 restart
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
...done.

This wasn’t preventing Apache from running or my sites from displaying, but like I said, it was annoying, so I fixed it. If you’re having the same problem and want to fix it for yourself, these are the simple steps I took:

Make a backup of apache2.conf in your home directory:


sudo cp /etc/apache2/apache2.conf ~/apache2.conf.backup

Open up apache2.conf (use your favorite text editor, I used vim):


sudo vim /etc/apache2/apache2.conf

Add the following line at the top:


ServerName localhost:80

Restart apache:


sudo /etc/init.d/apache2 restart

That should do it. When you restart Apache you shouldn’t see the message.

If this fails and Apache won’t start for you after applying this fix, it means you did something wrong. You can revert your file with the backup you made:


sudo cp ~/apache2.conf.backup /etc/apache2/apache2.conf

Yes this is basic, but hopefully it will spare someone time and a headache. Also, a quick note: any time I run in to a small issue (such as this one) or larger issues (such as anything related to mythtv) I will be posting it here.

New apartment!

August 19th, 2008

Jennifer and I moved again this week (fourth apartment in Chicago)
I was in charge of hiring the movers and under the recommendation of Harper I decided to go with Starving Artist. They were pretty awesome. They didn’t break anything and the dudes were really nice.

Plus they have an amazing moving truck that shocked my new old people neighbors. Check out the pictures below.

[flickr_readr(72157606821484551)]

Getting Entropy PHP to play nice in os x 10.5 Leopard

February 26th, 2008

Recently I installed OS X 10.5 Leopard. I wanted to remove the packaged install of PHP and use the Entropy install from Marc Liyanage instead.

Unfortunately I ran in to an error during install:

Install Failed
The following install step failed: run postflight script for Entropy PHP. Contact the software manufacturer for assistance.

After failing to get a solution on google, I decided to fix this myself.
I’m running Apache 2 and it turns out that is where the problem is coming from. Now that I have fixed the issue, I am running a perfectly good Entropy package PHP install, and you can too by following these steps.

Edit: After posting this article, two commenters (see below) suggested a much simpler fix. Simply run the following command:

sudo ln -s /etc/apache2 /etc/httpd

My article goes in to editing files which is really unnecessary if you don’t care about having a symlink pointing to your apache2 directory (and I don’t see why you would care). However if you want to go the more complicated route, I have left my original instructions in tact below.

steps to follow

The very first thing you need to do is enable PHP in the httpd.conf file.
Figure out where this file is located.
Check /etc/apache2/httpd.conf.
If that fails, open Terminal and search for the file by typing:

locate httpd.conf

If that fails, you’ve got bigger problems and should stop now and do some google research.

Once you do locate the file, edit it and uncomment the following line (remove the pound sign from the begining of the line):

#LoadModule php5_module        libexec/apache2/libphp5.so
  1. Download the Entropy package for OS X 10.5 and follow all installation instructions.
  2. After running through the installation steps, if you do not get the afore mentioned error, you should be good to go. However if you do receive the postflight error, read on.
  3. Open up Terminal
  4. Type the following command
    cd /usr/local/php5/bin
  5. Edit the activate-entropy-php.py file using sudo and your favorite text editor (you’ll have to enter your system’s password here):
    sudo vi activate-entropy-php.py
  6. Lines 16 and 18 contain the following code:
    httpd_conf_symlink = '/etc/httpd/users/+entropy-php.conf'
  7. Change httpd to apache2 so that the lines look like this:
    httpd_conf_symlink = '/etc/apache2/users/+entropy-php.conf'
  8. Save and quit editing:
    :wq
  9. Run the Python script, you should not get any errors after it finishes running:
    sudo python activate-entropy-php.py
  10. Restart your server. You can do this by opening System Preferences > Sharing > Uncheck Web Services if it’s checked, then check the box again (or check it for the first time… you get the drift).

Now you just need to create a file in your Sites directory and test the PHP.

Change to your sites directory and create a test file:

cd ~/Sites
vi test.php

Add the following PHP to the file:

<php echo phpinfo(); >

Save the file:

:wq

Now open up a browser and type in this address:http://localhost/~[YOUR_NAME_HERE]/test.php

If you see information about your PHP installation, you are good to go. If not, you’re screwed and should consider going to the Entropy forums for further assistance.

The iPhone is VERY Easy to Use

February 1st, 2008

My daughter turns three years old at the end of this month. I have an iPhone. After watching me play with the iPhone and unlock it once or twice my daughter figured out how to unlock it and navigate it herself. She is a smart kid, but this also speaks volumes as to how easy the iPhone is to use.

After showing her a few Mario cartoons and various other kid friendly videos on YouTube, she became addicted. Last night it went a step further. She grabbed my wife’s iPhone, unlocked it, touched the YouTube icon, touched one of her favorite videos and slid the volume up. We were shocked.