How To Install Awstats In Centos/RedHat/Fedora

By default Centos 4 doesn’t have awstats.

Running yum install awstats, unable to detect awstats installation as it’s not default base and updates repositories from Centos.
In order to overcome this issue, I installed another repositories which is RPMForge.

Installing RPMForge is quite easy. In this case my Centos distro is Centos 4 version.

First we have to install yum-plugin-priorities

# yum install yum-plugin-priorities

To be able to use this plugin, we must enable plugins in our /etc/yum.conf file.

Read more »

Sync Linux Server Time with NTP Daemon

I have web server which serving forum service and it’s powered with few linux web server boxes.

Time accuracy for the forum posting for each server is quite critical. If not, all posting from different server will be mess up.

To keep server time in sync for all servers I install NTP daemon and here is what the step taken on my Linux box :

  1. Install the ntp service if it’s not already installed.

    # yum install ntp

  2. Both UDP port 123 have to be open for incoming and outgoing on the firewall.
  3. Find a reliable close ntp pool server. For default installation ntp server should be
    server 0.pool.ntp.org
    server 1.pool.ntp.org
    server 2.pool.ntp.org

Read more »

Automatically Start Linux Daemons and Services

Normally after I finish installing the Linux OS in my machine, the first sport check I often go through is checking what are service daemons to be enable or disable during boot time. It’s due to Red Hat / Centos come with a lot of services that are pre-configured to run at boot. It’s also to determine that I’m not running unnecessary services that are simply sucking up my precious CPU time and my server resources.

To enable or disable linux daemons and services at boot time on Red Hat/Centos, in your linux console ( after become a su ), I just issue this command :

[root@xxxx xxxx]# setup

From Choose a Tool menu, select the System services –> Run Tool to access the Services menu as below.

service-setup

The following is a list based on one of my testing machine and some of the services may not listed here.

Read more »

Email Server with Linux and Qmail

Web hosting preview for email solution
Email services in todays ICT world is one of must have for every company regardless of small, medium or enterprise the company is.

Linux and open source software is one of the best option in term of software costing, stability and reliability. Mail transfer agent (MTA) like Qmail, Sendmail, Posfix or Exim is among the popular one and I prefer to use  qmail to powered my email servers.

Why qmail?
Qmail is a sendmail replacement and is among the five most popular Unix mail servers on the Internet.

As the nature of open source, email server solution come with another handy software packages to complement with the qmail and it’s free of charge.

Qmail Ingredient
The installation and setup of a qmail based mail server requires list of softwares to work together and once again I remind you, all of the software listed below is free from software licensing fees.

Read more »

Update Linux Box with yum

One of the system administrator daily task is to keep system up to date and my favorite tool is Yum.

What is yum?
Yum is a software package manager and it’s a tool for system administrator to install, update and remove RPM-based packages in linux box. Their ability to check the package dependencies make it easier for system adminisrator to apply patches and to maintain the system up to date.

Yum features include:
* Support for multiple repositories
* Simple configuration
* Dependency calculation
* Fast operation
* RPM-consistent behavior
* Package group support, including multiple-repository groups
* Simple interface

Usage: yum [options] < grouplist, localinstall, groupinfo,
localupdate, resolvedep, erase, deplist, groupremove, makecache,
upgrade, provides, shell, install, whatprovides,groupinstall,
update, repolist,groupupdate, info, search, check-update,
list, remove, clean, grouperase 

Read more »

Security Update: PHP-PEAR

 

Currently I’m working on installing and implementing Kayako supporting ticketing system for my company. As my LAMP seems quite old version, I decided to upgrade my apache + php + mysql on one of my webserver before I install Kayako.

Configuring php with –with-curl option require to upgrade PEAR XML_RPC. Current version have security issue with the PEAR XML_RPC class that allows a remote attacker to run arbitrary PHP code.

Make install in php source, produce an error as below :
[root@webserver php-4.4.7]# make install
Installing PHP SAPI module: apache
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/man/man1/
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - already installed: 1.3.2
[PEAR] Console_Getopt - already installed: 1.2.1
[PEAR] HTML_Template_IT- already installed: 1.1
[PEAR] Net_UserAgent_Detect- already installed: 2.0.1
pear/PEAR requires package “pear/XML_RPC” (version >= 1.4.0), installed version is 1.3.1
Notice: Only variables should be assigned by reference in /usr/local/src/php-4.4 .7/pear/PEAR/Installer.php on line 990
[PEAR] PEAR: Installation failed: invalid package file
[PEAR] Structures_Graph- already installed: 1.0.2
……………..

To upgrade XML_RPC I issue this command :

[root@webserver src]# pear upgrade XML_RPC
downloading XML_RPC-1.5.1.tgz …
Starting to download XML_RPC-1.5.1.tgz (32,215 bytes)
………done: 32,215 bytes
upgrade ok: XML_RPC 1.5.1

Then I reissue make install command in php source :

[root@webserver php-4.4.7]# make install
Installing PHP SAPI module: apache
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/man/man1/
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - upgraded: 1.3.2
[PEAR] Console_Getopt - upgraded: 1.2.1
[PEAR] HTML_Template_IT- already installed: 1.1
[PEAR] Net_UserAgent_Detect- already installed: 2.0.1
[PEAR] PEAR - upgraded: 1.5.0
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] Structures_Graph- already installed: 1.0.2
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/man/man1/
page: phpize.1
page: php-config.1
[root@webserver php-4.4.7]#