Skip to main content

Posts

Showing posts from September, 2012

Yet another Nginx story

Last night one of my friend gtalk me and complaining about his vps is slow and lagging. Further checking the process is highly spike where load average: 173.68, 165.51, 146.09 which is abnormal. I'm thinking the MySQL is consuming all the resources and when I try to restart the process it's come to timeout. No chance at all.. I tried to stop httpd, also timeout and kill come to my hand :) kill -9 [processid] After restart httpd, the load is still high around 4 to 6. I plan to replace Apache with latest Nginx and using php-cgi for communicate with PHP. Surprisingly after I start Nginx the process come to 0.35 not even close to 1.. And that how Nginx act as a hero.. yatta~

OpenBSD : Installing Squid

If you don't know what is squid, please don't think that it's a normal squid that live in the sea! Squid is a web proxy / web caching for your gateway/router. The purpose is to cache image,css,js etc that can reduce your router's workload by supplying to the browser directly from your proxy. This can reduce waiting time and make your browsing more fast. Installing # pkg_add -i squid Ambiguous: choose package for squid  a       0:          1: squid-2.7.STABLE9p15          2: squid-2.7.STABLE9p15-ldap          3: squid-2.7.STABLE9p15-ldap-snmp          4: squid-2.7.STABLE9p15-ntlm          5: squid-2.7.STABLE9p15-snmp Your choice: 1 squid-2.7.STABLE9p15: ok                                                                                                                                                         The following new rcscripts were installed: /etc/rc.d/squid See rc.d(8) for details. Look in /usr/local/share/doc/pkg-readmes for extra documenta

OpenBSD 101 - Basic

I got 2 customer that using 2 FreeBSD box serving as their gateway. Both are installed squid to cache their web browsing for the network. It's time to upgrade both of the box, I thinking of using OpenBSD as a gateway to see how OpenBSD perform. I'm working on my virtualbox to test before deploy and implement them :) Basic networking for OpenBSD IP Forwarding: Permanenant: #vi /etc/sysctl.conf Change from: #net.inet.ip.forwarding=1 To net.inet.ip.forwarding=1 You can change it on the spot by issuing the command #sysctl net.inet.ip.forwarding=1 But this will revert to default once you reboot the machine, use permanent then. Setting up IP address : File : /etc/hostname.em0 (depends on your network card) Structure : type address netmask broadcast others #vi /etc/hostname.em0 inet 10.0.0.1 255.255.255.0 NONE Setting interface for DHCP #vi /etc/hostname.em0 dhcp http://www.openbsd.org/faq/faq6.html Once done, restart the ser