How to Force YUM to Exclude Certain Packages
YUM is a package management system for Red Hat Enterprise Linux (RHEL), CentOS, Fedora, and other Red Hat-based Linux operating systems. It is command-line driven and is an easy tool you can use to keep your server updated and install any new software you need.
Normally, when you perform updates, YUM will search the distribution’s online repository and select any newly updated packages for download and installation. These may include everything from Apache web server to the Linux kernel itself.
Most of the time, it is a general good practice to update all of the available packages, but there are times when this may not be ideal. For example, if you know for certain that a new version of a particular package that you have installed will not work with a version of one of your web applications, you may want to delay updating until you have patched your application. Another possible scenario is that you may want to update most of your other packages now but wait until later to update the kernel, which will require a reboot.
YUM has a built-in feature that allows you to exclude a package or group of packages of your choosing. You can either use the exclude function on a long-term basis or for one particular update. To make a long-term change, you should edit your repository file (usually yum.conf). Find the [main] section and add the following line:
Read More >>
How to Increase MySQL Memory Usage Above 4GB

Question: My database server is timing out because MySQL seems to hang once it has used up 4GB of RAM, even though the server is equipped with 6GB. How can I make MySQL take advantage of the full 6GB available?
Answer: If your current server setup involves a 32-bit architecture or even just a 32-bit version of your operating system, the short answer is: you cannot. By design MySQL will not be able to use more than 4GB unless it is running on a 64-bit OS.
If you are running Linux, type ” uname -m ” from the command line to see whether or not you are using a 64-bit version. If you know for a fact that your server actually has 64-bit processors, you can reinstall Linux with a 64-bit kernel.
The other less-drastic measure you may be able to take is to install a PAE (Physical Address Extension) kernel, which will allow your server to access physical address space larger than 4 GB. Some distributions, such as CentOS offer PAE kernel packages that you can easily install.
Source: Webhostingtalk.com
Photo: Flickr
Rolling Your Own Kernel: Pros and Cons
Generally speaking, it is a sound idea to keep the default packages, kernel, and drives installed on your server when you first purchased it or when you first installed your Linux-based operating system. Recompiling a kernel is usually something taken up by adventurers and computer science students. Despite that general trend, there are some rare cases when compiling the Linux kernel from source might be beneficial or necessary.
Pros:
1. Kernels compiled for specific hardware are generally faster.
2. You can exclude modules and other components you do not need.
3. If you have specific requirements, you can add them or even change parts of the source code completely.
Cons:
1. You become responsible for updates, security patches, etc.
2. Something could go terribly wrong if you do not compile a good kernel.
3. It takes a long time and requires a good deal of technological expertise.
It is truly up to the system administrator to decide whether a custom kernel is necessary on a dedicated server. Choose wisely.
Image Source: Wikimedia Commons
Ubuntu 10.04 LTS Server Edition Released
Today Canonical, the company responsible for the popular desktop Linux operating system called Ubuntu, also released their latest server edition, version 10.04 LTS. The “LTS” stands for long-term support, which Canonical will offer for five years (Normal Ubuntu versions are released every six months).
In the Linux server web hosting market, Red Hat (or derivatives like CentOS) has dominated. But Ubuntu promises many new features in an effort to lure business clients from the enterprise server arena.
Among the new features are:
More cloud computing support in Ubuntu Enterprise Cloud
Support from Dell on the PowerEdge-C server line
Five years of free security and maintenance
AppArmor security
Kernel hardening
Virtualization enhancements
Advanced storage capabilities
Mass deployment tools
and more.
Source: Ubuntu.com
Tag: cloud computing, dell, kernel, server, ubuntu, virtualization
Red Hat Enterprise Linux 6.0 Beta Released
As anticipated, the Linux giant Red Hat has released the first beta of the 6th version of its long-awaited enterprise server operating system, Red Hat Enterprise Linux (RHEL). The new OS offers greater server scalability by increasing the strength and performance of KVM hypervisor, its kernel-based virtualization infrastructure.
Rather than a maximum of 16 CPUs under which KVM could run, it now can handle up to 64 and a terabyte of memory. Red Hat also focussed on increasing I/O throughput of the KVM virtual machines.
RHEL will run Linux kernel version 2.6.33 and will also have backwards compatibility with previous versions of RHEL kernels. They will continue to support kernel versions for 7 years. Although RHEL is a commercial Linux distribution that requires licensing, many smaller web servers also run run free and open source versions of it, such as CentOS. Red Hat’s primary business is enterprise-level Linux servers, with an annual revenue of $652 million.
Source: InformationWeek
Tag: cpu, kernel, kvm, linux, operating system, red hat, virtualization
Viewing hardware information in Linux

Question: How do I view hardware information about my Linux server?
Answer: If you are running your own dedicated server, you will be swamped with operating system and software management, network security, and a host of other responsibilities, but you should not neglect the server hardware itself. There are a few common ways that Linux system administrators check their hardware:
1. /proc – This is an entire directory filled with system information. For example, to view information about the server’s CPUs, type from the command line:
# cat /proc/cpuinfo
For RAM information type:
# cat /proc/meminfo
3. System logs – Many of the hardware events will be recorded by the kernel logs. To view hardware information, simply type:
# dmesg
4. lspci – When you need information about internal expansion cards, just type:
# lspci
5. lshw – Finally, for the motherload of all general hardware information, type:
# lshw
How to upgrade CentOS

Question: How do I upgrade my CentOS installation to a higher version?
Answer: Using YUM you can upgrade CentOS with only a few steps.
1. Backup your important data. If most or all of is in a database, make sure to backup all databases.
2. List all of the updates:
# yum list updates
3. Upgrade your distribution:
# yum update
4. Reboot the server:
# reboot
5. Verify that all systems are working:
# uname -a
# netstat -tulpn
# tail -f /var/log/messages
# tail -f /path/to/log/file
# cat /etc/redhat-release
Note: Because the kernel will be upgraded, you will need to reboot the server after completion, so you should plan a scheduled down time when your website(s) will have the least amount of activity.
Source: nixCraft
Tag: centos, kernel, server, update, upgrade, yum
How to schedule a reboot on a Linux server
Automating tasks in Linux is a pretty straightforward process, mainly because the tool used to do it comes with all Linux distributions. It is called Cron, as we mentioned in an earlier post. Cron allows you to automate all sorts of tasks, including reboots. But if you just need to reboot once at a certain time, “at” might suit you well.
Why would you want to schedule a reboot? Usually, you only need to reboot a Linux server after installing a kernel update. Since you can plan such an update ahead of time, the ideal time to reboot would be when most users are not accessing the server. That time, however, might be when you are asleep.
To use “at”, become root and type “at” followed by the time you want the server to reboot:
# at 4am tuesday
This will start the “at” prompt, where you need to type “reboot”.
at> reboot
Press CTRL+D to save your settings. Now your server will reboot at the specified time.
System monitoring with phpSysInfo

Sometimes you just need quick information about your server without having to click through numerous control panel screens or logging via SSH. A small PHP software application, called phpSysInfo, allows you to do just that. Installed like a normal PHP script, you can access a plethora of information about your server, including:
Hostname, Listening IP, Kernel version, Distribution name, Uptime, Current number of users, Load averages, Processors, Devices, Memory, Filesystems, Network usage, and Information about running processes. All of this is presented in a user-friendly graphical format that has a changeable theme.
phpSysInfo is available for Linux, BSD, Winows, OS X, and all UNIX-like operating systems. It is completely web-based and is free software, releated under the GNU GPL. You can download it from sourceforge.net free of charge.
Tag: kernel, linux, memory, network, php, phpsysinfo, software, uptime
Linux file and directory structure

An important part of knowing your Linux server is knowing where directories and files are. Most Linux distributions organize files in a similar manner, following specific standards. It is very different from the Windows file and directory structure, but once you know one Linux setup, you will pretty much know the basic layout of every Linux distribution.
/ The root directory, under which all other directories reside.
/boot Here Linux stores information about booting, including the kernel itself and the bootloader.
/etc Most system-wide configuration files are kept in this directory, particularly those you use for your web server.
/bin, /usr/bin, /sbin All of these are where Linux stores executable files. This is one area where it differs depending on the software and distribution.
Read More >>
Tag: directories, file system, files, kernel, linux, root, server