August 13, 2010

Simple trick for blocking youtube videos using squid Proxy

Filed under: Uncategorized — admin @ 5:50 am

=========================================================================
Add the following line to /etc/squid/squid.conf
The videos come from several domains so block all
acl blk_youtube dstdomain .youtube.com .metcafe.com
http_access deny blk_youtube
========================================================================

Hide the commands in shell

Filed under: Uncategorized — admin @ 5:48 am

=========================================================================
You can hide the commands entering in the shell by using “stty” command
stty -echo
Now all the commands that you type will be invisible. To disable this, you can use the command
stty echo
========================================================================

Install Packages to the VPS container from the main Node

Filed under: Uncategorized — admin @ 5:35 am

vzpkg install VEID -p yum
VEID = container ID

How to get major information of a server without logging into server?

Filed under: Uncategorized — admin @ 5:25 am

Getting major informations of a server (PHP version | Webserver | Webserver settings etc) without logging into the server

########################################################

[root@twenty ~]# wget -S –spider manoramaonline.com

–16:46:46– http://manoramaonline.com/

=> `index.html.6′

Resolving manoramaonline.com… 209.176.182.132

Connecting to manoramaonline.com|209.176.182.132|:80… connected.

HTTP request sent, awaiting response…

HTTP/1.1 200 OK

Content-Length: 306

Content-Type: text/html

Content-Location: http://manoramaonline.com/BVHome.htm

Last-Modified: Wed, 30 Dec 2009 16:25:38 GMT

Accept-Ranges: bytes

ETag: "b14dfb86c89ca1:2c9"

Server: Microsoft-IIS/6.0

MicrosoftOfficeWebServer: 5.0_Pub

X-Powered-By: ASP.NET

Date: Tue, 10 Aug 2010 11:16:48 GMT

Connection: close

Length: 306 [text/html]

200 OK

August 9, 2010

How to add a swap file in Linux

Filed under: Uncategorized — admin @ 4:19 am

Swap space is defined as a temporary storage  that can be used when
machine’s memory requirements exceeds the size of the RAM available.
Usually size of the swap partition is double of RAM memory.
You can add a swap partition or add a swap file. I would recommend you
to add a swap partition, but sometimes isn’t  easy if you do not have
enough free space. This article explains how to add a swap file to a
Linux system.
Determine the size of the new swap file and multiple by 1024 to find
the block size. For example, the block size of a 128 MB swap file is
131072.
Open the shell prompt as root and type the below command.
dd if=/dev/zero of=/swapfile bs=1024 count=131072
Setup the swap file with the following command:
mkswap /swapfile
To facilitate swap file immediately but not automatically at boot time.
swapon /swapfile
Add the below line in /etc/fstab to enable the swap at boot time.
/swapfile swap swap defaults 0 0
It will enable the new swap file when the next time system boots.
Confirm newly added swap file system by checking the output of the
commands cat /proc/swaps or free

« Newer PostsOlder Posts »

Powered by WordPress