Archive for October, 2009

hdparm get/set SATA/ATA device parameters

Hdparm is a tool that allows you to set IDE device settings. This includes things such as DMA modes, transfer settings and various other settings that can help improve the speed of your hard disks and CDROMs. These settings are not enabled by default, so you will probably want to enable them.

Getting information about your different drives.

Different drives have different capabilities, so in order to configure them you must know what they are capable of doing. # hdparm -i /dev/hdX should give you the information you need (replace hdX with your drive)

hdparm -i /dev/hdd

-i Display the identification info that was obtained from the drive at boot time, if available. This is a feature of modern IDE drives, and may not be supported by older devices.

Benchmarking devices

hdparm -tT

hdparm includes a handy benchmark mode, which should allow you to see how much of a speed. When running a benchmark it is recommended that you close all programs that could interfere with the results.

# hdparm -tT /dev/hdX

You can use the following command to check what your IDE chipset

# lspci |grep -i ide

To enable DMA on a device type the following:

# hdparm -d1 /dev/hda

Now run a benchmark and see how much of an improvement you have received.

SBDavid

Installing OpenVZ

Installing OpenVZ

OpenVZ is operating system-level virtualization based on a modified Linux kernel that allows a physical server to run multiple isolated instances known as containers, virtual private servers (VPS), or virtual environments (VE).

Installing OpenVZ on a CentOS 4 or CentOS 5

Download - http://download.openvz.org/openvz.repo

Import the OpenVZ key

rpm –import http://download.openvz.org/RPM-GPG-Key-OpenVZ

Install the OpenVZ kernel

Depending on which kernel arch you want, simply do:

yum install ovzkernel.i386

or

yum install ovzkernel.x86_64

Reference - http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

1) Examine /etc/grub.conf to ensure the desired kernel is set to be the default,

2) Edit the /etc/sysctl.conf to enable some kernel features that are needed for OpenVZ and

3) Make sure SELINUX is disabled.

Optimizing the EXT3 file system on Linux

There are some things you can do to give ext3 a boost when you just want speed.

Mount Options noatime,nodiratime

noatime
Do not update inode access times on this file system (e.g, for faster access on the news spool to speed up news servers).

nodiratime
Do not update directory inode access times on this filesystem.

This is one of the quickest and easiest performance gains. This mount option tells the system not to update inode access times. This is a good option for web servers, news servers or other uses with high access file systems

Also from the man pages.

commit=nrsec
Sync all data and metadata every nrsec seconds. The default value is 5 seconds. Zero means default.

#
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=164be035-6571-43b4-820e-cef57b74f1dc / ext3 relatime,noatime,nodiratime,errors=remount-ro 0 1

How to fix wget for Fantastico install

If it is wget-1.10.2-3.3.fc5 or wget-1.10.2-8.fc6.1. This version does not honor the “-P” switch.

-P prefix
–directory-prefix=prefix
Set directory prefix to prefix. The directory prefix is the directory where all other files and subdirectories will be saved to, i.e. the top of the retrieval tree. The default is . (the current directory).

Update to the latest versino or An alternate version that we know works is wget-1.10.2-3.2.1

rpm -qa wget ;
wget ftp://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/core/5/
i386/os/Fedora/RPMS/wget-1.10.2-3.2.1.i386.rpm
chattr -ia /usr/bin/wget
rpm -e wget ;
rpm -ivh –force wget-1.10.2-3.2.1.i386.rpm ;
rpm -qa wget ;

You will also want to put wget on /etc/yum.conf’s “exclude=” line (near the start of the file) so the OS doesn’t automatically reinstall the buggy version.

Reference - http://www.netenberg.com/

SBDavid

Creating Custom Name Servers

How to create Custom Name Servers for your domain.

1. Ensure that your domain registrar allows you to create custom nameservers with your domain name.

2. Choose the prefix you wish to use with your domain, e.g. ns1.yourdomain.com ns2.yourdomain.com

3. Set them up using the two IP addresses that you have for DNS at the registrar domain manager. You will need to contact you provider to obtain these IP addreses.

4. Ask your data centre to enter a reverse DNS pointer for your nameservers.

5 .Now–> WHM–>>Server Setup >> Enter ns1.yourdomain.com in the Primary Nameserver field. Hit ‘Assign IP Address’, then hit ‘Add an A Entry for this nameserver’.

6. Repeat this process for Secondary.

Next »