Tuesday, July 31, 2012

Install VMware-tools for Centos 6.3

At EXSi there, right click on the server > Guest > install/upgrade VMware tools
after that enter to the server console

# mount /dev/cdrom /mnt
# cd /mnt
# cp VMwareTools-xxx.tar.gz  /root/
# cd  /root
# tar -zxvf VMwareTools-xxx.tar.gz
# cd vmware-tools-distrib
# ./vmware-install.pl

just click enter until the end

if you received error saying to locate the c compiler
just make a yum update kernel and kernel-devel, then re-run the installer again

# yum update kernel
# /sbin/shutdown -r now

# ./vmware-install.pl

squidview

download the latest package from 
http://www.rillion.net/squidview/

# tar -xzvf squidview-0.7x.tar.gz
# cd squidview-0.7x

before this, make sure you have all the package needed
# yum groupinstall "Development tools"
# yum install ncurses-static

proceed to compile and install
# ./configure
# make 
# cp Makefile.old Makefile
# make oldgcc
# make install




Wednesday, July 18, 2012

Remove squid cache manually


Stop squid using the command /etc/init.d/squid stop

Next Delete cache directory using rm -rf /var/spool/squid

Create new cache directory using mkdir /var/spool/squid

Change ownership to squid user chown squid:squid /var/spool/squid

Create cache again using the command squid -z

Finally start Squid using the command /etc/init.d/squid start

Friday, July 13, 2012

Clon Hdd for EXSI

Before proceed, first you must enable SSH in EXSi

then you can transfer your own ready make .vmdk by scp or winscp into EXSi
but for myself, i make a standard template in EXSi so i can easily deploy other server in future.

create a new VM but skip the hdd creation 
SSH into EXSi and use this command
# vmkfstools -i <input.vmdk> <output.vmdk>
then edit the VM, add hdd into it but click
use an existing virtual disk and select the newly cron disk

usually the location of the vm is at 
/vmfs/volumes/<random.number>/
so you need to identify out the location

if you re-cron back to the same EXSi server, there might be network problem with the newly cron server because the network card MAC will be different. so you need to go to
/etc/udev/rules.d/70-persistent-net.rules to update your MAC address
you just need to exchange the eth0 with the eth1 and eth1 to eth0

Thursday, July 12, 2012

EXSI SSH Keygen path

The SSH keygen folder in EXSi was located in /.ssh/
You can scp the public key from other server and cat id_rsa.pub » /.ssh/authorized_keys

Minimum HDD size for Centos 6

the minimum hdd space needed for Centos 6 without any package is 4GB:

100MB   -> /boot
2000MB -> /
300MB   -> Swap
200MB   -> /home
500MB   -> /tmp
remain     -> /var


but if you want the minimum hdd space for Centos 6 with base package, it is 5GB:


100MB   -> /boot
3000MB -> /
300MB   -> Swap
200MB   -> /home
500MB   -> /tmp
remain     -> /var

Wednesday, November 23, 2011

Cacti - check memory

To use this script template, perform the following steps:
  1. Download cacti-netsnmp-memory.0.7.tar.gz to a temporary directory on the Cacti server machine.
  2. Expand the archive with the command tar -xvzf cacti-netsnmp-memory.0.7.tar.gz, and change to the cacti-netsnmp-memory directory that is created.
  3. Copy scripts/ss_netsnmp_memory.php to the <cacti>/scripts/ directory.
  4. Access the Cacti installation in a web browser, click on the "Import Templates" menu item on the left side of the Console screen, and import the template/Net-SNMP_memory_graph_template.xml file. Cacti should automatically create the required graph template, data input method, and data template objects.
  5. Click on the Devices menu item on the left side of the Console screen, select a *NIX host that is running Net-SNMP, and scroll down to the "Associated Graph Templates " table. Select "Host Memory - ucd/net - Memory Usage" in the "Add Graph Template " drop-down box, and click the "Add" button.
  6. After the Device screen reloads, verify that the "Host Memory - ucd/net - Memory Usage" graph template is now present, and then click the "Create Graphs for this Host" link at the top of the page.
  7. Locate the "Host Memory - ucd/net - Memory Usage" graph template, enable the checkbox to its right, and then scroll to the bottom of the page and click the "Create" button.
Note: these files are intended to be used with Cacti 0.8.6 and 0.8.7 and PHP 5.2, and may not operate as expected with other versions.

Reference URL http://www.eric-a-hall.com/software/cacti-netsnmp-memory/