Saturday, September 29, 2007

The Word For Today Is: Parse

Today I've been busily moving all of the non computer related articles from here at GeekyBits³ to my Personal blog: Of Tea and Turtles (TnT). My apologies for any inconvenience that my cleaning and clearing may cause. I really needed to keep this blog purely about computing, and to remove the personal content.

I have kept the dates and comments on all of the posts as best I could, although there where a few posts that didn't play fair, most are in the original format at the other site. I have gone though them looking for broken links and I think that they are all fine, yet if anyone spots one I would really appreciate it if you could let me know, Thanks.

Now, this site totally is dedicated to computers and technology, if you would like to read about DIY, philosophy, health & fitness, weight training, succulents, science, cooking, animé, music, or any other aspects of my personal life please feel free to drop over to TnT, I would love to see you there.

Thank you!

Friday, September 28, 2007

Giving the Customer What They Want

I just love this very funny description of project development. Funny because it's true ;-)
Click on image to see large version.

Thursday, September 27, 2007

Windows XP Tip: Enabling the Administrator account

After installing Windows XP Professional and creating a user account, the Administrator account disappears. Also in Windows XP home the administrator account is disabled from default. However there is an easy way to get it back in both systems:

To add the administrator's account in Windows XP:

  1. Open Registry Editor:
    In the start menu click the run dialog and type 'regedit' (no commas)
  2. In Registry Editor, navigate to the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList
  3. Create a new DWORD calling it:
    'Administrator' (no commas)
  4. Assign the DWORD the value of 1:
    Right click on newly made DWORD and select modify, then change the value to 1.
  5. Now Close the Registry Editor and Reboot.
An administrator login should now be provided, and the Administrator account should show up in the Users section of the control panel.

Wednesday, September 19, 2007

Windows for Free

You have just got to love free computers ;)
The other day my father arrived on the door step with six second hand computers. I couldn't believe it, at first I thought oh no, where am I going to find the money for these? However he doesn't want any money for them, he picked them up cheap at an auction and gave them to my partner and I.

My father has a new fascination with auctions, he says he loves them, I think its the competition that he loves.
I'm not complaining, they seemed like really sturdy well made computers, and so far I'm really impressed with them.

A couple of them have full Windows XP Professional disks and licenses with them, which I'm really happy about. I really needed at least one machine running Windows, I get asked questions about Windows based things all the time and it can be hard to answer without having a Windows computer.

I have set up a Windows box for both my partner and I. The other computers all run, and are very nice machines. I need to get CPU fans for a couple of them, and one of them has another issue that I'll need to solve, yet other than that they all seem fine. I'll have to wait to get new: surge protected power boards, and network cables before I can run them all.
I'm having fun playing with them though...

Monday, September 10, 2007

Creating a FAMP server

What is a FAMP server?
A FAMP server is a FreeBSD web server containing the following applications:
FAMP = FreeBSD + Apache + MySQL + Perl/PHP

Requirments

  1. You will need a basic install of FreeBSD, for more information on how to install FreeBSD please see: Installing FreeBSD
  2. You will need a copy of the ports, for more information please see: Using the Ports Collection.
Installing apache
I like using apache 1.3, I find it secure and stable, so I'll install it here. If you wish to use apache 2+ please see: httpd.apache.org.
# cd /usr/ports/www/apache13 && make install && make clean
# echo 'apache_enable="YES"' >> /etc/rc.conf


Installing PHP
This is the way I install PHP and needed PHP modules.
# cd /usr/ports/lang/php5 && make config
# cd /usr/ports/lang/php5 && make install && make clean
# cd /usr/ports/lang/php5-extensions && make install && make clean

If you are unsure which modules you will need check the system requirements of each application you will be using on the web-server (e.g. wordpress or mediawiki).

Installing MySQL
I will install MySQL 5.0 if you would like information on other MySQL versions please see: MySQL Home Page
# cd /usr/ports/databases/mysql50-server && make install && make clean
# echo 'mysql_enable="YES"' >> /etc/rc.conf


Installing Perl DBI and DBD support
Many programs which run using both Apache and MySQL will require the following Perl modules:
# cd /usr/ports/databases/p5-DBI && make install && make clean
# cd /usr/ports/databases/p5-DBD-mysql50 && make install && make clean


Configuration
It is important to add the web servers IP address to its hosts file. This suppresses errors from Apache and MySQL.
# edit /etc/hosts
adding:
192.168.0.252 Hostname.domainname.tld Hostname

Configuring Apache
Before editing any file on my system I like to make a backup of it.
# cp /usr/local/etc/apache/httpd.conf /usr/local/etc/apache/httpd.conf.orig
# edit /usr/local/etc/apache/httpd.conf


In httpd.conf you will need to change the following:
*Note: These options may not suit your needs for more information please see: FreeBSD Handbook - Apache HTTP Server, or httpd.apache.org
#If your web server is inside a jail it is important to change the Listen address:
# from:
#Listen 12.34.56.78:80
# to (Changing 192.168.0.252 to the IP address of the web server):
Listen 192.168.0.252:80

# Change the email address of the ServerAdmin (You)
ServerAdmin you@your.address

# Change the ServerName option,
# *Note: if you don't have a fully qualified domain name
# please change this to the servers IP address
# From:
#ServerName www.example.com
# To:
ServerName 192.168.0.252

# Add a DirectoryIndex option:
DirectoryIndex index.php index.html index.htm index.php3 index.php4

# In the AddType section add the following for PHP:
AddType application/x-httpd-php .php .htm .html
AddType application/x-httpd-php-source .phps

I like to do a diff on the original httpd.conf file and my changes, so that later I can see what I changed, especially if problems arise:
# diff --suppress-common-lines /usr/local/etc/apache/httpd.conf.orig /usr/local/etc/apache/httpd.conf > /root/.apache.conf-diff

Configuring php:
# cp /usr/local/etc/php.ini-recommended /usr/local/etc/php.ini
To Test php5
# echo "<?php phpinfo() ?>" > /usr/local/www/data-dist/phptest.html

Configuring MySQL:
# cp /usr/local/share/mysql/my-medium.cnf /etc/my.cnf
Start MySQL to add root passwords:
# /usr/local/etc/rc.d/mysql-server.sh start
# /usr/local/bin/mysqladmin -u root -h Hostname.domainname.tld password 'YourPassword'
# /usr/local/bin/mysqladmin -u root password 'YourPassword'


Now you need to reboot your web-server to startup all of your new services.

Testing your new Web Server
Once your server is up and running go to the web servers address either on the server (if it has a browser) or on your desktop box.

E.g. Open your browser and type the IP address of your server: http://192.168.0.252/

To test your php install type the following into your browser (changing 192.168.0.252 to the IP address of the server):
http://192.168.0.252/phptest.html

If you have problems check your firewall rules, if that doesn't help check your logs, and see if they shed some light on the problem.
Have Fun!!!

Tuesday, September 04, 2007

Moveable Type 4.0

If you read my: Of Tea and Turtles blog; you'll know that I've been away from the real world, dealing with family reality for the past couple of weeks, yet I'm trying to get back on track.

I've been playing around with Moveable Type 4.0, for a couple of days now, and I'm really impressed. The company is currently moving towards an Open Source solution: Movable Type Open Source Project.

I've been using the free for personal use Moveable Type (MT4) on FreeBSD 5.5, and I'm really happy with it's performance. There are a number of programs needed, before installing MT4, and you need to change permissions on a number of MT4 files, yet once it is running it is very nice to use.

From what I've read there have been many changes since the last version, yet this is the first time I've used it. For information on MT4 please see: Moveable Type 4.

I'm going to write a tutorial on performing a Moveable Type installation, yet I thought I would write a FAMP (FreeBSD Apache Mysql and Perl/PHP) how to first. Then I can write a number of tutorials linking back to the main FAMP one.