Building Your Own Computer and Fixing The Problems

You might fancy putting together your next desktop computer instead of buying it off the shelf. Here’s some (useful?) advice to help you along the way.

Why Build Your Own?

These days even the big manufacturers can build you a computer tailored to your needs. In fact, companies like DELL have

  • competitive prices
  • plug and play, ready to go, they can even set it up for you
  • you get support when things go wrong
  • you can purchase a guarantee in case you have an accident/theft

Those are the advantages of buying new, what about building yourself? Here are my personal favourites:

  1. Getting packages delivered in the post
  2. You don’t have to wait on hold on the phone when things go wrong, instead you get to fix it yourself

What You’ll Need

You’ll need to buy the components and put them all together. I like to shop at Scan Computers, for good prices and great service.

When buying components you need to do your homework to get a good deal. Find out what’s hot and what’s not using websites like tom’s hardware. Also check out the specs, reviews, customer feedback, buying guides, and price comparisons before parting with your hard earned cash.

The essential components you need are:

  1. Motherboard: Buy a good motherboard that supports the best CPU, RAM speeds in your budget. Motherboards may have network cards, sound cards, and even graphics cards built in to them. Check to see exactly what you’re getting, you don’t want to go back to buy missing parts.
  2. CPU: Buy the best you can afford. You can buy retail boxes with CPU fans in them or buy the CPU fan separately. You need good cooling on your CPU to stop it overheating and getting damaged. Intel or AMD? AMD are cheaper, some say intels run cooler/faster. You’ll need to research the chips you can afford and make a choice.
  3. RAM: If a CPU is like a person cooking in the kitchen. The RAM is like the worktop. You need plenty of space to cut and chop and mix and whisk etc. So get plenty of RAM, especially when it’s cheap eg 1GB-4GB. 2GB is recommended for vista apparently
  4. Graphics Card: You need one to connect a monitor to the base unit. You can buy a motherboard with a graphics chip built in (it’ll say something like ‘onboard vga’), in which case you don’t have to buy a separate (usually more expensive) card. New cards come out all the time, so get the best card you can afford. If you’re into games and stuff, you might look for an SLI capable motherboard, and buy two cards, which work together for better performance.
  5. Hard Disk Drive: This is your permanent storage. Depending on what you plan to do on your PC, you can easily fill around 60GB to 250GB of HDD space. Buy as big as you can. 40GB minimum.
  6. Wireless Networking Card: To connect to your WiFi network
  7. Optical Disc Drive: To use CDs, DVDs, BluRay discs. Try a DVD-RW drive so you can write to DVD discs as well, so you can make data backups etc.
  8. Case: A good case to put it all in. You can buy cases with power supplies already in them, or you can buy the two separate. You’d generally go for a 450W or above power supply. You should also look out for front panel USB/speaker connectors on your case, so you’re not reaching round the back to plug things in all the time.
  9. Cooling: You’ll need a fan on your CPU, a fan attached to your case to draw air into the case, optionally, a fan to blow more air directly onto the CPU, and an optional fan to extract air out through the front of the case.

 

Putting It Together

Get an antistatic wrist strap. You can get away withouth one, but it’s better to be safe than sorry. You should touch a grounded surface before you start, to discharge any static electricity.

I like to insert the CPU & RAM into the motherboard before attaching the board to the case. Just be careful of the board when you attach it, because it can be chunky, and heavy.

You’ll need open your case, and find the screws that come with it. Sometimes the pack of screws gets stuck in some corner, so look for it properly. You have to attach the motherboard to the case. The motherboard musn’t be in contact with the case though, as the case is grounded, so if it touches, it’ll short out the board and probably screw your system up. Your motherboard manual should show you how to attach the motherboard, if it doesn’t google for a guide.

Attach your graphics card next, unless it’s onboard. Once the graphics card is connected, connect the cables coming out of the front of the case for your Motherboard Power, PC speaker, Hard Disk Drive Usage Light, Power Switch and Reset Switch to the motherboard. There should be some help in your motherboard manual telling you where to connect what. The cables should be labelled positive, ground etc. so make sure they’re in connected right way around.

Booting Up

Connect a PS2 keyboard up. Sometimes the USB ones don’t work with the BIOS the first time. You can go into your BIOS settings by pressing F2/delete keys on your PS2 keyboard and enabling an option usually called ‘legacy usb support’.

Connect a mouse, monitor and a power supply. See if it starts up, and you get your BIOS screen (usually a logo, and black screens with your PC specs). If not, wait a couple of seconds, sometimes things might take a couple of seconds to show on screen. If you’re still not seeing anything on the monitor, continue to troubleshooting.

If on the other hand you’re system boots, attach a Hard Disk Drive, Floppy and Optical Drives and boot the system again. If it starts again, you can proceed to install windows.

Next install the drivers for your motherboard chipset, graphics card etc. from the CDs you get with the boards.

If all goes well, install the latest windows updates to your system such as the service packs, .NET frameworks etc.

If all is still going well, visit your motherboard/graphics card/etc. manufacturers’ websites and download the latest updates. I don’t recommend flashing the BIOS unless you’re having problems. I wouldn’t even update the drivers unless theres a good reason for it, eg security update, performance increase etc. This is because, sometimes you have to think about the saying ‘if it ain’t broke, don’t fix it’. In other words, new drivers can bring new problems. Especially the driver updates suggested by windows update.

You’re all setup with windows now so you can go ahead and install your own software.

Troubleshooting

Assuming you’ve hooked up the graphics card, and your system isn’t booting:

The first thing to ask is this: are all the cables connected properly?

Is the power switched on, and connected? Is the monitor  switched on & connected?

Is the power cable coming out of the PSU connected to the motherboard? Sometimes there is a separate 12v connectors which you may have missed.

Is the power switch cable connected properly? Sometimes it’s hard to get it onto the pins, or it might not be the right way round.

Do you have all the right components? Is your RAM/CPU the right compatible with the motherboard?

Are you getting error lights/beeps/codes? Check these in your manual.

Is the RAM seated properly?

At this point, you could take out the graphics card and test it in a separate system. If it’s working fine, re-insert it into the motherboard. If you can’t test it elsewhere, try reseating it anyway.

Re-seat the CPU. Take it out and put it back in carefully.

Re-seat the CPU Fan. If the fan is loose, you’re system might start, then cut out. You can usually check the CPU/motherboard temperature in the bios (to see if the CPU fan is working/connected). Some fans need to be attached quite firmly so you might need to get it on tighter.

You’re system should be booting by now. If it isn’t try searching for your problem online. Usually other people will have already asked the same question on a forum somewhere. You just have to search for the right words, and read loadsa silly posts, totally unrelated to what you want, until you hit gold.

Problems Installing Windows

Sometimes your computer boots but you get other wierd problems. For example, your computer boots, but your display doesn’t turn on if you restart the computer. Or windows won’t install properly, eg setup begins but you get unexpected read errors (like hard drive read/write errors) which make the setup fail.

Most of the time this is to do with your CPU clock speed. You need to go into your BIOS (F2 or delete on startup) and set your CPU clock speed manually to a lower setting. Be careful when making these kind of changes, check your manual to make sure you’re settings are compatible with your components.

Rarely: You get windows installed, but it starts crashing etc. This may be solved by updating your hardware drivers. If this doesn’t help, try updating the motherboard BIOS.

If you screw up when updating the bios (eg you accidentally hit the standby button on you’re keyboard) you’re system can stop booting. This is when you dig out the manual and carefully follow the instructions. In most instances you can fix the problem no matter how serious and scary it looks.

Advertisements

Fixing MySQL Service Could Not Start, 1067 Errors

If you’ve unzipped mysql out to a folder and you set it up to run as a service, like so

C:\mysql5_x64\bin\mysqld-nt.exe --install-manual

You might try to launch the service from the Control Panel -> Administrative Tools -> Services Window. But if you’re getting the error message:

‘Could not start the MySQL service on Local Computer

Error 1067: The process terminated unexpectedly.’

Running from the command line:

C:\mysql5_x64\bin\mysqld-nt.exe --console

Should work fine. So what’s the problem? Well, you may be missing your my.ini file. Create the file (you can copy one of the defaults that come with it such as my-small.ini), and make the following changes by adding the basedir & datadir lines, so it looks something like this:

# The MySQL server
[mysqld]
###################################
basedir=C:/mysql5_x64
datadir=C:\mysql5_x64/data
###################################
port        = 3306
socket        = /tmp/mysql.sock

If you try to launch the service again, you should feel alot happier.

Some of the readers have put in some helpful comments, which I’ll include here

Take a look at your error log by looking in:

“C:\Documents and Settings\All Users.WINDOWS\Application Data\MySQL\”

Then click on the “MySQL Server X.X\” folder and then “data\”

Find the file [MY-DOMAIN-NAME].err and open it using notepad

Another possible cause of the 1067 error might be faulty my.ini settings.

So the general tip from me would be: Try to think of any reconfigurations you’ve done recently. That might be what’s causing this. —ChromaWoods

We were getting a 1067 error because (we think) we’d been unable to successfully complete a reinstall after mixing up the original root password [on the mysql server].

Our solution in the end was to _completely_ uninstall MySQL and reinstall. The tricky part is that the uninstall requires three steps:

1. Uninstall via Add/Remove Programs from the Control Panel.

2. Delete the Base directory — likely C:/Program Files/MySQL

3. Delete the Data directory — likely C:/Documents and Settings/All Users/Application Data/MySQL

Finding the Data directory may be a bit tricky, since the Application Data folder is hidden by default. If you change your Folder Options so you can view the Application Data folder and still cannot see it, type the path (from step 3) into Run from the Start Menu to open the folder.

Once you’ve uninstalled MySQL and deleted these two folders, you should be ready to start fresh!

Installing Apache 2.2 PHP 5.2 MySQL 5 on Windows 32bit or x64

This post is about getting MySQL working with Apache/PHP because sometimes it can be a pain to get it working.

If you are having trouble getting PHP working with Apache, one reader called Nurlan has found a guide to using the PHP MSI install wizard. You can find it at http://foundationphp.com/tutorials/php_installer.php

Before You Begin

  • Read carefully
  • Keep backups of the files you change (make a copy before you change them)
  • Some long lines of text may run off the page on this website, so you need to copy the whole line down correctly

Downloading & Installing

http://httpd.apache.org/

Download the apache 2.2.8 installer (I used the one with SSL) and install it, I’ve installed to c:\apache2.2. You can run it from the start menu.

http://php.net/

Download the PHP 5.2.6 zip and extract it (I used the no-msi zip). You don’t want space characters in the path, so I suggest C:\php5.2.6.

http://www.mysql.com
http://dev.mysql.com/downloads/gui-tools/5.0.html

Download MySQL 5.01. I installed to C:\mysql5 because I didn’t use the installer. It will work just as well if you use the install wizard. Once installed, you can use the mysql monitor, which appears in the system tray (next to the clock) to start/stop the sql server.

Try  the MySQL GUI tools.  You can login using the mysql administrator, so you can setup usernames etc. You can edit schema (databases) and tables etc. using the Query Browser, it’s pretty straight forward to use.

Configuring Apache to use PHP

I like to make it obvious where I’ve made changes to files, so I can easily see them later. I do this by putting long comment lines above and below the changes.

Go into httpd.conf. find the bunch of LoadModule lines and add this one.

LoadModule php5_module C:/php5.2.6/php5apache2_2.dll

So In my file it looks like this

#++++++++++++++++++++++++++++++++++++
# Last changed on 28 July 2008.
# This line enables the PHP module
LoadModule php5_module C:/php5.2.6/php5apache2_2.dll
#++++++++++++++++++++++++++++++++++++

Add this line as well (i put it after the loadmodule line)

PHPIniDir C:/php5.2.6/

ZAUR left a useful comment on 29th June 2008. He mentions that it’s important not to have quotes around your path in this line. Thanks Zaur.

Find the bunch of AddType lines and add this one

AddType application/x-httpd-php .php

Configuring PHP to use MySQL

Go into C:\php5.2.6 and copy the file called php.ini-recommended, paste it into the same folder and rename it to php.ini. So you have a duplicate of php.ini-recommended called php.ini.

Find and edit the following lines;

doc_root = "C:\Apache2.2\www"
extension_dir = "C:\php5.2.6\ext"

uncomment this line (take the ‘;’ character out)

extension=php_mysql.dll

Troubleshooting

Now restart apache, everything should be working. You can check up on php by using the phpinfo() function. Just put the following line into a file called something like phpinfo.php and place it in your htdocs folder:

<?php phpinfo(); ?>

If php is running, it will give you a page with lots of information. Look for the mysql section, it comes after PHP Credits, Configuration, PHPCore etc. If it isn’t there, that means PHP is running but MySQL isn’t playing ball.

Check all the edits you’ve made the the config files, make sure they all make sense, sometimes you put the wrong slashes in, or the wrong folder name and it’s very hard to spot.

If you get the following error message:

unable to load C:\php5.2.6\ext\php_mysql.dll’

This is the most frustrating part of getting mysql working. PHP won’t run the mysql extension and you have to do stupid things to get it to work!

Copy C:\php5.2.6\libmysql.dll to c:\windows\system32\ and restart apache

IF YOU ARE USING WINDOWS XP x64 and moving the file to system32 doesn’t work, move it to C:\WINDOWS.

andy23 http://my.opera.com/andy23/info/

galoabk http://my.opera.com/galoabk/info/

These guys have a suggestion. When copying libmysql, andy23 says:
Copy file libmysql.dll in C:\php5.2.6 to C:\apache2.2\bin\ AND C:\windows\system32

Hopefully, this will have got your servers up and running. Go ahead and try out wordpress, joomla, osCommerce etc.

If you find you can’t login to the mysql server, check my mysql posts with instructions on how to setup mysql user accounts.

Thanks to all the people contributing their time to open Source projects, and thanks to you for reading.