web analytics

Posts Tagged ‘centos’

Squid3 configuration for multiple ip adresses and users with basic http auth, transparent proxy

Written by config on . Posted in CentOS, Linux, Ubuntu


So for example you’ve decided to setup squid and you would like to let your users connect and authenticate via simple http auth and you also would like each user to use different ip address. How can you achieve that with squid3?
I’m going to show you a very simple squid configuration that will let you to setup the proxy in a few minutes on your own machine and let your users use dedicated ip. In this example I’m configuring squid to be transparent and use non standart port so that when someone will try to probe your user ip it won’t find squid easily on its default ports listening. That is how they will know your user is using a proxy.
The example shown here tested on Ubuntu Server 12.04 but I guess it will work on any other linux distribution as long as you installed Squid3

tail: inotify cannot be used

Written by config on . Posted in CentOS, Linux, Ubuntu

If you get the following error:

tail: inotify cannot be used, reverting to polling: Too many open files

you can adjust these values in your sysctl.conf:

fs.inotify.max_user_watches = 1280000
fs.inotify.max_user_instances = 512

If you do not have those, just add it and run /sbin/sysctl -p

Setting up Squid Proxy server on RHEL 5 / CentOS 5 linux

Written by config on . Posted in CentOS, Linux

Proxy is one of the major component of adding security to the network. It also acts as a Gateway that receives the request from the clients and then validates it, when it is fine it forwards it to the destination server.

Squid is one of the most popular Open Source Proxy server and a Web Cache Daemon.

It has the wide variety of features from:

1. Speeding up a web server by caching repeated requests.

2. Caching Web, DNS, and other lookups.

3. Controlling bandwidth, Access controlling, etc.

This article explains how to setup Squid Proxy server in your RHEL 5 / CentOS 5 in a easy step-by-step procedure.

Configuring VSFTPD in CentOS‭ ‬6.0

Written by config on . Posted in CentOS, Linux

Configuring VSFTPD in CentOS‭ ‬6.0

vsftpd stands for‭ ‬Very‭ ‬Secure‭ ‬File‭ ‬Transfer‭ ‬Protocol‭ ‬Daemon and it is an popular and well known FTP server for Unix-like‭ (‬Linux‭) ‬Operating system.

It is Licensed under GNU General Public License.

In this tutorial we cover how to configure‭ ‘‬vsftpd‭’ FTP server ‬on CentOS‭ ‬6.0.


We assume that you are using CentOS‭ ‬6‭ (‬Linux operating system based on RedHat Distribution‭)‬.
And using‭ ‬vsftpd‭ ‬version‭ ‬2.2.2
Your system is connected to Internet via any means.

How to install LAMP on CentOS 6 server

Written by config on . Posted in CentOS, Linux

In this guide I will show you how to install standard LAMP stack on CentOS 6 server. I don’t think there is a huge difference between this setup or the one you probably did in the past on CentOS 5 or Fedora servers (to those of you who actually use Fedora servers).
I still think this tutorial can be helpful for some and that is the reason I’m still publishing this. This is a very easy tutorial with a step by step easy approach. So lets begin with the setup:

First of all you must have CentOS 6 installed and configured, by configured I mean it should be connected to the network and in working condition. No special packaged or configuration needed, you just have to be make sure yum is working and you can install packages from the repositories.

Finding large files on Linux distributions

Written by config on . Posted in Linux

Finding large files on all operating systems is a daily task for systems administrators around the world, it serves a lot of purposes.
I will show multiple ways to do it on various Linux distribution. Simple and makes your life easier.

Pay attention to the size in all examples – change it according to your needs.

RPM Based distributions: Red Hat, Centos, Fedora

Specify path:

find {/path/to/location/} -type f -size +{size-in-kb}k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

Example for specific path:

find /home/http/logs -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

Current Dir:

find . -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

Debian or Debian based ( Ubuntu and various other deb based distros )

Specify path:

find {/path/to/location} -type f -size +{file-size-in-kb}k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

Current Dir:

find . -type f -size +10000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

Largest files in directory:

ls -lSh | less

du -xakh .|sort -n|tail -10

du -k | sort -n | perl -ne 'if ( /^(\d+)\s+(.*$)/){$l=log($1+.1);$m=int($l/log(1024)); printf                 ("%6.1f\t%s\t%25s  %s\n",($1/(2**(10*$m))),(("K","M","G","T","P")[$m]),"*"x (1.5*$l),$2);}'

find . -type f -print0 | xargs -0 ls -lSh | head -10

Cpanel 11.30 on Centos 6.0

Written by config on . Posted in Linux

Cpanel updated its offering on the Centos even before Centos released a new version, but it seems like Cpanel itself can’t get its stuff straight. As of today (after a week of tries and failures) it is finally possible to install Cpanel on Minimal installation of Centos 6.0 without installing perl or anything else manually on the server before running Cpanel installation script (“latest”). Cpanel uses a very interesting approach here, they are downloading their own perl package with perl 5.8.8 (which is the perl used in Centos 5.0 if I’m not mistaken). I’m sure they got their own reasons but I would love to hear a decent explanation on that.