Showing posts with label IT. Show all posts
Showing posts with label IT. Show all posts

7/31/2009

NIC problem in Ubuntu 8.10 Installation

Being a newbie in Linux is pretty challanging. So far I've managed to install 3 webservers and they still running pretty well if I may add :-)
Last week I have my first experience to troubleshoot NIC problem in Ubuntu 8.10 Server installation on my old computer. Its an Intel PIII 800 with 384 RAM, pretty old PC, heh?!

My intention was to build a gateway with Firewall, DNS and DHCP server inside. I'm aware there are many Linux distro that already build to meet my purpose, but since I am a linux newbie, I would like to learn from the basic.

After successfully installed the Ubuntu 8.10 server 2 weeks ago, I left the server untouch for a couple of days becoz of other more urgent matter. When I got back to config the server I realized that the NIC is not functioning. I checked the cable ... It was OK, then check the ifconfig output, it seems OK too, there is eth0 in the list. My thought was maybe the driver was not the right one, then I googling on how to reinstall the NIC driver. I tried several solutions but the problem consist. After some restart, I catch a boot problem concerning the ACPI driver, then my googling change to find out about those ACPI & IRQ problems.

It turned out I have to modified the grub boot loader to disable the ACPI on the Kernel

Change Boot Options Permanently On An Existing Installation
These instructions only apply to systems that use Grub - Ubuntu's default boot loader.

In order to permanently change boot options, you'll need to edit the /boot/grub/menu.lst file.

Before begin, back up the file with a copy that has the current date and time appended to its name:

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.`date +~%b-%d-%Y~%T`

If the system or /boot partition has changed and the user suspects the partition is not correctly identified by Grub, run this command to obtain a list of partition UUIDs. Note the system or /boot UUID and compare it to the entry on the kernel's UUID line once the kernel menu is opened:

sudo blkid

Then edit the menu.lst file:

sudo nano /boot/grub/menu.lst

(You can edit this file with any text editor, doesn't have to be nano) Use your arrow keys to move your cursor to the line that starts with "# kopt=".

Add or subtract whichever boot option(s) you'd like to add to the end of the boot command, with a space between each one. (See Kernel Options below)

Save the file.

For nano:
Press the Ctrl and o (this is the letter o) keys at the same time. Verify that the filename is correct (edit the filename if it's not) and press the ENTER key to save the file.

Press the Ctrl and x keys at the same time to exit the editor.

Type this command to update the menu entries in the system:


sudo update-grub

The command may present a message indicating that a new configuration file available: "Do you want to keep the existing one for menu.lst". Select Use Package Version. If you select to keep the user modified version, your changes to kopt won't be applied to existing boot options.

Note: If you edit the menu entries directly from Grub and not with a text editor your changes will disappear the next time update-grub is run, for instance or when the kernel or grub packages are updated.



Kernel Options
Note: These options are used by the kernel, and will apply to any installation at any time. The file "Documentation/kernel-parameters.txt" in the relevant linux-source package provides more information.


Options:

vga=xxx
Set your framebuffer resolution to VESA mode xxx. Check here for a list of possible modes.



acpi=off OR noacpi
This parameter disables the whole ACPI system. This may prove very useful, for example, if your computer does not support ACPI or if you think the ACPI implementation might cause some problems (for instance random reboots or system lockups).



acpi=force
Activates the ACPI system even if your computer BIOS date is older than 2000. This parameter overwrites acpi=off and can also be used with current hardware if the ACPI support is not activated despite apm=off.



pci=noacpi OR acpi=noirq
These parameters disable the PCI IRQ routing



pci=acpi
This parameter activates the PCI IRQ routing



acpi_irq_balance
ACPI is allowed to use PIC interrupts to minimize the common use of IRQs.



acpi_irq_nobalance
ACPI is not allowed to use PIC interrupts.



acpi=oldboot
Deactivates the ACPI system almost completely; only the components required for the boot process will be used.



acpi=ht
Impact Deactivates the ACPI system almost completely; only the components required for hyper threading will be used.



noapic
Disable the "Advanced Programmable Interrupt Controller (APIC)".



nolapic
Disable the "local APIC".



apm=off OR noapm
Disable the Advanced Power Management.



irqpoll
Changes the way the kernel handles interrupt calls (set it to polling). Can be useful in case of hardware interrupt issues.

There ... after restart my NIC work like it should be, I can run an update
Next step, configure and install softwares ... :-)

9/16/2008

500GB HardDisk for Notebook

WD Scorpio® Blue™

Massive capacity - Whether they are in an external drive or a notebook computer, WD Scorpio Blue SATA drives are available in capacities up to 500 GB and offer the most available capacity for space-hungry operating systems, like Window Vista™, with plenty of room left over for photos, music, and video.


Quiet - In a notebook drive, silence is golden. WD’s exclusive WhisperDrive™ combines state-of-the-art seeking algorithms to yield one of the quietest 2.5-inch hard drives on the market. These algorithms also optimize the way a drive seeks for data, which significantly improves power consumption. So now silence (and longer battery life) is golden.


Reliable and rugged - WD's ShockGuard™ technology protects the drive mechanics and platter surfaces from shocks. WD's SecurePark™ parks the recording heads off the disk surface during spin up, spin down, and when the drive is off. This ensures the recording head never touches the disk surface resulting in improved long-term reliability due to less head wear, and improved non-operational shock tolerance.

Fast and efficient - With 5400 RPM spin speed and 12 ms access time and up to 3 Gb/s SATA interface speed, even the most demanding customer will appreciate the performance achieved by WD Scorpio Blue drives.

Tested for compatibility - We perform tests on hundreds of systems and a multitude of platforms in our FIT Lab™ and Mobile Compatibility Lab to give our customers confidence that our drives will work in their systems.


Ideal For
Portable digital devices of all kinds, including notebook computers, external storage, and digital media players.

source : wdc.com

7/29/2008

Install eAccelerator on Centos 5.2

Still on pursuing to make a fast httpd server, I found eAccelerator at techiecorner.com. Here is what I gathered to install the eAccelerator on my Centos 5.2.

First lookup the latest PHP eAccelerator source distribution from here.
My downloaded version is eaccelerator-0.9.5.2.tar.bz2
Then:

$ tar -jxvf eaccelerator-0.9.5.2.tar.bz2
$ cd eaccelerator-0.9.5.2
$ phpize
$ ./configure
$ make
$ make install
after the last command, it shows this line:
Installing shared extensions: /usr/lib/php/modules/

Now we edit php.ini
$ nano /etc/php.ini
and add these line:

extension="eaccelerator.so"
eaccelerator.shm_size=”16″
eaccelerator.cache_dir=”/tmp/eaccelerator”
eaccelerator.enable=”1″
eaccelerator.optimizer=”1″
eaccelerator.check_mtime=”1″
eaccelerator.debug=”0″
eaccelerator.filter=”"
eaccelerator.shm_max=”0″
eaccelerator.shm_ttl=”0″
eaccelerator.shm_prune_period=”0″
eaccelerator.shm_only=”0″
eaccelerator.compress=”1″
eaccelerator.compress_level=”9″

after saving the php.ini, I created temp folder for the eaccelerator

$ mkdir /tmp/eaccelerator
$ chmod 777 /tmp/eaccelerator

then restart the httpd:

$ httpd -k restart

to manage eAccelerator, I copied control.php
cp /usr/src/eaccelerator-0.9.5.2/control.php /path/to/my/homepage/control.php
when I tried to browse http://comp1/control.php, it asked for password, the default is :

Username : admin
Password : eAccelerator

but then I got "This script isn't in the allowed_admin_path setting" error in some area of the page. After took a peak on my ubuntu server configuration that already running eAccelerator, I added "eaccelerator.allowed_admin_path="/path/to/my/homepage"" so my php.ini now look like this :

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.allowed_admin_path="/path/to/my/homepage"


save the php.ini, then restart the httpd:

$ httpd -k restart

now I can login and manage the eAccelerator

Install PHP-MemCache On CentOS 5.2

I'm a linux newbie, but I want to speed up my webserver access, after googling around for days, I decided to try the php-memcache and I find most of my installation steps ini howtoforge.com. Here is what I did :

Install rpmforge repo
$ wget
http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-*.rpm
$ rpm --install rpmforge-release-*.rpm

Install memcached:
$ yum install --enablerepo=rpmforge memcached
test if memcached is running:
$ memcached -m 512 -u nobody -vv

start up the memcached daemon on as many spare machines as you have. The daemon has no configuration file, just a few command line options, only 3 or 4 of which you'll likely use:
$ ./memcached -d -m 2048 -l 10.0.0.40 -p 11211 -u nobody

This starts memcached up as a daemon, using 2GB of memory, and listening on IP 10.0.0.40, port 11211. The -m switch specifies the amount of memory in megabytes. The -l switch specifies the IP to listen on and finally the -p switch specifies the port to listen on. The default port is 11211 and if your machine has just 1 IP you can omit the -l parameter.

Install PHP MemCache extension
$ cd /usr/src/
$ wget http://pecl.php.net/get/memcache-2.2.3.tgz
$ tar -xvf memcache-2.2.3.tgzcd memcache-2.2.3
$ phpize && ./configure --enable-memcache && make
Copy the file memcache.so to the default module directory.
$ cp /usr/src/memcache-2.2.3/modules/memcache.so
/usr/lib/php/modules/memcache.so

Edit php.ini
$ nano /etc/php.ini
And add this line ini php.ini
extension=memcache.so
Restart Apache2
$ /etc/init.d/httpd restart
Now the php-memcache is installed

7/17/2008

Simple backup of MySQL

Sometimes I need to quick backup my database and download it to my pc, I use mysqldump command to do that and to save time of downloading, i compress it with gzip, here the command :

$ mysqldump -u MySQLuser -pMySQLpassword --opt db-name l gzip -c -9 > /path/to/backup/folder/backup-name.sql.gz

remember not to put spaces between -p and the password

and after i've download it, I create a db-name database in MySQL, and restore the backup using command :

$ gzip -d /path/to/backup/folder/backup-name.sql.gz
$ mysql -u MySQLuser -pMySQLpassword db-name < /path/to/backup/folder/backup-name.sql


remember not to put spaces between -p and the password !!

7/16/2008

Computer Cluster

A computer cluster is a group of linked computers, working together closely so that in many respects they form a single computer. The components of a cluster are commonly, but not always, connected to each other through fast local area networks. Clusters are usually deployed to improve performance and/or availability over that provided by a single computer, while typically being much more cost-effective than single computers of comparable speed or availability.



Cluster types:
High-availability (HA) clusters
High-availability clusters (also known as failover clusters) are implemented primarily for the purpose of improving the availability of services which the cluster provides. They operate by having redundant nodes, which are then used to provide service when system components fail. The most common size for an HA cluster is two nodes, which is the minimum requirement to provide redundancy. HA cluster implementations attempt to manage the redundancy inherent in a cluster to eliminate single points of failure.

Load-balancing clusters
Load-balancing clusters operate by distributing a workload evenly over multiple back end nodes. Typically the cluster will be configured with multiple redundant load-balancing front ends.

Grid computing
Grid computing or grid clusters are a technology closely related to cluster computing. The key differences (by definitions which distinguish the two at all) between grids and traditional clusters are that grids connect collections of computers which do not fully trust each other, or which are geographically dispersed. (The term GRID to denote a distributed computing and storage environment was coined in 1998 by Ian Foster and Carl Kesselman. It refers to the metaphor of the power grid: computing capacity from a wall outlet and no need to install and maintain complex IT infrastructures on every location that needs access to applications.) Grids are thus more like a computing utility than like a single computer. In addition, grids typically support more heterogeneous collections than are commonly supported in clusters.


Source : wikipedia