Skip to main content

Posts

Showing posts from March, 2012

Manage GCP bucket using gsutil command

Increase the Swap space in Linux

Add a Swap Partition:



you have created a partition say /dev/sda7 having size 1GB.






[root@den ]# mkswap /dev/sda7 Setting up swapspace version 1, size = 1057092 KiB no label, UUID=5ad400b1-3a7f-449c-9605-c257e56ba381  

[root@den ]# free
total used free shared buffers cached
Mem: 3040320 467800 2572520 0 28032 255368
-/+ buffers/cache: 184400 2855920
Swap: 4289312 0 4289312


The free command above shows around 4GB of swap space. Now lets activate the swap partition.


[root@den ]# swapon /dev/sda7 

[root@den ]# free
total used free shared buffers cached
Mem: 3040320 659016 2381304 0 29296 328196
-/+ buffers/cache: 301524 2738796
Swap: 5346400 0 5346400


Notice that the free memory space rose to around 5GB

To make the changes permanent you can put an entry in the /etc/fstab file as



/dev/sda7 swap swap defaults 0 0


Add a Swap File: 

[root@den ]# dd if=/dev/zero of=/swap_file bs=1024 count=524288
524288+0 records in
524288+0 records out
536870912 bytes (537 MB) copied, 3.79122 s, 142 MB/s
[root@den ]# mkswap /swap_fi…

Install ntop on RedHat Or CentOs 5

Install rpmforge repository: http://wiki.centos.org/AdditionalResources/Repositories/RPMForge  



Or





·         i386 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm

·         x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm






Install DAG's GPG key



rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt



Verify the package you have downloaded



rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm








Install the package



rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm


Installing Ntop :

There is an ntop rpm in the rpmforge repository:

yum install ntop



There is a bug in the /etc/init.d/ntop startscript we need to fix. Open the file in your favorite editor for example vim:

vim /etc/init.d/ntop



change the line at start function from:

daemon $prog -d -L @/etc/ntop.conf
to:

daemon $prog @/etc/ntop.conf -d -L



first time you start ntop you need to set the admin password:

ntop @/etc/ntop.conf



you should now be able to start ntop deamon via:

service ntop start



if you want …