How to Change the Timezone in Linux

by admin on November 10, 2009
in Linux, Servers

  1. Logged in as root, check which timezone your machine is currently using by executing `date`. You’ll see something like Mon Nov 9 13:49:01 EST 2009, PST in this case is the current timezone.
  2. Change to the directory /usr/share/zoneinfo here you will find a list of time zone regions. Choose the most appropriate region, if you live in Hong_Kong or the Singapore this directory is the “Asia” directory.
  3. Read more…

Install bandwidth monitor vnstat

by admin on September 5, 2009
in Linux, Servers

vnStat is a network traffic monitor for Linux that keeps a log of daily network traffic for the selected interface(s). vnStat isn’t a packet sniffer. The traffic information is analyzed from the /proc -filesystem, so vnStat can be used without root permissions. However at least a 2.2.x kernel is required.

  1. Install vnStat
    wget http://humdi.net/vnstat/vnstat-1.7.tar.gz
    tar zxvf vnstat-1.7.tar.gz
    cd vnstat-1.7
    make
    make install
  2. Read more…

Block IP Addresses With IPtables & APF

by admin on September 5, 2009
in Security, Servers

Have a user that keeps hammering your FTP or trying to login over and over and over again that you just want to ban and never see again? We’ll show a quick and dirty method to ban an IP address from the server.

We commonly receive questions like:
“I would like to ban that ip address to prevent the access to the server.
how can i ban that Ip address from the server?”

Simple !

Login to the server as root.

  1. If you are running iptables, you can enter:
    iptables -A INPUT -s IP_ADDRESS -j DROP
    Ex: Block IP 68.72.72.25
    iptables -A INPUT -s 68.72.72.25 -j DROP
  2. Read more…

Stop PHP nobody Spammers

by admin on June 25, 2009
in Php, Security, Servers

PHP and Apache has a history of not being able to track which users are sending out mail through the PHP mail function from the nobody user causing leaks in formmail scripts and malicious users to spam from your server without you knowing who or where.

Watching your exim_mainlog doesn’t exactly help, you see th email going out but you can’t track from which user or script is sending it. This is a quick and dirty way to get around the nobody spam problem on your Linux server.

If you check out your PHP.ini file you’ll notice that your mail program is set to: /usr/sbin/sendmail and 99.99% of PHP scripts will just use the built in mail(); function for PHP – so everything will go through /usr/sbin/sendmail =)

Requirements:
We assume you’re using Apache 1.3x, PHP and Exim. This may work on other systems but we’re only tested it on a Cpanel/WHM Red Hat Enterprise system. Read more…

Installing Lighttpd With PHP5 Support On CentOS

by admin on June 15, 2009
in Servers

Lighttpd is a secure, fast, standards-compliant web server designed for speed-critical environments. This tutorial shows how you can install Lighttpd on a CentOS 5.0 server with PHP5 support (through FastCGI) and MySQL support.

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Afterwards, we can install Lighttpd like this:

yum install lighttpd Read more…

Script to daily email APF status

by admin on June 15, 2009
in Security, Servers

You are running APF on your server, but sometimes you think “is APF running fine ?
This script sends you an email with APF satus.

Log in to your server as root

Create the script:
nano apfstatus.sh

Put this on the file:
#!/bin/bash

tail -200 /var/log/apf_log | mail -s "APF Status" youemail@domain.com

Save and Exit
Ctrl+X and Y
Read more…

How To remote backup with rsync

by admin on June 14, 2009
in Linux, Servers

This is probably the simply way to backup data to other server using a secure protocoal an minimum bandwidh.

Note:
BackupServer.com – Is the backup server
MainServer.com – Is the server you want to backup

  1. Login to the server you want to backup
  2. Creating a key with the ssh-keygen utility:
    ssh-keygen -t rsa -N '' (these are two single quotes)
  3. Copy RSA encryption key to the backup server:
    scp ~/.ssh/id_rsa.pub username@backupserver.com:keys/server1
    ssh username@backupserver.com mergekeys

Read more…

How to run PHP 4 and 5 on Cpanel

by admin on June 13, 2009
in Domain/Hosting, Php, Servers

This information is helpful for hosting companies that want to run PHP 4 & 5 on the same cPanel server. After this, Hosting costumers / cPanel users should choose what version of PHP will they use on theirs scripts.

You should consider some implications on your server performance, but webhosts are using because they don’t need two server to run the different PHP versions for different costumers.

How to run PHP 4 and 5 on the same Cpanel server
Read more…

How To Install cPanel on a VPS Server

by admin on June 13, 2009
in Domain/Hosting, Servers, Vps

This post is a mini how to, and will help to simply install cPanel on you VPS server. Note that cPanel needs 128 MB to work, but we recommend 256MB.

  • Login to your VZMC to get inside your server
  • Create a new VPS with the Sample Ve Config call vps.cpanel
  • Now you should select the ips you want to use in that VPS and the dns servers.
  • Select RedHat Enterprise Template (you dont need to select any addon for cpanel), and select the Space / Memory / CPU
  • Read more…

How To Install ImageMagick

by admin on June 12, 2009
in Php, Servers

What is ImageMagick ?

ImageMagick is a software suite for image manipulation and display, supporting close to 100 image formats, it is mainly used to perform various transformation and conversion operations on images.

How To Install ImageMagick: Read more…

Next Page »