How to setup MRTG on Centos (RHEL) 4.x and 5.x?

MRTG stands for "Multi Router Traffic Grapher", and it is a tool to monitor the traffic load on the network interfaces. It generates HTML pages containing PNG images which depicts visual representation of inbound and outbound traffic. MRTG is free software designed by Tobi Oetiker and is licensed under the Gnu GPL. Most Linux distributions include MRTG as an RPM package, which you can install; or download the latest copy from the official MRTG website. You may also install MRTG on Windows platform.

Read more

Share

Howto add fonts on openSuSE 10.2 – how to install new fonts in SuSE 10.2

On a SuSE 10.2 system – fonts are in:

/usr/share/fonts/

Copy your new fonts into one of the already existing sub-folders depending on type of fonts to be added, then run in consol:

/usr/sbin/fonts-config

To finalize the activation of your newly installed fonts you need to restart your X-server

Ctrl + Alt + backspace will kill the X-Server – after restart the fonts will be available.

Share

How to Tar / Untar From the Command Line

A simple guide for those who are as helpless on the Linux command line. When managing websites, you’ll often need to compact, move and extract a large number of files, here’s how to do it on your Linux box.

Initial Steps
First SSH into your web server and move to the directory of the files you wish to tar up, since tarring an absolute path will save the folder structure as well which is bad (ie: /home/yoursite/public_html/backupthis/ will save the folders home -> yoursite -> public_html -> backupthis). You can get to the folder you need to by typing:

cd /path/to/your/stuff

Creating a Tar
Now that we’re at the directory we want to tar, or the sub-directory, you can do one of two commands depending on what you need.

If you want to save every file / folder in your current location into a file called backup.tar.

tar -cvf backup.tar *

If you want to save a tar named backup.tar with the folder “somefolder” and its contents.

tar -cvf backup.tar somefolder/

You can test/view your tars with the following command:

tar -tvf backup.tar

Extracting the Tar
When you need to extract that tar, the following command will be suffice:

tar -xvf backup.tar

Share

Howto Install PHP GD (PHP Graphics) support in Ubuntu / Debian

PHP is not limited to creating just HTML output. It can also be used to create and manipulate image files in a variety of different image formats, including GIF, PNG, JPEG, WBMP, and XPM. Even more convenient, PHP can output image streams directly to a browser. You need to install GD Library for this purpose. Simply you can do this.
If you have a LAMP (PHP. APACHE and Mysql) Installation in your System , you can install GD library using the following .

in Ubuntu /Debian Install the package.

apt-get install php5-gd

Share

Squid proxy server with user authentication

If you are planning to set up proxy authentication program, using squid+webmin it’s quite simple-

  1. Click “Authentication Program” icon on webmin
  2. Enter the following infos in the right boxes-
    Basic authentication program- /usr/lib/squid/pam_auth

    Number of authentication programs- 5

    Authentication cache time- 5 Hrs

  3. Back to squid index
  4. Click “Access Control” icon
  5. Under “Access Control List” click on “Create new ACL” button while selecting “External Auth”
  6. In the next window- enter ACL name as “AUTHENTICATED” (remember this is case sentative!
  7. Click save
  8. Click return to index
  9. Click “Apply changes”
  10. If needed restart squid if changes doesnt work

Now your user should be getting an, authentication window!

Test it, by creating a linux user and password in the squid server and insert them in the browser panel!

Share

Install Ubuntu 8.04.2 (32 bit) Server

It is recommended to use a clean (fresh) Ubuntu 8.04 LTS install where you selected no additional packages or servers during setup. :

1) Prepare your OS
*******************************************************************************
Become root user by executing:
___
sudo su
___

and entering the password of the user that you created during setup.

Edit the file /etc/apt/sources.list and comment out the line beginning with “deb cdrom:….”, then run:
___
apt-get update
apt-get -u upgrade
___

Read more

Share

Installing Proftpd on Suse Linux 11.0

It was a really time consuming to make a workable daemon of proftp server. Surprisingly, this daemon is not a easily setup by other linux disto like FC or CentOS or RHL.  Anyway, the purpose on installing this is to make it work with Webmin+Virtualmin package. So, this installation will be handy for Webmin/Virtualmin guys! Remember, this is a manual installaiton. So, let’s start!

Read more

Share

Apache htaccess and htpasswd

In order to protect a site or a directory using Apache htaccess and htpasswd files follow the steps-

1. Creating .htaccess file and putting the following code-

AuthUserFile /your/abosolute/path/to/this/file/.htpasswd
AuthGroupFile /dev/null
AuthName "Protected files"
AuthType Basic
<Limit GET>
require valid-user
</Limit>

2. Create a .htpasswd in the same directory as .htaccess and put your generated code. Now the big question how to get a ‘generated code’. Apache used bas_64 encoding. A good web based generator is-

http://www.htaccesstools.com/htpasswd-generator/

Save the file.

And here you go! Your site is protected!

Share