How to Increase MySQL Memory Usage Above 4GB

13 Jul, 2010

RAM memory modules
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

(0) Comment Categories : Web servers
Tag: , , , , , , ,

Linux: Commercial vs. Community Distros

5 May, 2010

Server rack
Your server is your baby. You have worked hard to nurture it and prepare it for the world. Now, the question you need to ask yourself is: Do I want my baby to wear brand name clothes or generic ones? Commercial Linux distributions offer the “brand name”, but is that really what your server needs?

Companies like Red Hat, Novell, and IBM offer commercial Linux support with their servers, and many customers could not be happier, but whether or not you should purchase that type of support depends largely on your individual and business needs. Paying for support of a Linux server can be expensive, but it can sometimes be just as expensive or even more so to have a Linux expert on staff.

If you are flying solo or have a small staff that is comfortable supporting Linux alone, you may be just fine with a community distribution like CentOS, Fedora, OpenSuSE, or Debian. If not, you might strongly consider paying for support, which will save you in the long term, even if it seems like a financial loss in the beginning.

(0) Comment Categories : Software, Web servers
Tag: , , , , , ,

How to Install Apache Tomcat in CentOS/Redhat/Fedora

17 Mar, 2010

Apache Tomcat default page

Apache Tomcat is free and open source software that implements a Java-based HTTP web server using Java Servlets and JavaServer Pages (JSP). It is an option to consider when you are implementing a content management system or creating web applications.

There are four main steps to take to get Tomcat ready for use on a dedicated server:

1. Install Java. Note that many Linux distributions will offer Java installations through their package managers. To install on CentOS, see their wiki.

2. Install Tomcat

The easiest option is to install Tomcat from the default YUM repository:

yum install tomcat*

This will provide an older version of Tomcat than is currently available from Apache. If you want the latest, you can download a binary directly from the Apache website.

Source: coreservlets.com
Photo: Wikimedia Commons

(0) Comment Categories : Uncategorized
Tag: , , , , , ,

How to upgrade CentOS

3 Mar, 2010

YUM update 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

(0) Comment Categories : Software, VPS & Dedicated, Web servers
Tag: , , , , ,

How to install OpenVZ with yum

25 Feb, 2010

OpenVZ logoOpenVZ is a free and open source virtualization solution for Linux. Here is an easy guide to installing OpenVZ on Redhat Enterprise Linux, CentOS, or Fedora.

Note: It is recommended that you use an ext2 or ext3 file system if you want per-container disk quota.

1. Add the OpenVZ YUM repository:

# cd /etc/yum.repos.d
# wget http://download.openvz.org/openvz.repo
# rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ

2. Find out which kernel version you need and install it:

# yum install ovzkernel[-flavor]

3. Change the new GRUB bootloader lines created when you installed the kernel to look something like this in /boot/grub/grub.conf:

title OpenVZ (2.6.8-022stab029.1)
root (hd0,0)
kernel /vmlinuz-2.6.8-022stab029.1 ro root=/dev/sda5
initrd /initrd-2.6.8-022stab029.1.img

That’s it! You now have OpenVZ installed. Visit the OpenVZ wiki for more information about configuring your new installation.

Source: OpenVZ Quick Installation

(0) Comment Categories : VPS & Dedicated, Web Hosting
Tag: , , , , , , ,

How to install Nginx via YUM in CentOS

23 Feb, 2010

nginx logoNginx (pronounced “Engine X”) is a lightweight web server that offers speed and flexibility without all of the extra features that larger web servers like Apache offer. Although it is a free and open source application, CentOS does not offer the latest version in its default YUM repository. To install it, you need to add the EPEL (Extra Packages for Enterprise Linux) repository, which is part of the Fedora Project.

1. Install the EPEL repository:

# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-3.noarch.rpm

2. Install nginx

# yum install nginx

3. You will be asked to install the gpg-key for EPEL. Answer yes

4. Start Nginx

# /etc/init.d/nginx start

5. Check the installation by going to your web server’s default site, either using your ip address or domain name.

(0) Comment Categories : Software, Web Hosting, Web servers
Tag: , , , , , ,

How to delete duplicate files in Linux

16 Feb, 2010

terminal icon
Question: Two of my directories on my server have some the same files. How can I easily delete any duplicates while preserving the unique files?

Answer: There exists a Linux tool for just about everything, and this is no exception. You need a tool called fdupes, which searches the path you give it for duplicate files and uses several comparison techniques (sizes, MD5 signatures, byte-by-byte comparison) to find and eliminate duplicates.

First install fdupes. In RHEL/Fedora/CentOS, use the rpmforge repository enter:

# yum install fdupes

To find duplicates in the /etc directory, you would enter:

# fdupes /etc

To force fdupes to prompt you whether to preserve or delete files:

#fdupes -d /etc

As you can see, fdupes might be just what you need to clean up your server and possibly increase that precious disk space.

Source: nixCraft
Photo: Wikimedia Commons

(0) Comment Categories : Software, VPS & Dedicated
Tag: , , , , , , ,

Share file folders on a Linux server

11 Feb, 2010

iFolder running on Mac OS X
Many web-based organizations depend on the ability to communicate and share files easily. Even if you already have a website, however, you might not have an easy way to share files and folders, aside from giving each user FTP or SSH access.

There are proprietary solutions, such as Dropbox or even the new Ubuntu One, but if you want to run such a system on your own server, the clear winner here seems to be iFolder by Novell. By default iFolder server is designed to run only on Novell’s SUSE Enterprise Server or an OpenSUSE server, but because it is open source, some have had success building and running it on CentOS and Ubuntu servers.

On the client side, iFolder supports Linux, Mac OS X, and Windows, making it an ideal cross-platform solution. To run iFolder, your server needs to be running Mono, an open source alternative to .NET, which it already should have if it is a SUSE server. If not, it is available for installation on most Linux distributions. iFolder is free software released under the GNU GPL.

Source: kablink

(0) Comment Categories : Software, Web Hosting, Web servers
Tag: , , , , , , , ,

Monitoring a Linux server with Logwatch

28 Jan, 2010

logwatch installation
On a Linux server, there are numerous separate logs that contain vital information about your web server, mail server, database servers, and other important systems and services. While you could periodically check each log, this is time consuming and will not always identify the problems as they occur.

Logwatch is a free and open source software package for Linux that provides customizable log analysis. It collects the data from all of the logs you specify for a given amount of time and then provides a report of those logs.

Logwatch is available for installation in most Linux distribution repositories. In CentOS, logwatch is installed by default and should be configured and ready to go. For more information about using logwatch, type “man logwatch” from the command line or see the online documentation.

(0) Comment Categories : Software, VPS & Dedicated
Tag: , , , ,

Managing bootup services on Linux servers

27 Jan, 2010

Redhat logoQuestion: Which Linux services should be enabled at boot on a server?

Answer: Most Linux distributions come with more than what you need. They are designed to not only work on servers but also desktop computers, laptops, netbooks, and in some cases, even smaller mobile devices like phones. Because of this there are sometimes numerous services running that you may not need. Similarly, there might be special server-oriented services that you will want to enable.

Security is also an issue. In the past we covered X.org and why it is a bad idea to have it running on a server. There are other services like X.org that might be good for the desktop but are superfluous on a server. The first thing to do is to find out which services are currently running. Execute the following commands:

#service --status-all
#chkconfig --list | grep '3:on'

You can read the rest of the steps in tis process at nixCraft. Everything in the complete how-to article will cover CentOS, Fedora, and Redhat Enterprise Linux.

Source: nixCraft

(0) Comment Categories : Web Hosting, Web servers
Tag: , , , , , ,