Plan & Build your own PC Workstation

July 8th, 2008 admin Posted in Best Practices, Hardware, How To:, Installation No Comments »

If you want to build your own PC and make it to your specs, read on…

Building your own PC workstation is really quite easy. You can also build exactly what you want to and spend as much on the latest hardware or go cheap. There are many options. Here are some things to think about. Case size: Full sized cases give you more options and can hold more gear and are the most common. Mid sized cases have nice qualities, but you lose a drive bay or two and you are limited by the number of mother boards available. The micro cases are nice if you move your box around and you are very limited in what you can put inside them.

Let’s focus on the full sized case. Most include a power supply. 500 to 700 watts should be sufficient. If you are going to load up your box with multiple CPUs, high end graphics cards and lots of drives, opt for the larger power supply.

While you are pricing out your components, pay attention to your fans. If this box is going to end up sitting next to you, then cheap whirring fans are not what you want.

You will want to spend the most time on your system motherboard. AMD or Intel CPUs? Both are good. Depending on your application, one could give you an edge, but the final choice is up to you. Me? AMD. When buying and building a system, go for the newest CPU socket type. At the time of this blog, AMD uses the “Socket AM2″ and Intel uses “Socket 775″. The fastest CPUs are commanding the highest price. Look at some of the larger internet retail chains (Tigerdirect, Egghead, etc). The fastest CPUs of 6 months to 1 year ago are now quite reasonably priced. Find what fits your budget.

Because you narrowed down your mobo (motherboard) options by choosing a CPU, now look at what is available. Must haves: SATA (serial ata). This is the hard drive interface. IDE is still around, but shy away from it. RAID. (Redundant array of inexpensive disks). Can save data if you are on top of your game, but remember to “keep it simple”. USB. Only go for 2.0. 1.1 is dead. Network interface. 100Mbit is fine. 1000Mbit is nice if you have a switch and other hosts that support that speed. Memory. More is better. Linux does not need gobs of RAM like Vista does. 1 to 2gb is fine. The graphics card can be pricey. If this system will be used for browsing, development work or running wordpress blogs, save your money and look for a mobo with onboard video. All will come with some kind of audio.

Disks/DVDs. Again, get what you need. The new DVD drives read DVD+/- DL, and can read/burn CDs as well. High capacity disks are cheap. 500gb drives go for about $80.

AddThis Social Bookmark Button

Installing multiple instances of WordPress using Apache2

July 8th, 2008 admin Posted in Applications, Best Practices, How To:, Installation No Comments »

Assuming that you already have wordpress running and you want to run more than one instance on your system, you need to do the following:

Download the latest version of wordpress <em>wordpress-2.5.1.zip </em>and unzip it into a temporary directory.

I am using /var/www as my first rootdoc and will be using /var/www1 and /var/www2 as my other 2 wordpress rootdoc locations.

<em>mv wordpress-2.5.1.zip /tmp</em>

<em>unzip wordpress-2.5.1.zip</em>

<em>cd wordpress</em>

<em>cp -r * /var/www1</em>

<em>cp -r * /var/www2</em>

So far we have extracted the zip file in the /tmp directory. We then went in /tmp and recursively copied it into the new areas where the new wordpress blogs will live.

cp /var/www/wp-config.php /var/www1

cp /var/www/wp-config.php /var/www2

We want to use the same wp-config.php file since we want to use the same mysql database, but we want to use DIFFERENT TABLES.

This is the wp-config.php file. Note the <em><strong>’wp_’ </strong></em>variable below. This is what the mysql database uses to name the tables. I used <em><strong>’wpdb1_’ </strong></em>and ‘<em><strong>wpdb2_’</strong></em> for my other wordpress installations.

Now edit the /etc/hosts file

192.168.1.2 blaster blaster.nethopper.com<em><strong> blogger.blogme.com dog.doggone.com</strong></em>
127.0.0.1 localhost

You obviously need to contact a registrar and purchase your domain names. Cheap. About $7 per year. Now my hostname is blaster and my first blog was at blaster.nethopper.com. I want to add blogger.blogme.com and dog.doggone.com. Both new wordpress blogs to run on my linux host. These names must be in the /etc/hosts file.

<em>&lt;?php^M
// ** MySQL settings ** //^M
define(’DB_NAME’, ‘wordpress’); // The name of the database^M
define(’DB_USER’, ‘wordpress_user’); // Your MySQL username^M
define(’DB_PASSWORD’, ‘gogetyourownpasswd’); // …and password^M
define(’DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value^M
define(’DB_CHARSET’, ‘utf8′);^M
define(’DB_COLLATE’, ”);^M
^M
// You can have multiple installations in one database if you give each a unique prefix^M
$table_prefix = <strong>’wp_’;</strong> // Only numbers, letters, and underscores please!^M
^M
// Change this to localize WordPress. A corresponding MO file for the^M
// chosen language must be installed to wp-content/languages.^M
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’^M
// to enable German language support.^M
define (’WPLANG’, ”);^M
^M
/* That’s all, stop editing! Happy blogging. */^M</em>
The wordpress files are in order, our mysql database is ready. Apache needs some work.

look in the /etc/apache2/sites-available directory and edit the remove the default file and replace it with the names of the domains that you want to blog on. In my case, there are 3 files called.

blaster.nethopper.com<em><strong> </strong></em>blogger.blogme.com dog.doggone.com

Here is the contents of blaster.nethopper.com. Make the other 2 look like this one with the obvious changes. I will bold them.
<blockquote>root@blaster:/etc/apache2/sites-available# cat blaster.nethopper.com
<em>NameVirtualHost 192.168.1.2 <strong> &lt;–Your IP from your router. Will be the same IP for all.</strong>
&lt;VirtualHost <strong>blaster.nethopper.com</strong>&gt; <strong>&lt;– Put the domain that will answer on the above IP</strong>
ServerAdmin webmaster@localhost
ServerName <strong>blaster.nethopper.com</strong>
DocumentRoot /var/www/ <strong>&lt;– Change accordingly /var/www1 and /var/www2</strong>
&lt;Directory /&gt;
Options FollowSymLinks
AllowOverride None
&lt;/Directory&gt;
&lt;Directory /var/www/&gt;
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2’s default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
&lt;/Directory&gt;</em>

<em>ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
&lt;Directory “/usr/lib/cgi-bin”&gt;
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
&lt;/Directory&gt;</em>

<em>ErrorLog /var/log/apache2/error.log</em>

<em># Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn</em>

<em>CustomLog /var/log/apache2/access.log combined
ServerSignature On</em>

<em>Alias /doc/ “/usr/share/doc/”
&lt;Directory “/usr/share/doc/”&gt;
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
&lt;/Directory&gt;</em>

<em>&lt;/VirtualHost&gt;</em></blockquote>
Once you have all three files done, link them to the sites-enabled directroy.

<em>cd /etc/apache2/sites-enabled</em>

<em>ln -s /etc/apache2/sites-available/blaster.nethopper.com .</em>

<em>ln -s /etc/apache2/sites-available/blogger.blogme.com .</em>

<em>ln -s /etc/apache2/sites-available/dog.doggone.com .</em>

Now restart Apache

<em>/etc/init.d/apache2 stop; /etc/init.d/apache2 start</em>

Open a browser and enter: <em>http://blogger.blogme.com/wp-admin/install.php</em>

Then do the same for: <em>http://dog.doggone.com/wp-admin/install.php</em>

You are done.

If you are curious to see what your mysql wordpress database looks like. Take a look. You can see that the variable we changed in the wp-config.php file is the beginning of each table entry.

<em>root@blaster:~# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 25628
Server version: 5.0.45-Debian_1ubuntu3.3-log Debian etch distribution</em>

<em>Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.</em>

<em>mysql&gt; use wordpress
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A</em>

<em>Database changed
mysql&gt; show tables;
+————————–+
| Tables_in_wordpress |
+————————–+
| wp_comments |
| wp_links |
| wp_options |
| wp_postmeta |
| wp_posts |
| wp_term_relationships |
| wp_term_taxonomy |
| wp_terms |
| wp_usermeta |
| wp_users |
| wpdb2_comments |
| wpdb2_links |
| wpdb2_options |
| wpdb2_postmeta |
| wpdb2_posts |
| wpdb2_term_relationships |
| wpdb2_term_taxonomy |
| wpdb2_terms |
| wpdb2_usermeta |
| wpdb2_users |
| wpdb3_comments |
| wpdb3_links |
| wpdb3_options |
| wpdb3_postmeta |
| wpdb3_posts |
| wpdb3_term_relationships |
| wpdb3_term_taxonomy |
| wpdb3_terms |
| wpdb3_usermeta |
| wpdb3_users |
+————————–+
30 rows in set (0.00 sec)</em>

<em>mysql&gt; </em>


US $18.04
Auction Ends: Saturday Nov-21-2009 19:44:32 PST
Buy this Item   | Watch this Item

US $20.43
Auction Ends: Sunday Nov-22-2009 9:28:12 PST
Buy this Item   | Watch this Item

US $4.99
Auction Ends: Sunday Nov-22-2009 9:37:33 PST
Buy this Item   | Watch this Item

US $9.99 (0 Bid)
Auction Ends: Sunday Nov-22-2009 21:27:27 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $0.97 (1 Bid)
Auction Ends: Sunday Nov-22-2009 23:26:25 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $36.26
Auction Ends: Monday Nov-23-2009 17:59:09 PST
Bid on this Item   | Buy this Item   | Watch this Item

AddThis Social Bookmark Button

Installing Webalizer on Ubuntu (Gusty)

July 8th, 2008 admin Posted in Applications, How To:, Installation No Comments »

Webalizer is a nice application that can give you plenty of stats about your web server(s)

Run:

apt-get install webalizer

There was a problem with webalizer looking in the wrong place for my Apache logs.

<em>root@blaster:~# webalizer
Webalizer V2.01-10 (Linux 2.6.22-14-386) locale: en_US.UTF-8
Error: Can’t open log file /var/log/apache2/access.log.1
root@blaster:~# vi /etc/webalizer/webalizer.conf</em>

My apache log file is in access.log, not access.log.1.  Make that change and then fire off webalizer.

<em>root@blaster:~# webalizer</em>

<em>Webalizer V2.01-10 (Linux 2.6.22-14-386) locale: en_US.UTF-8
Using logfile /var/log/apache2/access.log (clf)
Using default GeoIP database
Creating output in /var/www/webalizer
Hostname for reports is ‘blaster’
History file not found…
Generating report for June 2008
Generating summary report
Saving history information…
673 records (11 ignored) in 3.00 seconds, 224/sec</em>

Now open your browser to:  http://localhost/webalizer

I would suggest adding /usr/bin/webalizer to cron daily to keep the information up to date and if you forget, your logs may roll and you may lose valuable information.

run: crontab -e and put in the last line for webalizer.  I am running it at 1:05am each morning.

root@blaster:~# crontab -l
# m h  dom mon dow   command
30 2 * * * /usr/bin/do_rsync
5  1 * * * /usr/bin/webalizer


US $6.95 (0 Bid)
Auction Ends: Saturday Nov-21-2009 13:14:49 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $3.97
Auction Ends: Saturday Nov-21-2009 13:15:22 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $3.36
Auction Ends: Saturday Nov-21-2009 13:45:18 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $2.25 (4 Bids)
Auction Ends: Saturday Nov-21-2009 14:00:45 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $2.43
Auction Ends: Saturday Nov-21-2009 14:15:36 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $11.00 (10 Bids)
Auction Ends: Saturday Nov-21-2009 14:50:30 PST
Bid on this Item   | Buy this Item   | Watch this Item

AddThis Social Bookmark Button

Adding a second data disk, format, mount, rsync!

July 8th, 2008 admin Posted in Hardware, How To:, Installation No Comments »

One way to keep data around is to keep a second data disk on your system and periodically mount it and sync the data on your primary data disk. No this is not RAID. I wanted something so simple that I could not shoot myself in the foot. Basically, I have a 400GB data disk and a second data disk that I keep unmounted and then run a cron job each night to mount that drive and then run the rsync command against it and unmount it. My own way of keeping data somewhat backed up. Not fool proof, but better than nothing. that and every so often, burning lots of DVDs and then putting them in a safe offsite location.

Put in the disks and make sure that the host (Linux now…) can see them.

Run: fdisk -l

<em>root@blaster:/# <strong>fdisk -l</strong></em>

<em>Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0×00000000</em>

<em><strong>Disk /dev/sdb: 400.0 GB, 400088457216 bytes <— our new disk</strong>
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0×00000000</em>

<em>Disk /dev/sdb doesn’t contain a valid partition table</em>

<em>Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0×34943493</em>

<em>Device Boot Start End Blocks Id System
/dev/hda1 * 1 4660 37431418+ 83 Linux
/dev/hda2 4661 4865 1646662+ 5 Extended
/dev/hda5 4661 4865 1646631 82 Linux swap / Solaris
root@blaster:/# <strong>fdisk /dev/sdb <— running fdisk against /dev/sdb</strong>
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xd600a205.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.</em>

<em>The number of cylinders for this disk is set to 48641.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)</em>

<em>Command (m for help): <strong>m <—- menu</strong>
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)</em>

<em>Command (m for help): <strong>p <— printing</strong></em>

<em>Disk /dev/sdb: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd600a205</em>

<em>Device Boot Start End Blocks Id System</em>

<em>Command (m for help): n
Command action
e extended
p primary partition (1-4)
<strong>p <—- Making a primary partition</strong>
Partition number (1-4): <strong>1 </strong> <<strong>– Starting with partition 1</strong>
First cylinder (1-48641, default 1): <–<strong>- Using defaults from here on out</strong>
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-48641, default 48641):
Using default value 48641</em>

<em>Command (m for help): <strong>p <— Printing again</strong></em>

<em>Disk /dev/sdb: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd600a205</em>

<em>Device Boot Start End Blocks Id System
/dev/sdb1 1 48641 390708801 83 Linux</em>

<em>Command (m for help): <strong>w <— Writing out the data</strong>
The partition table has been altered!</em>

<em>Calling ioctl() to re-read partition table.
Syncing disks.</em>

Done with the disk format

Now time to put a filesystem on the drive. Using the first partition of /dev/sdb1, journaling with ext3.

<em>root@blaster:/# <strong>mke2fs -j /dev/sdb1</strong>
mke2fs 1.40.2 (12-Jul-2007)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
48840704 inodes, 97677200 blocks
4883860 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
2981 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968</em>

<em>Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done</em>

<em>This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.</em>

Now we add this to the /etc/fstab file:

<em>/dev/sdb1 /sync ext3 defaults 0 2</em>

We need a mount point.

<em>mkdir /sync</em>

Now mount it.

<em>/sbin/mount -a</em>

and look at it.

<em>df -h</em>

/dev/sda1 367G 295G 54G 85% /data
/dev/sdb1 367G 195M 348G 1% /sync

Now we want to sync the disks.

/dev/sda1 367G 295G 54G 85% /data
/dev/sdb1 367G 195M 348G 1% /sync

Here we are running the rsync command. This will copy all the data from /data to /sync

<em>/usr/bin/rsync -auvP /data/* /sync/</em>

I run this command each day and then at the end of the week, I run:

<em>/usr/bin/rsync -auvP –delete /data/* /sync/</em>

The reason that I do this is to keep new information flowing to the /sync disk but remember that there is no cleanup unless you invoke the –delete arguement. Pick your own clean up schedule. This help if you accidentley delete something, you just mount /sync and get it from the previous day.


US $105.01 (0 Bid)
Auction Ends: Saturday Nov-21-2009 17:14:59 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $53.00 (13 Bids)
Auction Ends: Saturday Nov-21-2009 17:21:31 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $94.58
Auction Ends: Saturday Nov-21-2009 18:06:47 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $94.58
Auction Ends: Saturday Nov-21-2009 18:07:19 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $94.58
Auction Ends: Saturday Nov-21-2009 18:08:05 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $95.00
Auction Ends: Saturday Nov-21-2009 20:51:21 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $95.00
Auction Ends: Saturday Nov-21-2009 20:53:05 PST
Bid on this Item   | Buy this Item   | Watch this Item

US $95.00
Auction Ends: Saturday Nov-21-2009 20:53:29 PST
Bid on this Item   | Buy this Item   | Watch this Item

AddThis Social Bookmark Button

Ubuntoo, Ubuntew, Ubunto: Ubuntu, FREE Linux Any Way You Spell It!

July 8th, 2008 admin Posted in Applications, Best Practices, Hardware, How To:, Installation No Comments »

I have had a lot of folks ask me about Ubuntu since I have been a geek since way back. So here’s the short story:

Ubuntu is a free, open source Linux-based operating system that is based on Debian GNU/Linux and has a six month release schedule. Ubuntu ships with the latest GNOME release as well as a selection of server and desktop software that works well from a single installation.

Ubuntu borrows its meaning from the Zulu and Xhosa tribe, which is “humanity towards others”. Ubuntu’s goal is: “Linux for Human Beings”, to make linux affordable and easy to use. Ubuntu is sponsored by Canonical Ltd, which is run by idea man Mark Shuttleworth.

Ubuntu’s orignial project was called: no-name-yet.com. Canonical still uses this domain today!

Download Ubuntu

AddThis Social Bookmark Button