Archive

Archive for the ‘Linux’ Category

Squid Proxy Server Mac Address based filtering

June 16th, 2010 admin No comments

To set up ACL’s based on MAC address:

Open squid.conf:

# vi /etc/squid/squid.conf

Local acl, section and append ACL as follows:

acl macf1 arp mac-address
acl macf2 arp 00:11:22:33:44:55
http_access allow macf1
http_access allow macf2
http_access deny all

Save and close the file. Restart squid server:

# /etc/init.d/squid restart

How to disable SELinux in CentOS?

June 16th, 2010 emran No comments

In Fedora Core and RedHat Enterprise or CentOS, edit /etc/selinux/config and change the SELINUX line to SELINUX=disabled

That’s all.

Increase Private Memory Size on OpenSIPS

June 8th, 2010 admin 2 comments

By default the size of private memory chunk used by each OpenSIPS process is 1 MB.

To increase the size of private memory you need to compile OpenSIPS from sources. Once you get the sources from SVN or the opensips.org’s download site, do the following steps:

- edit the file “config.h” and search for the next lines:

/*used only if PKG_MALLOC is defined*/
#define PKG_MEM_POOL_SIZE 1024*1024

- change the value of PKG_MEM_POOL_SIZE to desired size, for example to have 4MB of private memory:

#define PKG_MEM_POOL_SIZE 4*1024*1024

- recompile and reinstall OpenSIPS

make all; make install;

Categories: Linux, OpenSIPS Tags:

Increase Share Memory Size on OpenSIPS

June 8th, 2010 admin No comments

To increase the share memory size use ‘-m’ command line parameter of OpenSIPS.

opensips -m 256

# this will run OpenSIPS with 256MB of share memory

Categories: Linux, OpenSIPS Tags:

How to make money from Twitter

June 7th, 2010 admin No comments
If you have a twitter account with many followers or just a few, you still can make money through a Twitter advertising company called Ad.ly.

You set the price and once an advertiser is interested to put an ad in your tweet, you’ll earn money. For how much? It depends on how much price you have set.

Categories: CMS, Linux, Others, PHP Tags:

Git Tutorial

June 7th, 2010 emran No comments

You have to download your project and place to a folder.

$ tar xzf project.tar.gz
$ cd project
$ git init-db

This will initialize your project on git.now you have to add files which will monitored via git.

$ git add .

these means git will monitor all files.

$ git commit -a

This will prompt a message to commit.
Try modifying some files, then run

$git diff

to review your changes.

Categories: CentOS, Linux Tags:

How to create tar.gz?

December 19th, 2009 emran No comments

You can create tar.gz file with the following command.DO NOT ENTER / after the directory name.

tar -cvzf  test.tar.gz test

Raising the ulimit -n above 1024

November 7th, 2009 emran No comments
by default the ulimit is set to 1024 only, first u need to increase system wise with

“fs.file-max = 65536″

adding this one in sysctl.conf

and then “sysctl -p”

switch to /etc/securitty/limits.conf and add ther following lines

* hard nofile 65536
* soft nofile 16384

switch 2 user for which u need to increase the file-max for, with this the default for all users will be 16384,

u can increase with ulimit -n XXXX now

Categories: Linux Tags:

How to Install Perl CPAN Module

October 14th, 2009 emran No comments

From the root prompt on your server, invoke the CPAN shell:

# perl -MCPAN -e shell

Once the Perl interpreter has loaded (and been configured), you can install modules with: install MODULENAME.

The first thing you should do is upgrade your CPAN:

cpan> install Bundle::CPAN

Once it is completed, type:

cpan> reload cpan

Now, enter the following command to retrieve all of the required modules:
cpan> install DateTime

Note

Be aware that after freshly installing make / gcc, your perl installation will not necessarily detect it. This means module installation will still fail during the 'make' stage. You may need to invoke the CPAN shell and run the setup routine again, to point to the location of make:
# perl -MCPAN -e shell CPAN

 

cpan> o conf make /usr/bin/make
cpan> o conf commit

Categories: CentOS, Debian, Fedora, Linux, Mandrake, SuSE Tags:

How to open Unlimited Socket in linux?

October 7th, 2009 emran No comments

execute this in your shell before you start Application

ulimit -c unlimited
ulimit -d unlimited
ulimit -f unlimited
ulimit -i unlimited
ulimit -n 999999
ulimit -q unlimited
ulimit -u unlimited
ulimit -v unlimited
ulimit -x unlimited
ulimit -s 244
ulimit -l unlimited

5 visitors online right now
5 guests, 0 members
Max visitors today: 8 at 11:34 pm UTC
This month: 8 at 09-03-2010 11:34 pm UTC
This year: 43 at 06-10-2010 04:02 pm UTC
All time: 43 at 06-10-2010 04:02 pm UTC