<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>existence, refactored &#187; Hardware</title>
	<atom:link href="http://blog.bryanbibat.net/category/daily-entry/hardware-daily-entry/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bryanbibat.net</link>
	<description>With kindness comes naïveté. Courage becomes foolhardiness. And dedication has no reward.</description>
	<lastBuildDate>Sun, 05 Feb 2012 16:22:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Learn how to setup a web server pt3: Installing MySQL and PHP apps (e.g. WordPress)</title>
		<link>http://blog.bryanbibat.net/2012/01/12/learn-how-to-setup-a-web-server-pt3-installing-mysql-and-php-apps-e-g-wordpress/</link>
		<comments>http://blog.bryanbibat.net/2012/01/12/learn-how-to-setup-a-web-server-pt3-installing-mysql-and-php-apps-e-g-wordpress/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 04:24:45 +0000</pubDate>
		<dc:creator>Bry</dc:creator>
				<category><![CDATA[Brain Dumps]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[PHP-FPM]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.bryanbibat.net/?p=1503</guid>
		<description><![CDATA[Here&#8217;s a quick update to this mini-tutorial. Previous parts can be found here and here. Installing MySQL Installing MySQL is so simple that I don&#8217;t need to hide it behind the cut. The one in the Ubuntu repositories work just fine: $ sudo apt-get install mysql-server-5.1 Note that you will be asked to enter a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bryanbibat.net/images/wordpress-installed.jpg" class="aligncenter" alt="WordPress Installed" /></p>
<p>Here&#8217;s a quick update to this mini-tutorial. Previous parts can be found <a href="http://blog.bryanbibat.net/2011/12/17/learn-how-to-setup-a-web-server-pt1-setting-up-a-practice-server/">here</a> and <a href="http://blog.bryanbibat.net/2011/12/19/learn-how-to-setup-a-web-server-pt2-installing-nginx-and-php">here</a>. </p>
<h3>Installing MySQL</h3>
<p>Installing <a href="http://www.mysql.com/">MySQL</a> is so simple that I don&#8217;t need to hide it behind the cut. The one in the Ubuntu repositories work just fine:</p>
<pre>$ sudo apt-get install mysql-server-5.1</pre>
<p>Note that you will be asked to enter a root password somewhere in the installation.</p>
<p>To wrap up the installation run</p>
<pre>$ sudo mysql_install_db</pre>
<p>to initialize the installed server and</p>
<pre>$ sudo mysql_secure_installation</pre>
<p>to secure it. </p>
<p>In <code>mysql_secure_installation</code>, you&#8217;ll be asked for your root password and then you&#8217;ll asked if you want to change it. Just enter &#8220;n&#8221; since there&#8217;s no reason to change it this early. Then you&#8217;ll be asked if you want to do some things to secure the database which is, of course, what we want to do so just hit Enter for each question to choose the default answer (&#8220;Y&#8221;).</p>
<p><span id="more-1503"></span><br />
<h3>Installing WordPress</h3>
<p>Now we go to making our Ubuntu + nginx + PHP + MySQL setup more useful by installing a web app. I choose <a href="http://wordpress.org/">WordPress</a> for this tutorial because it&#8217;s both popular and easy to install.</p>
<p>Note that most PHP web apps out there have similar installation steps i.e. install prerequisites, setup database, download and extract files, and configure the app.</p>
<p><strong>Installing prerequisites</strong></p>
<p>We only need to install a few extra components for WordPress to work on our box:</p>
<pre>$ sudo apt-get install php5-mysql php5-gd</pre>
<p><code>php5-mysql</code> is obviously required to allow PHP to connect to MySQL. <code>php5-gd</code> may be needed if you&#8217;re uploading images inside WordPress instead of using an external hosting.</p>
<p>At this point we are ready to follow the <a href="http://codex.wordpress.org/Installing_WordPress">Installing WordPress</a> guide.</p>
<p><strong>Creating the database</strong></p>
<p>I&#8217;ve switched around steps 1 and 2 because I prefer to do file-related tasks together instead of jumping from files to database to files again.</p>
<p>In setting up the database, we go with the client guide. Creating a new user isn&#8217;t part of that guide, though, so we&#8217;ll have to do that too.</p>
<p>Connect to the database using the root user:</p>
<pre>$ mysql -u root -p</pre>
<p>You will be prompted for the password before you can proceed. Once in, you can now proceed with doing what you need to do. The following lines will create a database named <code>wp</code> and a user named <code>wp_user</code> whose password is <code>password_here</code>.</p>
<pre>mysql> CREATE DATABASE wp;

mysql> CREATE USER wp_user;

mysql> SET PASSWORD FOR wp_user = PASSWORD("password_here");

mysql> GRANT ALL PRIVILEGES ON wp.* TO "wp_user"@"localhost" IDENTIFIED BY "password_here";

mysql> FLUSH PRIVILEGES;

mysql> EXIT</pre>
<p><strong>Downloading WordPress and moving it around</strong></p>
<p>Now it&#8217;s time to proceed with steps 1 and 3. Use <code>wget</code> to download and extract the latest version of WordPress:</p>
<pre>$ wget http://wordpress.org/latest.tar.gz

$ tar -zxvf latest.tar.gz</pre>
<p>We&#8217;ll then move the extracted folder <code>wordpress/</code> to <code>/var/www/</code> to centralize our web-app stuff.</p>
<pre>$ sudo mv wordpress /var/www/</pre>
<p>We also need to change the ownership for the folder:</p>
<pre>$ sudo chown -R www-data:www-data /var/www/wordpress</pre>
<p><strong>Configuring it to work</strong></p>
<p>First we need to add our database settings to <code>wp-config.php</code>:</p>
<pre>$ cd /var/www/wordpress

/var/www/wordpress$ sudo mv wp-config-sample.php wp-config.php

/var/www/wordpress$ sudo vim wp-config.php</pre>
<p>Change the settings as follows:</p>
<pre>// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wp');

/** MySQL database username */
define('DB_USER', 'wp_user');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');</pre>
<p>Now to edit our nginx settings.</p>
<pre>$ sudo vim /etc/nginx/nginx.conf</pre>
<p>We&#8217;ll be using a combination of suggested settings from both nginx and WordPress documents:</p>
<pre>
...
    server {
        listen       80;
        server_name *.mysite.dev;
        root /var/www/wordpress;

        if ($http_host != "mysite.dev") {
                rewrite ^ http://mysite.dev$request_uri permanent;
        }

        # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
        location ~ /\. {
                deny all;
                access_log off;
                log_not_found off;
        }

        location = /favicon.ico {
                log_not_found off;
                access_log off;
        }

        location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }

        location / {
                # This is cool because no php is touched for static content
                try_files $uri $uri/ /index.php;
        }

        location ~ \.php$ {
                include fastcgi_params;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_pass php;
        }

        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires max;
                log_not_found off;
        }
    }
}
</pre>
<p>The main changes here are the update to the root (pointing it now to <code>/var/www/wordpress</code>) and the <code>try_files</code> approach of URL rewriting (which allows nginx to act like <code>mod_rewrite</code> without the use of <code>.htaccess</code>).</p>
<p><strong>Wrapping up</strong></p>
<p>Restart both PHP-FPM and nginx to apply the changes we made to both.</p>
<pre>$ sudo /etc/init.d/php5-fpm restart

$ sudo /etc/init.d/nginx restart</pre>
<p>Then go to <code>http://mysite.dev</code> to proceed with the &#8220;famous 5-minute install&#8221;.</p>
<p><img src="http://www.bryanbibat.net/images/wordpress-install.jpg" class="aligncenter" alt="WordPress Installer" /></p>
<p><img src="http://www.bryanbibat.net/images/wordpress-installed.jpg" class="aligncenter" alt="WordPress Installed" /></p>
<p>You have now successfully installed WordPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bryanbibat.net/2012/01/12/learn-how-to-setup-a-web-server-pt3-installing-mysql-and-php-apps-e-g-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Learn how to setup a web server pt2: Installing Nginx and PHP</title>
		<link>http://blog.bryanbibat.net/2011/12/19/learn-how-to-setup-a-web-server-pt2-installing-nginx-and-php/</link>
		<comments>http://blog.bryanbibat.net/2011/12/19/learn-how-to-setup-a-web-server-pt2-installing-nginx-and-php/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 09:41:14 +0000</pubDate>
		<dc:creator>Bry</dc:creator>
				<category><![CDATA[Brain Dumps]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[ApacheBench]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[PHP-FPM]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.bryanbibat.net/?p=1486</guid>
		<description><![CDATA[Here&#8217;s the next part of my basic web server administration tutorial. At the first part, we set up the virtual machine. Now we&#8217;ll be setting up the web server itself. Set Static IP Address and fake Domain Name Before we could proceed with installing our web server, let&#8217;s do a couple of things to make [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bryanbibat.net/images/phpinfo.png" class="aligncenter" alt="phpinfo()" /></p>
<p>Here&#8217;s the next part of my basic web server administration tutorial.</p>
<p><a href="http://blog.bryanbibat.net/2011/12/17/learn-how-to-setup-a-web-server-pt1-setting-up-a-practice-server/">At the first part</a>, we set up the virtual machine. Now we&#8217;ll be setting up the web server itself.</p>
<p><strong>Set Static IP Address and fake Domain Name</strong></p>
<p>Before we could proceed with installing our web server, let&#8217;s do a couple of things to make our server behave more like a &#8220;normal&#8221; server.</p>
<p>First is to set our server&#8217;s <a href="http://en.wikipedia.org/wiki/IP_address#IP_address_assignment">IP address</a> to a static IP address. There are a bunch of ways to do this (e.g. change the router settings), but we&#8217;ll just go with changing our server&#8217;s settings</p>
<p>Running <code>ifconfig</code> and <code>route</code> will give us the current IP address and <a href="http://en.wikipedia.org/wiki/Gateway_%28telecommunications%29">gateway</a>.</p>
<p><img src="http://www.bryanbibat.net/images/ip-route.png" class="aligncenter" alt="ifconfig and route" /></p>
<p>In this case, the new IP address is 192.168.1.125 and the gateway is 192.168.1.5. We can now apply these settings to <code>/etc/network/interfaces</code>. Open the said file via:</p>
<pre>$ sudo vim /etc/network/interfaces</pre>
<p>(For this tutorial, I&#8217;ll be using <a href="http://en.wikipedia.org/wiki/Vim_%28text_editor%29"><code>vim</code></a> as the default text editor. If you find vim too daunting, you can replace all instances of <code>vim</code> with <a href="http://en.wikipedia.org/wiki/Nano_%28text_editor%29"><code>nano</code></a>)</p>
<p>It will look something like:</p>
<pre># This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp</pre>
<p>Now replace the last line with the following:</p>
<pre>iface eth0 inet static
address [address here]
netmask 255.255.255.0
gateway [gateway here]</pre>
<p>for example:</p>
<pre>iface eth0 inet static
address 192.168.1.125
netmask 255.255.255.0
gateway 192.168.1.5</pre>
<p>To make sure you got the static IP settings correctly, you can restart the server via</p>
<pre>$ sudo shutdown -r now</pre>
<p>or you could just simply restart the network interface:</p>
<pre>$ sudo /etc/init.d/networking restart</pre>
<p>Here we see the <code>/etc/init.d</code> folder where the <a href="http://en.wikipedia.org/wiki/Init">init</a> scripts (like networking) are placed. Aside from being executed automatically upon boot to start services, they can also be used to stop or restart the said services just like what we just did with <code>networking</code>. We will see more of <code>/etc/init.d/</code> later in this tutorial.</p>
<p>Now that we&#8217;ve set the IP address as static, it&#8217;s time to set a fake <a href="http://en.wikipedia.org/wiki/Domain_name">domain name</a>.</p>
<p>Normally, when you&#8217;ve got a server with a static IP address, you&#8217;d have to go and buy a domain name from a registrar like <a href="http://www.namecheap.com/">Namecheap</a> and you&#8217;d go through the steps in linking that name with the IP address and waiting for the DNS propagation.</p>
<p>For this tutorial, we&#8217;re going to skip all that by faking it with the <a href="http://en.wikipedia.org/wiki/Hosts_%28file%29">hosts file</a>.</p>
<p>First let&#8217;s update the server&#8217;s <code>/etc/hosts</code> file to add our fake domain name &#8220;mysite.dev&#8221;:</p>
<pre>sudo vim /etc/hosts</pre>
<p>Add the line at the end:</p>
<pre>192.168.1.125   mysite.dev</pre>
<p>You can verify the new setting by using the <a href="http://en.wikipedia.org/wiki/Ping"><code>ping</code></a> command.</p>
<pre>user@ubuntu:~$ ping -c 4 mysite.dev
PING mysite.dev (192.168.1.125) 56(84) bytes of data.
64 bytes from mysite.dev (192.168.1.125): icmp_seq=1 ttl=64 time=0.172 ms
64 bytes from mysite.dev (192.168.1.125): icmp_seq=2 ttl=64 time=2.38 ms
64 bytes from mysite.dev (192.168.1.125): icmp_seq=3 ttl=64 time=3.34 ms
64 bytes from mysite.dev (192.168.1.125): icmp_seq=4 ttl=64 time=1.59 ms

--- mysite.dev ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3016ms
rtt min/avg/max/mdev = 0.172/1.874/3.342/1.161 ms
user@ubuntu:~$</pre>
<p>Now let&#8217;s apply the fake domain name mapping to the host Windows computer. Like in Linux, the hosts file in Windows requires admin privileges so we first need to run the text editor as Administrator in order to allow us to modify it.</p>
<p><img src="http://www.bryanbibat.net/images/run-as-admin.png" class="aligncenter" alt="Run as administrator" /></p>
<p>Right-click Notepad and select &#8220;Run as administrator&#8221;. Once open, you can now add the &#8220;<code>192.168.1.125 mysite.dev</code>&#8221; to the end of the <code>C:\Windows\System32\drivers\etc\hosts</code> file.</p>
<p>Now you could change the PuTTy settings to use &#8220;mysite.dev&#8221; instead of the actual IP address.</p>
<p>The actual installation of the web server below the cut.</p>
<p><span id="more-1486"></span><br />
<h3>Installing Nginx</h3>
<p>It&#8217;s finally time to install the web server.</p>
<p>We won&#8217;t be using <a href="http://en.wikipedia.org/wiki/Apache_HTTP_Server">Apache</a>, though. Instead, we&#8217;re going to go with its leaner and faster Russian counterpart <a href="http://en.wikipedia.org/wiki/Nginx">nginx</a>. We&#8217;re also going to build it from scratch (as opposed to getting it from a repository) to show you how its done in Linux machines.</p>
<p><strong>Installing dependencies</strong></p>
<p>We&#8217;ll need to install a few things before we could proceed with building nginx.</p>
<pre>$ sudo apt-get install build-essential libssl-dev libpcre3-dev</pre>
<p><code>build-essential</code> contains the essential tools for compiling programs from source while the other two are libraries that nginx needs during compilation.</p>
<p><strong>Building from source</strong></p>
<pre>~$ wget http://nginx.org/download/nginx-1.0.11.tar.gz</pre>
<p>Using <a href="http://en.wikipedia.org/wiki/Wget"><code>wget</code></a> we download the <a href="http://nginx.org/en/download.html">latest stable source</a> as of this writing. Yes, it&#8217;s a whopping 700 KB.</p>
<pre>~$ tar zxvf nginx-1.0.11.tar.gz</pre>
<p>We then unpack it using <a href="http://en.wikipedia.org/wiki/Tar_%28file_format%29"><code>tar</code></a>.</p>
<pre>~$ cd nginx-1.0.11

~/nginx-1.0.11$ ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module

~/nginx-1.0.11$ make

~/nginx-1.0.11$ sudo make install</pre>
<p>Now we finally perform the build/installation. This three-step configure-build-install scheme is pretty much how one builds any program in Linux from scratch.</p>
<p>This nginx build doesn&#8217;t come with an init script so we&#8217;ll have to download <a href="https://github.com/JasonGiedymin/nginx-init-ubuntu">one off the net</a>.</p>
<pre>~/nginx-1.0.11$ cd ~

~$ wget https://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx

~$ sudo mv nginx /etc/init.d/nginx</pre>
<p>We still need to set a couple of things with the script:</p>
<pre>$ sudo chmod +x /etc/init.d/nginx

$ sudo chown root:root /etc/init.d/nginx</pre>
<p>The first command <a href="http://en.wikipedia.org/wiki/Chmod">sets the script to executable</a> and the other command <a href="http://en.wikipedia.org/wiki/Chown">gives the ownership of the script</a> to root. Now we can run nginx:</p>
<pre>$ sudo /etc/init.d/nginx start</pre>
<p>You can now open <a href="http://mysite.dev">http://mysite.dev</a> to check if it&#8217;s installed properly.</p>
<p><img src="http://www.bryanbibat.net/images/nginx-test.jpg" class="aligncenter" alt="nginx" /></p>
<p>Using Firebug or Chrome Developer tools will confirm the server&#8217;s really nginx 1.0.11.</p>
<p><img src="http://www.bryanbibat.net/images/nginx-headers.png" class="aligncenter" alt="nginx response headers" /></p>
<p><strong>Tweaking nginx</strong></p>
<p>Before we proceed with installing PHP, let&#8217;s apply some tweaks to nginx to make it more Apache-ish (lol) and then some.</p>
<pre>$ sudo ln -s /usr/local/nginx/conf /etc/nginx</pre>
<p>This creates <a href="http://en.wikipedia.org/wiki/Symbolic_link">a symbolic link</a> in the <code>/etc</code> folder to match with the <a href="http://en.wikipedia.org/wiki/Unix_directory_structure">convention for configuration files</a>.</p>
<pre>$ sudo vim /etc/nginx/nginx.conf</pre>
<p>Now we edit the configuration file like so:</p>
<pre>user  www-data;
worker_processes  1;

pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    gzip on;
    gzip_buffers 16 8k;
    gzip_disable "MSIE [1-6]\.";
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;
    error_log  /var/log/nginx/error.log  debug;

    sendfile        on;
    keepalive_timeout  3;
    index              index.html index.htm;

    server {
        listen       80;
        server_name *.mysite.dev;
        root /var/www;

        if ($http_host != "mysite.dev") {
                rewrite ^ http://mysite.dev$request_uri permanent;
        }

        # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
        location ~ /\. {
                deny all;
                access_log off;
                log_not_found off;
        }

    }

}
</pre>
<p>A quick summary of the changes:</p>
<ul>
<li>We changed the server&#8217;s user from &#8220;nobody&#8221; to the system user &#8220;www-data&#8221;, the default user for web servers.</li>
<li>We set the file where the <a href="http://en.wikipedia.org/wiki/Process_identifier">PID</a> for the server would be located. This will allow our init script to stop or restart the server.</li>
<li>We enabled gzip for supported browsers to dramatically reduce the bandwidth usage.</li>
<li>We set the log to match Apache&#8217;s format.</li>
<li>We defined a handler for the <code>*.mysite.dev</code> domain, defining its root to be the same as Apache&#8217;s (<code>/var/www</code>)</li>
</ul>
<p>Now to wrap things up:</p>
<pre>$ sudo cp -r /usr/local/nginx/html /var/www

$ sudo chown -R www-data:www-data /var/www</pre>
<p>We copy the <code>html</code> folder to <code>/var/www</code> and give it to <code>www-data</code>.</p>
<pre>$ sudo mkdir /var/log/nginx</pre>
<p>Just creating the log folder.</p>
<pre>$ sudo /etc/init.d/nginx destroy

$ sudo /etc/init.d/nginx start</pre>
<p>We force stop the server (as we haven&#8217;t defined the PID file when we started it) then start it normally.</p>
<p>Opening <a href="http://mysite.dev">http://mysite.dev</a> now shows us that the site is served as gzipped.</p>
<p><img src="http://www.bryanbibat.net/images/nginx-gzip.png" class="aligncenter" alt="nginx response headers" /></p>
<h3>Installing PHP-FPM</h3>
<p>Unlike nginx, we won&#8217;t be building PHP from scratch. We will, however, not go with Apache&#8217;s mod_php/extension route and instead go the <a href="http://php-fpm.org/">PHP-FPM</a> route which, like nginx, is much leaner than the former.</p>
<p>Since PHP-FPM isn&#8217;t available in the official apt repositories of Ubuntu 10.04, we will have to use another repository. Nginx&#8217;s repositories may be a bit out of date (PHP v5.3.5 vs the current v5.3.8) but it should be enough for this tutorial.</p>
<pre>$ sudo apt-get install python-software-properties

$ sudo add-apt-repository ppa:nginx/php5

$ sudo apt-get update

$ sudo apt-get install php5-fpm</pre>
<p>The steps above will install PHP-FPM with fairly decent defaults. If you want to change some settings, you can modify the files at <code>/etc/php5/fpm/</code> and restart the server via &#8220;<code>sudo /etc/init.d/php-fpm restart</code>&#8220;.</p>
<p>Now all we need to do is to tell nginx how to use PHP-FPM. Here&#8217;s our modified <code>/etc/nginx/nginx.conf</code>:</p>
<pre>user  www-data;
worker_processes  1;

pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    gzip on;
    gzip_buffers 16 8k;
    gzip_disable "MSIE [1-6]\.";
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;
    error_log  /var/log/nginx/error.log  debug;

    sendfile        on;
    keepalive_timeout  3;
    index              index.php index.html index.htm;

    upstream php {
        server 127.0.0.1:9000;
    }

    server {
        listen       80;
        server_name *.mysite.dev;
        root /var/www;

        if ($http_host != "mysite.dev") {
                rewrite ^ http://mysite.dev$request_uri permanent;
        }

        # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
        location ~ /\. {
                deny all;
                access_log off;
                log_not_found off;
        }

        location ~ \.php$ {
                include fastcgi_params;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_pass php;
        }
    }
}
</pre>
<p>The main changes between the original are:</p>
<ul>
<li>Adding &#8220;<code>index.php</code>&#8221; before &#8220;<code>index.html index.htm</code>&#8221; to let the server prioritize the former over the latter.</li>
<li>The addition of the <code>upstream php</code> block that points to PHP-FPM.</li>
<li>The addition of the <code>location</code> handler for PHP files.</li>
</ul>
<p>We also need to modify <code>/etc/nginx/fastcgi_params</code>, adding the following lines at the end of the file:</p>
<pre>fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;</pre>
<p>Once done we can now restart the server via <code>sudo /etc/init.d/nginx restart</code>.</p>
<p>To test PHP, create the <code>phpinfo()</code> index.php file:</p>
<pre>$ sudo sh -c 'echo "&lt;? phpinfo();" &gt; /var/www/index.php'</pre>
<p>Then open <a href="http://mysite.dev">http://mysite.dev</a> again:</p>
<p><img src="http://www.bryanbibat.net/images/phpinfo.png" class="aligncenter" alt="phpinfo()" /></p>
<p>You have now installed nginx and PHP on your web server.</p>
<h3>Benchmarking</h3>
<p>You can use <a href="http://en.wikipedia.org/wiki/ApacheBench">ApacheBench</a> to see how well your site performs under load.</p>
<pre>$ sudo apt-get install apache2-utils</pre>
<p>Here&#8217;s 1000 requests with 100 concurrent users (10 requests each user) to our static HTML file:</p>
<pre>user@ubuntu:~$ ab -n 1000 -c 100 http://mysite.dev/index.html
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking mysite.dev (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests

Server Software:        nginx/1.0.11
Server Hostname:        mysite.dev
Server Port:            80

Document Path:          /index.html
Document Length:        151 bytes

Concurrency Level:      100
Time taken for tests:   1.720 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      378290 bytes
HTML transferred:       157795 bytes
Requests per second:    581.31 [#/sec] (mean)
Time per request:       172.025 [ms] (mean)
Time per request:       1.720 [ms] (mean, across all concurrent requests)
Transfer rate:          214.75 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       27   79  15.7     84     102
Processing:    39   83  16.5     86     131
Waiting:       10   61  17.5     65      98
Total:        129  161  16.5    172     184

Percentage of the requests served within a certain time (ms)
  50%    172
  66%    173
  75%    173
  80%    173
  90%    178
  95%    182
  98%    183
  99%    183
 100%    184 (longest request)</pre>
<p>Here&#8217;s the same test against our <code>phpinfo()</code> page:</p>
<pre>user@ubuntu:~$ ab -n 1000 -c 100 http://mysite.dev/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking mysite.dev (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests

Server Software:        nginx/1.0.11
Server Hostname:        mysite.dev
Server Port:            80

Document Path:          /
Document Length:        42481 bytes

Concurrency Level:      100
Time taken for tests:   8.582 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      42649000 bytes
HTML transferred:       42481000 bytes
Requests per second:    116.52 [#/sec] (mean)
Time per request:       858.186 [ms] (mean)
Time per request:       8.582 [ms] (mean, across all concurrent requests)
Transfer rate:          4853.19 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    6  16.6      0      63
Processing:    66  810 126.3    861     875
Waiting:       59  808 127.0    858     873
Total:        125  816 113.2    861     875

Percentage of the requests served within a certain time (ms)
  50%    861
  66%    862
  75%    863
  80%    864
  90%    869
  95%    874
  98%    874
  99%    875
 100%    875 (longest request)</pre>
<p>581 and 116 requests per second? Not bad for a &#8220;low end&#8221; server.</p>
<p><a href="http://blog.bryanbibat.net/2012/01/12/learn-how-to-setup-a-web-server-pt3-installing-mysql-and-php-apps-e-g-wordpress/" title="Learn how to setup a web server pt3: Installing MySQL and PHP apps (e.g. WordPress)">Proceed to part 3: Installing MySQL and WordPress</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bryanbibat.net/2011/12/19/learn-how-to-setup-a-web-server-pt2-installing-nginx-and-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Learn how to setup a web server pt1: Setting up a practice server</title>
		<link>http://blog.bryanbibat.net/2011/12/17/learn-how-to-setup-a-web-server-pt1-setting-up-a-practice-server/</link>
		<comments>http://blog.bryanbibat.net/2011/12/17/learn-how-to-setup-a-web-server-pt1-setting-up-a-practice-server/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 04:12:03 +0000</pubDate>
		<dc:creator>Bry</dc:creator>
				<category><![CDATA[Brain Dumps]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://blog.bryanbibat.net/?p=1475</guid>
		<description><![CDATA[So you want to be a bit productive this holiday/winter/end-of-year break and decide to learn how to setup your own website. But for some odd reason you don&#8217;t want to settle with a free website service like WordPress or even a cPanel managed shared hosting site. Instead, you want to know how to setup your [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bryanbibat.net/images/virtualbox-manager.png" class="aligncenter" alt="VirtualBox" /></p>
<p>So you want to be a bit productive this holiday/winter/end-of-year break and decide to learn how to setup your own website. </p>
<p>But for some odd reason you don&#8217;t want to settle with a free website service like <a href="http://wordpress.com/">WordPress</a> or even a cPanel managed <a href="http://dreamhost.com/web-hosting/">shared hosting site</a>. Instead, you want to know how to setup your own web server, something like a <a href="http://www.linode.com/">Linode VPS</a> or an <a href="http://aws.amazon.com/ec2/">Amazon EC2</a> instance.</p>
<p>Luckily for you, I&#8217;m having a bit of a writer&#8217;s block and I have time to write about how to learn setting up a Linux server without having to pull out your credit card.</p>
<p><strong>What this post is all about</strong></p>
<p>In this post, we&#8217;ll just discuss how to set up a virtual server on your computer. </p>
<p>Yes, that&#8217;s right. We&#8217;re not installing a server OS on a spare machine, nor are we dual-booting: we&#8217;ll be setting up a server in your desktop, running the former inside the latter. This is <a href="http://en.wikipedia.org/wiki/Virtualization#Hardware">virtualization</a>, <a href="http://knowyourmeme.com/memes/xzibit-yo-dawg">dawg</a>.</p>
<p>We&#8217;ll be creating a server with somewhat similar specs to what you&#8217;d get if you sign up for <a href="http://prgmr.com/xen/">$8 a month at prgmr.com</a>. This simulated environment will be enough for a newbie to learn the ropes in server management.</p>
<p><strong>What you need</strong></p>
<p>Any relatively modern desktop or laptop computer will do. For this series of posts, I&#8217;ll be forgoing the use of my quad-core gaming rig and instead use my laptop (dual-core @ 2.1GHz with 3GB RAM). For the sake of the majority of the readers, I&#8217;ll be using Windows 7 as the OS though the steps will almost be the same when using Windows XP and Vista, and will still be similar even when using Linux or OSX.</p>
<p>You also need to be connected to a network, preferably one that gives out local IP addresses via a DHCP server. In other words, a home/office router. Fast internet also helps as you need to download >700MB worth of installer data.</p>
<p>As for the software, you will need to download <a href="https://www.virtualbox.org/">VirtualBox</a> and a CD image (.iso) for <a href="http://www.ubuntu.com/download/server/download">Ubuntu Server 10.04.3 Long Term Support 32-bit</a>. The VirtualBox download and installation is pretty straightforward, but for the Ubuntu Server 10.04.3, you may want to choose <a href="http://www.ubuntu.com/download/ubuntu/alternative-download#bt">downloading via BitTorrent</a> for faster download speed.</p>
<p>Unlike Linux and OSX users who already have it built in on their terminals, Windows users will also have to download an SSH client like <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTy</a>, the one that you&#8217;ll see in this tutorial. </p>
<p><span id="more-1475"></span><strong>Creating a Virtual Machine</strong></p>
<p>Once you&#8217;ve installed VirtualBox, it&#8217;s time to create a new virtual machine. Click the New button and use the following settings:</p>
<ul>
<li>Name: <em>any name</em>, I named mine &#8220;ServerTest&#8221;</li>
<li>OS Type: Linux, Version: Ubuntu</li>
<li>Base Memory Size: 256MB</li>
<li>Start-up Disk: Create new hard disk (VDI, Dynamically Allocated, 6GB)</li>
</ul>
<p>Before we start installing Ubuntu Server, we&#8217;ll have to change some settings (right-click machine -&gt; Settings, or just click the Settings button).</p>
<p><img src="http://www.bryanbibat.net/images/IDE-drive.png" class="aligncenter" alt="mount the image" /></p>
<p>In the Storage settings, select the &#8220;Empty&#8221; CD/DVD drive under the IDE Controller then set the Ubuntu Server image as the current CD by clicking the CD icon in the Attributes area on the right side.</p>
<p><img src="http://www.bryanbibat.net/images/bridged-network.png" class="aligncenter" alt="change to bridged adapter" /></p>
<p>In the Network settings, change the network adapter from NAT to Bridged Adapter. This will allow your virtual machine to get a local IP address from the router, in turn allowing it to behave as though it was a real server connected to the network.</p>
<p>Click Ok to apply the changes.</p>
<p><strong>Installing Ubuntu Server 10.04.3 LTS</strong></p>
<p>Upon starting the machine (right-click machine -&gt; Start, or just click the Start button), the system will boot the Ubuntu Server installer. The steps here are pretty straightforward:</p>
<ul>
<li>Arrow and Tab keys and move the cursor/selection while Enter key &#8220;clicks&#8221; the selected option. The Space Bar &#8220;ticks&#8221; the selected option in certain pages.</li>
<li>There are times when VirtualBox seems to &#8220;hold&#8221; the mouse pointer. You press the Right Ctrl Key to make VirtualBox &#8220;let go&#8221; of the pointer.</li>
<li>Select &#8220;English&#8221; and &#8220;Install Ubuntu Server&#8221;. This will initiate the actual installer.</li>
<li>Select &#8220;English&#8221;, &#8220;Philippines&#8221;</li>
<li>Say &#8220;No&#8221; to the Detect Keyboard Layout then simply choose &#8220;USA&#8221;, &#8220;USA&#8221;</li>
<li>Choose a host name. The default &#8220;ubuntu&#8221; is fine.</li>
<li>Choose a host name of your choice. The default &#8220;ubuntu&#8221; is fine.</li>
<li>Asia/Manila is the correct time zone (&#8220;Yes&#8221;)</li>
<li>Choose the default options for setting up the drive partitions (&#8220;Guided &#8211; use entire disk and set up LVM&#8221;, first drive, &#8220;Yes&#8221;, &#8220;6.2GB&#8221;). Select &#8220;Yes&#8221; when asked if you wish to continue.</li>
<li>Your full name can be anything. On the other hand, your user name and password are important because it&#8217;s what you use for logging in. For this tutorial, I used the username &#8220;user&#8221; and a simple password (ignore security for now).</li>
<li>Continuing our disregard for security, we skip encryption of the home folder as well as setting up automatic updates.</li>
<li>Don&#8217;t tick anything for installation. We&#8217;ll do it manually later.</li>
<li>Say &#8220;Yes&#8221; to installing GRUB.</li>
</ul>
<p>Once the whole thing is finished, select &#8220;Continue&#8221;. This will restart the machine and somehow it will boot using our freshly installed OS and skip the CD for now. Now is a good time to go to the settings and change the CD drive to &#8220;Empty&#8221; again via the &#8220;Remove disk from virtual drive&#8221; option.</p>
<p>Enter the user name and password to login.</p>
<p><img src="http://www.bryanbibat.net/images/command-line.jpg" class="aligncenter" alt="after login" /></p>
<p>Congratulations, you now have a working virtual server.</p>
<p><strong>Installing SSH server</strong></p>
<p>When we&#8217;re managing servers, we rarely have direct physical access to the machine hardware.</p>
<p>For this tutorial, we&#8217;ll use <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a> to manage the server pseudo-remotely. Not only will this simulate how one usually manages rented servers (as every VPS and cloud solution uses it), this will also get around the ugly and slow to respond server console that VirtualBox displays to us. </p>
<p>First step is to actually install the SSH server. Enter the following commands in the server console:</p>
<pre>$ sudo apt-get update
$ sudo apt-get install openssh-server
</pre>
<p>The first command will ask for your password. This is because <a href="http://en.wikipedia.org/wiki/Sudo"><code>sudo</code></a> tells Linux to run the command as the &#8220;super user&#8221;, hence allowing us to do things that are typically restricted from normal users. Later <code>sudo</code> prefixed commands will not require re-entering the password until the OS &#8220;forgets&#8221; you (e.g. you don&#8217;t use sudo for a certain amount of time).</p>
<p>The two commands above are used to install packages (e.g. programs or libraries) in Debian variants of Linux. The first command, <code>apt-get update</code>, updates the local database of available packages for download and installation by browsing the repositories defined in the <code>/etc/apt/sources.list</code> (the official repositories for your installed OS are enabled here by default). </p>
<p><img src="http://www.bryanbibat.net/images/apt-get-install.jpg" class="aligncenter" alt="installation prompt" /></p>
<p>The second command, <code>apt-get install</code>, installs the list of packages that you pass to it, including the packages&#8217; dependencies. As you can see here, <code>openssh-server</code> requires <code>libwrap0</code> and <code>tcpd</code>. Enter &#8220;y&#8221; to proceed with installation. (Pressing Enter without entering anything does the same thing. This is because &#8220;Y&#8221; is the default answer as denoted by its capitalization in the yes-or-no &#8220;Y/n&#8221;.)</p>
<p>Once installed, you can now remotely connect to the machine via SSH.</p>
<p><strong>Remote management via SSH</strong></p>
<p>Before you can connect to your server, you must first identify its local IP address. This should be included in the system information that you get upon logging in.</p>
<div class="wp-caption"><img src="http://www.bryanbibat.net/images/ip-address-sysinfo.jpg" class="aligncenter" alt="system information" /></p>
<p class="wp-caption-text">in this case the IP address is 192.168.1.116</p>
</div>
<p>If you didn&#8217;t take note of the IP address or if the system failed to provide it, you can still get it via the <code>ifconfig</code> command.</p>
<p><img src="http://www.bryanbibat.net/images/ifconfig.jpg" class="aligncenter" alt="ifconfig" /></p>
<p>You can now connect to it via PuTTY as long as you know the IP address.</p>
<p><img src="http://www.bryanbibat.net/images/putty2.png" class="aligncenter" alt="connection settings" /></p>
<p>Before you connect, you may want to change some settings (e.g. changing the font to Consolas) and saving the session for future use.</p>
<p><img src="http://www.bryanbibat.net/images/putty.png" class="aligncenter" alt="connection settings" /></p>
<p>Linux and OSX users can simply use the built in SSH client installed in their terminals with the following command:</p>
<p><code>$ ssh <em>username</em>@<em>ip-address</em></code></p>
<p>Upon connecting to your server, both PuTTy and the terminal client will tell you the server fingerprint and will ask if you want to proceed. Obviously you&#8217;d want to proceed. Then you&#8217;ll be asked for your login credentials. Enter them to continue.</p>
<p><img src="http://www.bryanbibat.net/images/putty3.png" class="aligncenter" alt="connected" /></p>
<p>Now you&#8217;re connected to the server via an SSH client. Not only does your terminal look prettier than the one provided by the server, you can also copy-paste things from the clipboard now.</p>
<p><strong>Learn the terminal</strong></p>
<p>For terminal newbies, it&#8217;s now a good time to learn command line commands. Go to Zed Shaw&#8217;s command line crash course <a href="http://learncodethehardway.org/cli/book/cli-crash-course.html">Controlling Your Computer From The Terminal</a> and run through the whole thing.</p>
<p>And this ends this part of the tutorial. We will leave installing web server components to the later parts.</p>
<p>To shutdown your server, you can use the <code>shutdown</code> command:</p>
<pre>$ sudo shutdown -h now</pre>
<p><a href="http://blog.bryanbibat.net/2011/12/19/learn-how-to-setup-a-web-server-pt2-installing-nginx-and-php/">Proceed to part 2: Installing Nginx and PHP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bryanbibat.net/2011/12/17/learn-how-to-setup-a-web-server-pt1-setting-up-a-practice-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Latest Trends in Open Source Web Technologies</title>
		<link>http://blog.bryanbibat.net/2011/11/28/latest-trends-in-open-source-web-technologies/</link>
		<comments>http://blog.bryanbibat.net/2011/11/28/latest-trends-in-open-source-web-technologies/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 12:04:23 +0000</pubDate>
		<dc:creator>Bry</dc:creator>
				<category><![CDATA[Brain Dumps]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[public talk]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.bryanbibat.net/?p=1443</guid>
		<description><![CDATA[Last talk for the year (barring a possible surprise talk at Code Retreat): a talk about current trends in web technologies at DevCon UPHSD. This time it&#8217;s a 20 minute talk that I had to drag out to 40+ minutes to cover for the missing speakers. Good thing I wasn&#8217;t pressured to deliver it in [...]]]></description>
			<content:encoded><![CDATA[<p>Last talk for the year (barring a possible surprise talk at Code Retreat): a talk about current trends in web technologies at DevCon UPHSD. This time it&#8217;s a 20 minute talk that I had to drag out to 40+ minutes to cover for the missing speakers. Good thing I wasn&#8217;t pressured to deliver it in English.</p>
<p>So yeah, we had 2 missing speakers, leaving <a href="http://www.linkedin.com/pub/alvin-edwald-chan/12/3aa/a09">Alvin</a> and I to handle everything.</p>
<p>But surprisingly, this DevCon event was far better than the one in DLSU (<em>read: a more prestigious university</em>) mainly because the students were really interested in what the two of us have to say. Sure, our talks may have been boring for most of the audience, but by the time we left the campus, we&#8217;ve fielded over a dozen questions, mostly from students who approached us after the event ended.</p>
<p>In comparison, AFAIK, only one student asked a question in DLSU. </p>
<p>Pride? Apathy? I really don&#8217;t know.</p>
<p>Anyway, here&#8217;s my talk and the slides.</p>
<p><iframe width="480" height="360" src="http://www.youtube.com/embed/CmX1U0IvgOc" frameborder="0" allowfullscreen></iframe></p>
<div style="width:425px" id="__ss_10353220"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/bryanbibat/latest-trends-in-open-source-web-technologies" title="Latest Trends in Open Source Web Technologies" target="_blank">Latest Trends in Open Source Web Technologies</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/10353220" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/bryanbibat" target="_blank">bryanbibat</a> </div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.bryanbibat.net/2011/11/28/latest-trends-in-open-source-web-technologies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notable CD-R King Items Holidays 2011 Edition</title>
		<link>http://blog.bryanbibat.net/2011/11/03/notable-cd-r-king-items-holidays-2011-edition/</link>
		<comments>http://blog.bryanbibat.net/2011/11/03/notable-cd-r-king-items-holidays-2011-edition/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 02:36:37 +0000</pubDate>
		<dc:creator>Bry</dc:creator>
				<category><![CDATA[Brain Dumps]]></category>
		<category><![CDATA[Follow-Up]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[buying guide]]></category>
		<category><![CDATA[CD-R King]]></category>

		<guid isPermaLink="false">http://blog.bryanbibat.net/?p=1433</guid>
		<description><![CDATA[It&#8217;s been almost two and a half years since my post about hidden gems within the multitude of (often crappy) products found in CD-R King. Since that post, I&#8217;ve found a couple of new interesting finds worth a blog post. No, there won&#8217;t be any obvious things here (e.g. the laptop, netbook, tablet, etc). I [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been almost two and a half years since <a href="http://blog.bryanbibat.net/2009/06/13/notable-cd-r-king-items/">my post</a> about hidden gems within the multitude of (often crappy) products found in <a href="http://www.cdrking.com/">CD-R King</a>. Since that post, I&#8217;ve found a couple of new interesting finds worth a blog post.</p>
<p>No, there won&#8217;t be any obvious things here (e.g. the <a href="http://www.cdrking.com/index.php?mod=products&#038;type=view&#038;sid=9442&#038;main=104">laptop</a>, <a href="http://www.cdrking.com/index.php?mod=products&#038;type=view&#038;sid=9821&#038;main=104">netbook</a>, <a href="http://www.cdrking.com/index.php?mod=products&#038;type=view&#038;sid=10327&#038;main=104">tablet</a>, etc). I prefer not-so-obvious items that are mostly relevant to my interests.</p>
<p><span id="more-1433"></span>&#8211;</p>
<p>Ignoring the recent thing with the floods in Thailand, upgrading your hard drive is probably the most practical upgrade you can do with your computer nowadays regardless if you&#8217;re using a laptop or a desktop. Mechanical hard drives are getting more efficient in terms of capacity while SSD&#8217;s are getting cheaper and faster. </p>
<p>Unfortunately, there&#8217;s the problem with what to do with the old hard drives. For instance, when I bought a 2TB drive, I had enough storage space to replace 3 of my hard drives. So then I had 3 hard drives that I didn&#8217;t have any use for.</p>
<p>At this point you might guess &#8220;oh he&#8217;s going to suggest buying <a href="http://www.cdrking.com/index.php?productstype=All+Products&#038;searchvalue=enclosure&#038;x=0&#038;y=0&#038;mod=products&#038;type=search">an enclosure</a>&#8220;. </p>
<p>Sorry, but no. Enclosures are ok if you just have one disk drive on hand. But if you&#8217;ve got a bunch of SATA drives, changing drives can be a hassle: you need to open the enclosure to replace the HDD inside.</p>
<p>What I&#8217;d suggest is to consider getting <a href="http://www.cdrking.com/index.php?productstype=All+Products&#038;searchvalue=dock&#038;x=0&#038;y=0&#038;mod=products&#038;type=search">a docking station</a>.</p>
<p><img src="http://www.bryanbibat.net/images/sata_dock.jpg" alt="SATA dock" class="aligncenter" /></p>
<p>Yes, it&#8217;s basically a device that turns your spare SATA HDDs into huge flash drives (or diskettes, if you&#8217;re from my generation). </p>
<p>At USB 2.0 speed, you&#8217;d get around 32MBps transfer speeds which is good enough for backup purposes but too slow for general IO-heavy program use. If you&#8217;ve got a motherboard that supports USB 3.0, you may want to check <a href="http://www.cdrking.com/index.php?mod=products&#038;type=view&#038;sid=10522&#038;main=165">this one</a> out as it supports that newer standard. </p>
<p>&#8211;</p>
<p>What if instead of upgrading your hard drive, you instead upgrade your video card to an <a href="http://www.amd.com/us/products/technologies/amd-eyefinity-technology/Pages/eyefinity.aspx">Eyefinity</a>-equipped AMD card hoping to get some of that single-card <a href="http://blog.bryanbibat.net/2011/08/01/development-pc-build-for-august-2011/">triple monitor action</a>.</p>
<p>But what if you chose to get three non-<a href="http://en.wikipedia.org/wiki/DisplayPort">DisplayPort</a> monitors and you didn&#8217;t read the online discussions saying that you need at least one DisplayPort monitor to enable triple monitor mode?</p>
<p>Or what if you do get a DisplayPort monitor, say any of these <a href="http://www.tipidpc.com/viewitem.php?iid=11930320">two</a> <a href="www.tipidpc.com/viewitem.php?iid=11296887">monitors</a> from PCHub, but realize that your card and monitor doesn&#8217;t come bundled with a DisplayPort cable? Sure, there are DisplayPort cables out there, but the only shop I&#8217;ve seen carrying them in Makati (Octagon) only carries the 2 meter cables worth P1.2K.</p>
<p>So how do you pull off setup below (relatively) cheaply when you&#8217;re living in Metro Manila?</p>
<p><img src="http://www.bryanbibat.net/images/new_monitor_keyboard_scaled.jpg" alt="triple monitor" class="aligncenter" /></p>
<p>The trick here is that <em>all</em> DisplayPort to VGA adapters are &#8220;active&#8221; adapters, and thus will be treated as a full DP connection (when you use a &#8220;passive&#8221; DP to DVI or HDMI adapter, the ones only available in the country, it&#8217;s not treated like a DP connected monitor but as another DVI/HDMI connected monitor). </p>
<p><img src="http://www.bryanbibat.net/images/dp_vga_adapter.png" alt="DP to VGA" class="aligncenter" /></p>
<p>Luckily for <strike>me</strike> us, CD-R King carries <a href="http://www.cdrking.com/index.php?mod=products&#038;type=view&#038;sid=9399&#038;main=91">DP to VGA adapters</a>.</p>
<p>&#8211;</p>
<p>This last item is like the windmill of the previous list: it&#8217;s not really practical, but still pretty notable on its own right.</p>
<p><img src="http://www.bryanbibat.net/images/dyson_fan.jpg" alt="Dyson Air Multiplier" class="aligncenter" /></p>
<p>That is a bladeless <a href="http://www.dyson.com/fans/fans.asp">Dyson Air Multiplier</a> fan, another innovation from the famed industrial designer. It sells for <a href="http://www.dyson.com/store/productFan.asp?product=AM01-IRONBLUE">$299 directly from Dyson</a>.</p>
<p><img src="http://www.bryanbibat.net/images/stark_fan.jpg" alt="Stark Air Multiplier" class="aligncenter" /></p>
<p>And that is the bladeless <a href="http://www.cdrking.com/index.php?mod=products&#038;type=view&#038;sid=11050&#038;main=131">air multiplier fan</a> sold by CD-R King. </p>
<p>Comparing the two products side by side, one can see that they&#8217;re practically the same product. While it&#8217;s likely that the latter is a cheap knockoff of the former, you can&#8217;t totally discount the possibility that these are just <em>rebranded</em> surplus stock of the original, a common MO for CD-R King products.</p>
<p>I&#8217;ve seen the fan displayed and demoed in some stores, but honestly, I&#8217;m not really impressed. Sure, the <a href="http://en.wikipedia.org/wiki/Dimmer">dimmer</a> (<a href="http://en.wikipedia.org/wiki/Potentiometer">potentiometer</a>?) switch for fine-tuning the strength of the fan is pretty cool (pun intended) and the lack of blades makes it ideal when around kids (but robs them of the robot voice/ghetto auto-tune experience), but overall, it&#8217;s just too expensive for the average person.</p>
<p>Still, it is <em>five times cheaper</em> than the original. For some people, to experience how it feels to have such a device around without paying an extra 10K (or more, thanks to the wonderfully corrupt Philippine customs bureau) may just be worth it.</p>
<p>&#8211;</p>
<p>A word of warning, though. The items above are pretty rare and it&#8217;s only at the Cubao Farmers branch that I&#8217;ve seen all three on display (though not at the same time).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bryanbibat.net/2011/11/03/notable-cd-r-king-items-holidays-2011-edition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Make gitk look better by updating tk</title>
		<link>http://blog.bryanbibat.net/2011/09/05/make-gitk-look-better-by-updating-tk/</link>
		<comments>http://blog.bryanbibat.net/2011/09/05/make-gitk-look-better-by-updating-tk/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 08:18:53 +0000</pubDate>
		<dc:creator>Bry</dc:creator>
				<category><![CDATA[Brain Dumps]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[gitk]]></category>
		<category><![CDATA[tk]]></category>

		<guid isPermaLink="false">http://blog.bryanbibat.net/?p=1401</guid>
		<description><![CDATA[I thought I&#8217;ve already done this to all of my machines but it seems that I haven&#8217;t done it on this laptop I&#8217;m using right now. Anyway, I use gitk for my graphical git browsing because I&#8217;m too lazy to download other graphical packages. Unfortunately, gitk looks like this: (click pic for larger version) The [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;ve already done this to all of my machines but it seems that I haven&#8217;t done it on this laptop I&#8217;m using right now. </p>
<p>Anyway, I use <code>gitk</code> for my graphical git browsing because I&#8217;m too lazy to download other graphical packages. Unfortunately, <code>gitk</code> looks like this:</p>
<p><a href="http://www.bryanbibat.net/images/gitk84.png"><img src="http://www.bryanbibat.net/images/gitk84.jpg" alt="pre-tk8.5" class="aligncenter" /></a><br />
<small>(click pic for larger version)</small></p>
<p>The solution to this is to install tk8.5 and tell gitk to use it instead of 8.4. <a href="http://superuser.com/questions/30175/gitk-looks-ugly-doesnt-honor-theme-settings#266328">From SU</a>:</p>
<blockquote><p>To fix this the Debian (Ubuntu) way:</p>
<pre>$ sudo apt-get install tk8.5
$ sudo update-alternatives --config wish</pre>
<p>And then pick the wish8.5 alternative.</p></blockquote>
<p>Here&#8217;s the result:</p>
<p><a href="http://www.bryanbibat.net/images/gitk85.png"><img src="http://www.bryanbibat.net/images/gitk85.jpg" alt="post-tk8.5" class="aligncenter" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bryanbibat.net/2011/09/05/make-gitk-look-better-by-updating-tk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A PhP 11K dilemma</title>
		<link>http://blog.bryanbibat.net/2011/08/21/a-php-11k-dilemma/</link>
		<comments>http://blog.bryanbibat.net/2011/08/21/a-php-11k-dilemma/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 09:00:11 +0000</pubDate>
		<dc:creator>Bry</dc:creator>
				<category><![CDATA[Brain Dumps]]></category>
		<category><![CDATA[Finance]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[buying guide]]></category>

		<guid isPermaLink="false">http://blog.bryanbibat.net/?p=1392</guid>
		<description><![CDATA[Just a random dilemma I&#8217;ve been thinking about this past week. There are 3 things I can buy with around 11,000 pesos. Sure, I can just buy all 3 at the drop of a hat, but that would take the fun out of this thought experiment. :p 1. LG IPS236V-PN &#8211; PhP 10,500.00 Pros: It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bryanbibat.net/images/choices.jpg" alt="decisions.." class="aligncenter" /></p>
<p>Just a random dilemma I&#8217;ve been thinking about this past week.</p>
<p>There are 3 things I can buy with around 11,000 pesos. Sure, I can just buy all 3 at the drop of a hat, but that would take the fun out of this thought experiment. :p</p>
<p><span id="more-1392"></span><strong>1. <a href="http://www.lg.com/us/computer-products/monitors/LG-led-monitor-IPS236V-PN.jsp">LG IPS236V-PN</a></strong> &#8211; <em>PhP 10,500.00</em></p>
<p><img src="http://www.bryanbibat.net/images/IPS236V-PN.jpg" alt="IPS monitor" class="aligncenter" /></p>
<p>Pros:<br />
It&#8217;s the cheapest <a href="http://en.wikipedia.org/wiki/IPS_panel">IPS</a> 1080p monitor in the local market right now. Combined with my recent purchase of <a href="http://www.amd.com/us/products/desktop/graphics/amd-radeon-hd-6000/hd-6950/Pages/amd-radeon-hd-6950-overview.aspx">a somewhat high-end video card</a>, this will make playing upcoming games (Deus Ex, Battlefield, Space Marine, etc) much more satisfying.</p>
<p>Cons:<br />
Probably the least practical of the choices in this post. I mean, I already got <em><a href="https://plus.google.com/photos/104632444453004296785/albums/5642586610876486337/5642586609746557298">3 freaking monitor</a>s</em> and I&#8217;ll have to &#8220;donate&#8221; one of them to replace the aging CRT monitor my parents use in their desktop.</p>
<p><strong>2. <a href="http://www.corsair.com/ssd/force-series-3/force-series-3-120gb-sata-3-6gbps-solid-state-hard-drive.html">Corsair Force Series 3 120GB Solid State Drive</a></strong> &#8211; <em>PhP 10,920.00</em></p>
<p><img src="http://www.bryanbibat.net/images/cf3-120gb.png" alt="SSD" class="aligncenter" /></p>
<p>Pros:<br />
Buying this would achieve 2 things: first, my main rig would be much faster as it will replace my <a href="http://blog.bryanbibat.net/2011/01/06/follow-up-cd-r-king%e2%80%99s-cheap-solid-state-drive/">aging SSDs</a>; and the other is that I could use the old SSDs to make my laptop much more faster just by replacing the HDDs.</p>
<p>Cons:<br />
Cloning my system drive will probably take 2 days of trial and error. The benefits may or may not be noticeable since I&#8217;m just upgrading an existing RAID-0 SSD setup. And since my gigs are nearly over, I don&#8217;t have any use for a speed upgrade on my laptop.</p>
<p>Overall, however, this is the most practical choice of the three.</p>
<p><strong>3. <a href="http://www.linode.com/">1 year Linode 512</a></strong> &#8211; <em>PhP 9,200.00</em> + domain name costs</p>
<p><img src="http://www.bryanbibat.net/images/linode512.png" alt="VPS instance" class="aligncenter" /></p>
<p>Pros:<br />
Properly configured, a web app running on a single Linode instance can handle thousands of concurrent requests. The opportunities here are endless.</p>
<p>Cons:<br />
The opportunities are endless. There&#8217;s no guarantee that I&#8217;d do something revolutionary or even profitable on a new VPS.</p>
<p>And besides, it&#8217;s not like <a href="http://bryanbibat.net">this Linode instance</a> is running at 100% capacity.</p>
<p>&#8211;</p>
<p>Decisions, decisions, decisions&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bryanbibat.net/2011/08/21/a-php-11k-dilemma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Development PC build for August 2011</title>
		<link>http://blog.bryanbibat.net/2011/08/01/development-pc-build-for-august-2011/</link>
		<comments>http://blog.bryanbibat.net/2011/08/01/development-pc-build-for-august-2011/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 18:00:42 +0000</pubDate>
		<dc:creator>Bry</dc:creator>
				<category><![CDATA[Brain Dumps]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[buying guide]]></category>

		<guid isPermaLink="false">http://blog.bryanbibat.net/?p=1374</guid>
		<description><![CDATA[Since I&#8217;ve been too busy recently to think thoughtful articles, I just thought &#8220;What the hell&#8230;&#8221; and came up with this one. &#8211; Last time I looked at computer parts was two years ago. Since then, a lot of things have changed in the market. Basically, it&#8217;s just Moore&#8217;s Law: prices go down, performance goes [...]]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;ve been too busy recently to think thoughtful articles, I just thought &#8220;What the hell&#8230;&#8221; and came up with this one.</p>
<p>&#8211;</p>
<p>Last time I looked at computer parts was <a href="http://blog.bryanbibat.net/2009/07/01/gaming-pc-builder-challenge-pt-1/">two</a> <a href="http://blog.bryanbibat.net/2009/07/02/gaming-pc-builder-challenge-pt-2/">years</a> <a href="http://blog.bryanbibat.net/2009/07/04/gaming-pc-builder-challenge-pt-3/">ago</a>. Since then, a lot of things have changed in the market. </p>
<p>Basically, it&#8217;s just <a href="http://en.wikipedia.org/wiki/Moore%27s_law">Moore&#8217;s Law</a>: prices go down, performance goes up.</p>
<p>Thinking up of a gaming rig, however, isn&#8217;t that all exciting. There are literally hundreds of websites out there with people discussing (and debating) which combination of parts will give you the best gaming experience on the PC.</p>
<p>So to shake things up, I&#8217;ve decided to think of a PC build for software developers. Of course, if you&#8217;re developing for iOS, this article isn&#8217;t for you. But for the rest of us, having a good set of parts can really make a difference, especially since you&#8217;re going to be working in front of that machine for 40+ hours a week.</p>
<p><span id="more-1374"></span>&#8211;</p>
<p>My personal priority list of features I&#8217;d look for in a development machine are as follows:</p>
<p><strong>1. Multiple monitors</strong> &#8211; constant Alt-Tab-ing is a necessary annoyance for most developers. In a normal work day, you&#8217;d have a lot of windows open: IDE/text editor, terminal windows for running scripts, a browser (for web devs) or emulator (for mobile devs) for testing, a browser for searching for answers on the internet, API docs, User stories/specification docs, email client, chat/IM client&#8230; the list goes on.</p>
<p>Sure, virtual desktops help, but that just moves the shortcut from Alt-Tab to another shortcut. A much easier approach would be to just shell out a bit of cash for extra monitors. And as we shall see below, getting multiple monitors isn&#8217;t as expensive as they used to be.</p>
<p><strong>2. Current gen quad-core CPU</strong> &#8211; much more obvious than the multiple monitors. Practically every developer, save for the most basic of PHP developers (as PHP CMS devs still need to use photo-editing), will need a lot of CPU power.</p>
<p><strong>2. Solid State Drive</strong> &#8211; when you&#8217;ve seen <a href="http://blog.bryanbibat.net/2010/01/13/cd-r-kings-cheap-solid-state-drive/">the crappiest SSD outperform the best mechanical hard drives</a>, you&#8217;ll understand why some people would spend a lot on these low-capacity drives. Boot times cut by over half, programs and files loading much faster than normal, etc.. </p>
<p><em>tl;dr</em>: &#8220;Get an SSD&#8221; is the new &#8220;Get more RAM&#8221;, the go-to advice for speeding up your computer.</p>
<p><strong>3. Reliable PSU and UPS</strong> &#8211; because no one likes losing half an hour&#8217;s work from power outages.</p>
<p><strong>4. As much RAM and HDD as practically possible</strong> &#8211; RAM and HDD are dirt cheap nowadays. As we shall see below, 8GB of RAM and 2TB of storage (to complement the SSD) are cheaper than most of the parts.</p>
<p>Without further ado, here are the parts I chose:</p>
<p>(Most of the parts are from <a href="http://www.tipidpc.com/useritems.php?username=PCHub">PC Hub</a>. Last time I checked, they&#8217;ve already overtaken PC Options in the &#8220;cheapest parts&#8221; race.</p>
<p>&#8211;</p>
<p><img src="http://www.bryanbibat.net/images/Intel-Core-i5-2400.jpg" alt="Intel Core i5 2400" class="aligncenter" /></p>
<p><strong>CPU: Intel Core i5 2400</strong> (quad core, 3.1GHz, <a href="http://www.tipidpc.com/viewitem.php?iid=9381107">PCHub product link</a>) &#8211; PhP 8,350.00</p>
<p>The Core i5 2500K is arguably the best CPU in the market right now. However, since we don&#8217;t care about its main feature (the K mean&#8217;s it unlocked for overclocking) we settle for the Core i5 2400. The 200MHz difference isn&#8217;t as noticeable as the P1.6K that you&#8217;ll save with the latter.</p>
<p>There are two things about this CPU that we have to mention before we move on to the other parts.</p>
<p>First is that this is a <a href="http://en.wikipedia.org/wiki/Sandy_Bridge">Sandy Bridge</a> chip. Basically, this generation of chips have a graphics processing unit built in the chip just like the chips in gaming consoles and some mobile phones. With the right motherboard, we could go for triple or quadruple monitor with only a single additional video card.</p>
<p>The other thing to note is that this chip supports Intel&#8217;s <a href="http://en.wikipedia.org/wiki/X86_virtualization">virtualization</a> technologies (VT-x). This improves performance of virtual machines (which you may find yourself installing, e.g. Windows for browser testing, Linux for separate testing servers, etc) run on this rig.</p>
<p><img src="http://www.bryanbibat.net/images/ecs_h67h2.jpg" alt="ECS H67H2-M3" class="aligncenter" /></p>
<p><strong>Motherboard: Any LGA1155 motherboard using the Intel H67 chipset</strong> </p>
<p><em>Example:</em> ECS H67H2-M3 (<a href="http://www.tipidpc.com/viewitem.php?iid=9409746">PCHub product link</a>) &#8211; PhP 3,560.00</p>
<p>This is &#8220;the right motherboard&#8221; I mentioned above. When used with Sandy Bridge chips, <a href="http://www.intel.com/content/www/us/en/chipsets/mainstream-chipsets/h67-express-chipset.html">Intel H67 Express chipset</a> motherboards provide you with video output for up to 2 monitors. Our target is 3 monitors so we still have to buy a cheap video card.</p>
<p>For this post, I chose a micro-ATX board from ECS. It&#8217;s got most of the H67 features like USB 3, SATA 3, RAID, HDMI output, etc., but it only has 2 DDR3 RAM slots and 1 16x PCI-e slot. If you want to go with more than 8GB or 4 monitors, you&#8217;ll have to go with something like Gigabyte <a href="http://www.gigabyte.com/products/product-page.aspx?pid=3768">GA-H67MA-UD2H-B3</a>.</p>
<p><img src="http://www.bryanbibat.net/images/cssd-f80.png" alt="Corsair Force F80A 80GB" class="aligncenter" /></p>
<p><strong>SSD: Any SSD released in the past 2 years</strong> </p>
<p><em>Example:</em> Corsair Force F80A 80GB (<a href="http://www.tipidpc.com/viewitem.php?iid=10502369">PCHub product link</a>) &#8211; PhP 7,999.00</p>
<p>There are practically only 2 types of SSDs right now: ones by Intel, and ones with a SandForce controller. While both are good choices, the technology is still just maturing. In other words, expect older drives to be an order of magnitude less reliable than new drives.</p>
<p>Another thing to consider when buying an SSD is how much space you&#8217;re going to need. As a Rails developer, I doubt I&#8217;m going to need more than 40GB for programs and source code. People who work with far larger code bases or data to process will have to get a 100GB+ SSD.</p>
<p><img src="http://www.bryanbibat.net/images/WD20EARX.jpg" alt="Western Digital Caviar Green 2TB" class="aligncenter" /></p>
<p><strong>HDD: Western Digital Caviar Green 2TB</strong> (low power, SATA 3, <a href="http://www.tipidpc.com/viewitem.php?iid=9427182">PCHub product link</a>) &#8211; PhP 4,150.00</p>
<p>Having an extra hard drive when using an SSD is pretty much a given. It&#8217;s better to put stuff like documents, videos, and pictures to another drive to save space. Transferring the swap and hibernate files to this other drive will also free up more space. </p>
<p>Having lots of space on the drive also means you don&#8217;t have any excuse not to setup regular backups of your main drive. For extra redundancy, you may want to buy another drive and set the two HDDs as RAID-1.</p>
<p><img src="http://www.bryanbibat.net/images/pc4560.jpg" alt="PowerColor HD 4650" class="aligncenter" /></p>
<p><strong>Video card: Any cheap PCI-express video card</strong> </p>
<p><em>Example:</em> PowerColor HD 4650 (<a href="http://www.tipidpc.com/viewitem.php?iid=9411754">PCHub product link</a>) &#8211; PhP 2,100.00</p>
<p>Nothing much to see here. Sandy Bridge gives us up to 2 displays so we need a card to provide the last one.</p>
<p><img src="http://www.bryanbibat.net/images/cmv-23lh.png" alt="Chimei 23LH" class="aligncenter" /></p>
<p><strong>Monitors: 3 x Chimei 23LH</strong> (23&#8243; 1920&#215;1080, <a href="http://www.tipidpc.com/viewitem.php?iid=10248166">PCHub product link</a>) &#8211; PhP 23,997.00</p>
<p>Chimei may not ring a bell, but they&#8217;re the largest producer of LCD panels in Taiwan so it&#8217;s not exactly a no-name brand.</p>
<p>There&#8217;s nothing much to say about these monitors aside from the fact that they&#8217;re probably the cheapest 1080p monitors available in the market right now. Since our motherboard, video card, and monitors support HDMI, you may want to buy some cheap HDMI cables from CDR-King as an alternative to using the analog D-Sub (VGA) output.</p>
<p><img src="http://www.bryanbibat.net/images/500va.jpg" alt="APC BE-500R-PH ES 500VA" class="aligncenter" /></p>
<p><strong>UPS: APC BE-500R-PH ES 500VA</strong> (<a href="http://www.pccorner.com.ph/products.do?action=showproductbycategory&#038;typeid=17&#038;categoryid=28">PC Corner product link</a>) &#8211; PhP 2,548.00</p>
<p>To come to think of it, the only &#8220;branded&#8221; UPS available locally are <a href="http://www.apc.com/ph/">APC</a> UPSs. </p>
<p>You have two choices with APC: their basic UPSs like the suggestion above which are pretty much like having a laptop battery that lasts for only around 2 minutes, or their more <a href="http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=BK650-AS">feature filled UPSs</a> that cost a lot more but lasts a lot longer too.</p>
<p>For this post, we&#8217;ll go with the former. We actually don&#8217;t expect this rig to draw in more than 250W, monitors included.</p>
<p>Non-branded UPSs are mostly hit-or-miss. If you already bought one, go and check the 12V sealed lead-acid battery inside. IIRC, it should be rated 7Ah or higher.</p>
<p><img src="http://www.bryanbibat.net/images/cx430.png" alt="Corsair CX430" class="aligncenter" /></p>
<p><strong>PSU: Corsair CX430</strong> (430W, <a href="http://www.tipidpc.com/viewitem.php?iid=10796084">PC Hub product link</a>) &#8211; PhP 2,260.00</p>
<p>Please refer to my <a href="http://blog.bryanbibat.net/2009/05/17/importance-of-good-psus/">old post</a> on why we&#8217;re using a branded PSU that&#8217;s rated less than a PSU you could buy from CDR-King for only PhP 600.</p>
<p>And now we proceed to the the parts that we don&#8217;t really care about:</p>
<p><img src="http://www.bryanbibat.net/images/ddr3.jpg" alt="Kingston 4GB DDR3" class="aligncenter" /></p>
<p><strong>RAM: 2 x Kingston 4GB DDR3</strong> (<a href="http://www.tipidpc.com/viewitem.php?iid=10505771">PC Hub product link</a>) &#8211; PhP 2,520.00</p>
<p>Nothing to see here. Value RAM isn&#8217;t that much different from higher end RAM if you&#8217;re not overclocking.</p>
<p><img src="http://www.bryanbibat.net/images/CM343.jpg" alt="Cooler Master Elite 343" class="aligncenter" /></p>
<p><strong>Case: Cooler Master Elite 343</strong> (<a href="http://www.tipidpc.com/viewitem.php?iid=10915420">PC Hub product link</a>) &#8211; PhP 1,300.00</p>
<p>Cheapest micro-ATX case in PC Hub. &#8217;nuff said.</p>
<p><img src="http://www.bryanbibat.net/images/mx518.jpg" alt="Logitech MX 518" class="aligncenter" /></p>
<p><strong>Mouse: Logitech MX 518</strong> (<a href="http://www.tipidpc.com/viewitem.php?iid=9512373">PC Hub product link</a>) &#8211; PhP 1,270.00</p>
<p>Why this gaming mouse? Well, aside from being my mouse for over half a decade, it&#8217;s the cheapest branded mouse you can get with the two side buttons for moving forward and backward in a browser. Makes browsing much easier than having to click the back/forward button pressing Alt-arrow.</p>
<p>If you want a non-branded mouse with side buttons, you can get one at CDR-King for <a href="http://www.cdrking.com/?mod=products&#038;type=view&#038;sid=10314&#038;main=51">PhP 200</a>. It&#8217;s not as ergonomic as MX-518, though.</p>
<p><strong>Keyboard: generic USB keyboard</strong> &#8211; ~PhP 200.00</p>
<p>I am not a fan of wireless keyboards. Too expensive for my tastes.</p>
<p>Since split-type ergonomic keyboards are not available locally, just go with a generic USB keyboard. Depending on your typing style, you may or may not want to buy a <a href="http://www.cdrking.com/index.php?mod=products&#038;type=category&#038;catid=84&#038;main=84">wrist pad</a>.</p>
<p><img src="http://www.bryanbibat.net/images/Ubuntu-logo.png" alt="Ubuntu" class="aligncenter" /></p>
<p><strong>OS: Ubuntu 11.04 64-bit</strong> &#8211; <a href="http://www.ubuntu.com/ubuntu">Free</a></p>
<p>In case you don&#8217;t know, you need a 64-bit OS to take advantage of memory beyond 4GB.</p>
<p>If you&#8217;re a .NET developer, you obviously have to get at least Windows 7 Home Premium 64-bit OEM. Villman sells them at <a href="http://www.villman.com/Product-Detail/MS_Win7_Premium_OEM_64bit">PhP 5,577.00</a>.</p>
<p>But for many non-.NET and non-iOS devs, you can&#8217;t go wrong with Linux. This is especially true with web developers as their production servers are typically Linux/Unix based, thus reducing compatibility problems.</p>
<p>&#8211;</p>
<p>And the final build:</p>
<p><img src="http://www.bryanbibat.net/images/aug2011-dev-pie-chart.png" alt="Cost breakdown" class="aligncenter" /></p>
<table>
<tr>
<th>Part</th>
<th>Name</th>
<th>Price</th>
</tr>
<tr>
<td>CPU</td>
<td>Intel Core i5 2400</td>
<td style="text-align:right">8,350.00</td>
</tr>
<tr>
<td>Motherboard</td>
<td>ECS H67H2-M3</td>
<td style="text-align:right">3,560.00</td>
</tr>
<tr>
<td>SSD</td>
<td>Corsair Force F80A 80GB</td>
<td style="text-align:right">7,999.00</td>
</tr>
<tr>
<td>HDD</td>
<td>Western Digital Caviar Green 2TB</td>
<td style="text-align:right">4,150.00</td>
</tr>
<tr>
<td>Video card</td>
<td>PowerColor HD 4650</td>
<td style="text-align:right">2,100.00</td>
</tr>
<tr>
<td>Monitors</td>
<td>3 x Chimei 23LH</td>
<td style="text-align:right">23,997.00</td>
</tr>
<tr>
<td>UPS</td>
<td>APC BE-500R-PH ES 500VA</td>
<td style="text-align:right">2,548.00</td>
</tr>
<tr>
<td>PSU</td>
<td>Corsair CX430</td>
<td style="text-align:right">2,260.00</td>
</tr>
<tr>
<td>RAM</td>
<td>2 x Kingston 4GB DDR3</td>
<td style="text-align:right">2,520.00</td>
</tr>
<tr>
<td>Case</td>
<td>Cooler Master Elite 343</td>
<td style="text-align:right">1,300.00</td>
</tr>
<tr>
<td>Mouse</td>
<td>Logitech MX 518</td>
<td style="text-align:right">1,270.00</td>
</tr>
<tr>
<td>Keyboard</td>
<td>Generic USB Keyboard</td>
<td style="text-align:right">200.00</td>
</tr>
<tr>
<td>OS</td>
<td>Ubuntu 11.04 64-bit</td>
<td style="text-align:right">Free</td>
</tr>
<tr>
<td colspan="2">Total</td>
<td style="text-align:right">60,254.00</td>
</tr>
</table>
<p>Around 60k &#8212; not bad for a high-end development machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bryanbibat.net/2011/08/01/development-pc-build-for-august-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CD-R King’s Cheap Solid State Drive, Part 2</title>
		<link>http://blog.bryanbibat.net/2011/02/21/cd-r-king%e2%80%99s-cheap-solid-state-drive-part-2/</link>
		<comments>http://blog.bryanbibat.net/2011/02/21/cd-r-king%e2%80%99s-cheap-solid-state-drive-part-2/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 09:50:35 +0000</pubDate>
		<dc:creator>Bry</dc:creator>
				<category><![CDATA[Brain Dumps]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[CD-R King]]></category>
		<category><![CDATA[SSD]]></category>

		<guid isPermaLink="false">http://blog.bryanbibat.net/?p=1239</guid>
		<description><![CDATA[It&#8217;s no secret that I have a guilty pleasure of going to CD-R King to look for decent stuff in their inventory. And I do find some nice stuff once in a while, for example, I only recently found out that they sell digital scales that allow zero resetting, an invaluable tool in the kitchen [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bryanbibat.net/images/plextor_ssd.jpg" alt="Plextor SSD" class="aligncenter" /></p>
<p>It&#8217;s no secret that I have a guilty pleasure of going to <a href="http://cdrking.com">CD-R King</a> to <a href="http://blog.bryanbibat.net/2009/06/13/notable-cd-r-king-items/">look for decent stuff in their inventory</a>. And I do find some nice stuff once in a while, for example, I only recently found out that they sell <a href="http://cdrking.com/index.php?productstype=All+Products&#038;searchvalue=scale&#038;x=0&#038;y=0&#038;mod=products&#038;type=search">digital scales</a> that allow zero resetting, an invaluable tool in the kitchen especially when baking. The PhP 380 &#8211; 580 price range is just too low when compared to the scales you&#8217;ll find in stores like <a href="http://www.gourdos.com/">Gourdo&#8217;s</a> which sell them from PhP 1,500 to 3,000.</p>
<p>Anyway, I&#8217;m just here to point out that CD-R King has a <a href="http://www.plextoramericas.com/index.php/ssd/px-m1-series/ssd-64gb">new 64GB SSD</a> in <a href="http://cdrking.com/?mod=products&#038;type=view&#038;sid=8610&#038;main=80">their inventory</a>. At PhP 3,990, it&#8217;s cheaper than <a href="http://blog.bryanbibat.net/2010/01/13/cd-r-kings-cheap-solid-state-drive/">the one I have on my rig right now</a>, but based on reviews it&#8217;s supposed to be crappier.</p>
<p>Still, there are worse ways to shell out P4k (like, say, attending a cloud computing conference when you&#8217;ve already been using it for years) so slapping one on your on-the-go workhorse laptop isn&#8217;t that bad of an idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bryanbibat.net/2011/02/21/cd-r-king%e2%80%99s-cheap-solid-state-drive-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Follow up] CD-R King’s Cheap Solid State Drive</title>
		<link>http://blog.bryanbibat.net/2011/01/06/follow-up-cd-r-king%e2%80%99s-cheap-solid-state-drive/</link>
		<comments>http://blog.bryanbibat.net/2011/01/06/follow-up-cd-r-king%e2%80%99s-cheap-solid-state-drive/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 09:32:41 +0000</pubDate>
		<dc:creator>Bry</dc:creator>
				<category><![CDATA[Brain Dumps]]></category>
		<category><![CDATA[Follow-Up]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[CD-R King]]></category>
		<category><![CDATA[hdtune]]></category>
		<category><![CDATA[SSD]]></category>

		<guid isPermaLink="false">http://blog.bryanbibat.net/?p=1198</guid>
		<description><![CDATA[Last year, I bought two really cheap SSDs from the unlikeliest of sources: CD-R King. Everything about it was just screaming BAD IDEA. Someone over at HardOCP&#8217;s forum even suggested the drives will have &#8220;gone to shit&#8221; in just 4 months. Let&#8217;s see how much the performance has degraded a year later: As expected, the [...]]]></description>
			<content:encoded><![CDATA[<p>Last year, <a href="http://blog.bryanbibat.net/2010/01/13/cd-r-kings-cheap-solid-state-drive/">I bought two really cheap SSDs</a> from the unlikeliest of sources: <a href="http://cdrking.com/">CD-R King</a>.</p>
<p>Everything about it was just screaming <em><strong>BAD IDEA</strong></em>. Someone over at HardOCP&#8217;s forum even <a href="http://hardforum.com/showthread.php?p=1035501531">suggested</a> the drives will have &#8220;gone to shit&#8221; in just 4 months.</p>
<p>Let&#8217;s see how much the performance has degraded a year later:</p>
<p><img src="http://www.bryanbibat.net/images/hdtune-2011.png" alt="ssd performance a year later" class="aligncenter" /></p>
<p>As expected, the drive has degraded a bit, its performance half of what it was last year. For reference, here&#8217;s the HD Tune performance just after I first installed them (with a brand new OS and all) last year:</p>
<p><img src="http://www.bryanbibat.net/images/final_upgrade.png" alt="ssd performance a year ago" class="aligncenter" /></p>
<p>A 50% drop in performance might be disappointing, but when you take into account the expected performance of top non-SSD hard drives, it&#8217;s still pretty impressive. Here&#8217;s the graph of the comparison drive last year (Western Digital 10K RPM Raptor):</p>
<p><img src="http://www.bryanbibat.net/images/hdtune-raptor.jpg" alt="hdd performance" class="aligncenter" /></p>
<p>So no, performance still hasn&#8217;t gone to shit yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bryanbibat.net/2011/01/06/follow-up-cd-r-king%e2%80%99s-cheap-solid-state-drive/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

