<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8322821163940828832</id><updated>2011-12-02T02:39:56.509-08:00</updated><category term='Notes on Apache'/><category term='Notes on PHP'/><category term='Notes on BIND'/><category term='Notes on SSH'/><category term='Notes on GIMP'/><category term='Notes on Linux'/><category term='Notes on Printing'/><category term='Notes on PostgreSQL'/><category term='Notes on Python'/><category term='Notes on Squid'/><category term='Notes on MySQL'/><category term='Notes on VirtualBox'/><category term='Notes on DHCP'/><category term='Notes on Dovecot'/><category term='Notes on Solaris'/><category term='Notes on DenyHosts'/><category term='Notes on OpenOffice'/><category term='Notes on Samba'/><category term='Notes on Statistics'/><category term='Notes on Postfix'/><category term='Notes on Squirrelmail'/><category term='Notes on Finance'/><title type='text'>Clement Rasul</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>61</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-9038230311890760019</id><published>2011-07-08T18:54:00.001-07:00</published><updated>2011-07-14T02:13:05.801-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Printing'/><title type='text'>Printer Sharing on Ubuntu 10.10</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Set the Linux Printer Server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The procedure below is tested on Linux Printer Server running Ubuntu 10.10 and CUPS 1.4.4.  To setup the Linux Printer Server, make sure that the server can print into the connected printer.  Once this is done, you can enable print sharing.&lt;br /&gt;&lt;br /&gt;a)  Click on System -&amp;gt; Administration -&amp;gt; Printing&lt;br /&gt;b)  Click on Add Printer and select your printer on the listed items&lt;br /&gt;c)  Afterwards, test if you can print from your server.&lt;br /&gt;&lt;br /&gt;d)  Enable print sharing by right-clicking on the printer and selecting "Properties" menu.&lt;br /&gt;e)  On the Policies, check the State "Enabled, Accepting jobs, and Shared"&lt;br /&gt;f)  Under access control select the button "Deny printing for everyone except these users:", then type in the list of users you want to share printer and click on the "Add" button.  (e.g., bisita - this should be equivalent to the user logged in on the client machine)&lt;br /&gt;g)  Click on the button "Apply" then "OK"&lt;br /&gt;h) On the "Printer Configuration" window, select the Server-&amp;gt;Settings menu.&lt;br /&gt;i)  Check the item "Publish shared printers connected to this system", and "Allow printing from the Internet", then click on the OK button.&lt;br /&gt;j)  Restart the cups daemon by typing on the terminal:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;# /etc/init.d/cups restart&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;On a Linux Client Machine&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a)  Click on System-&amp;gt;Administration-&amp;gt;Printing&lt;br /&gt;b)  Click on the Add button&lt;br /&gt;c)  Under the "Network Printer", select "Internet Printing Protocol"&lt;br /&gt;d)  Under the Host field, type in the IP address of the printer server (e.g., 192.168.1.10)&lt;br /&gt;e)  Under the Queue field, type in the name of the printer after the prefix /printers/ (e.g., /printers/hp900)&lt;br /&gt;f)  Click the button to "Verify" to confirm if your settings are good.&lt;br /&gt;g)  Then click the "Forward" button and select your printer on the listed items&lt;br /&gt;h) Type in a description of your printer (e.g., hp900)&lt;br /&gt;i) Finalized the setup by clicking the "Apply" and "OK" button&lt;br /&gt;&lt;br /&gt;If everything goes smoothly, you should be able to print from your Linux client machine to your Linux Printer Server.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;Windows Printing Thru CUPS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Windows can print to a Linux Print Server running cups.  I assume that the CUPS server has been properly installed on a Linux server and it has been set as "sharing".  The following procedure is how to set the printer under Windows (I have tested it under Windows XP Home Edition but my guess is it should work on most Windows variants):&lt;br /&gt;&lt;br /&gt;a)  Add Printer&lt;br /&gt;b)  Select "Connect Printer to the Internet"&lt;br /&gt;c)  Type in the address of CUPS server and the print queue (e.g., http://192.168.1.117:631/printers/hp900)&lt;br /&gt;d)  When prompted for the printer type, select "Generic", then select "MS Publisher Imagesetter" (This is usually a built in driver on Windows)&lt;br /&gt;&lt;br /&gt;That's it.&lt;br /&gt;&lt;br /&gt;Test your printing.  You can monitor the status of your printing by going to your browser and typing the address (e.g., http://192.168.1.117:631) and clicking on the "Jobs" menu.&lt;br /&gt;&lt;br /&gt;Erratum:  The above procedure does not work with Windows 7 Starter Edition.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Printer Sharing via LPD&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Print Sharing thru the legacy LPD is implemented via the cups-lpd daemon.  This is activated through the xinetd superserver daemon.  The procedure are as follows:&lt;br /&gt;&lt;br /&gt;a)  On the Linux Printer Server, download the xinetd superserver daemon xinetd by typing the command on the terminal:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;# apt-get install xinetd&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;b)  Configure the xinetd daemon by typing creating the a (e.g., printer ) under the directory /etc/xinetd.d/ and typing the following settings:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;service printer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;socket_type = stream&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;protocol = tcp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;wait = no&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;user = bisita&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;group = sys&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;server = /usr/lib/cups/daemon/cups-lpd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;server_args = -o document-format=application/octet/stream&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;c)  Start the xinetd server by typing the command:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# /etc/init.d/xinetd start&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;d)  Create the file hosts.lpd under the directory /etc and type in the name of allowed hosts (e.g., mydesktop ).  Be sure the hostname mydesktop can be properly identified in the network.  If not, include the name under the hosts file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Printer Sharing under SMB protocol&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The procedure below assumes that you have done the above procedure on Printer Sharing via LPD.  The reason for this is that the Samba Server setup here for printing relies on the bsd as the printing mode.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;a) Download and install the Samba software in the server.&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# apt-get install samba&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;b)  Configure the Samba server by editing the file /etc/samba/smb.conf given the pattern below:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;[global]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;workgroup = RASUL     &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;netbios name = TIKBALANG   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;passdb backend = tdbsam&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;printcap name = cups&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;printing = bsd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;load printers = yes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[printers]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;comment = All Printers&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;browseable = yes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;security = share&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;use client driver = yes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;guest ok = yes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;path = /var/spool/smbprint&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;printable = yes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public = yes   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;writable = yes &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;create mode = 0700&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;c)  Create the directory /var/spool/smprint and change the ownership to 777 mode.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;# mkdir /var/spool/smbprint&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# chmod 777 /var/spool/smbprint&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;d)  Restart the Samba server as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;#/etc/init.d/nmbd restart&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#/etc/init.d/smbd restart&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Afterwards, test if you can print from a Windows or Linux client machine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-9038230311890760019?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/9038230311890760019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=9038230311890760019' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/9038230311890760019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/9038230311890760019'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2011/07/windows-printing-thru-cups.html' title='Printer Sharing on Ubuntu 10.10'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-4621638088810612245</id><published>2011-07-01T21:16:00.000-07:00</published><updated>2011-07-01T21:17:24.016-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Linux'/><title type='text'>Setting the Network Card to Static IP on Ubuntu</title><content type='html'>Edit the /etc/network/interaces file to:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;auto eth1&lt;/div&gt;&lt;div&gt;iface eth1 inet static&lt;/div&gt;&lt;div&gt;address 10.10.10.2&lt;/div&gt;&lt;div&gt;netmask 255.255.255.0&lt;/div&gt;&lt;div&gt;gateway 10.10.10.1&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-4621638088810612245?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/4621638088810612245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=4621638088810612245' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4621638088810612245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4621638088810612245'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2011/07/setting-network-card-to-static-ip.html' title='Setting the Network Card to Static IP on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7110215444991825034</id><published>2011-06-29T08:15:00.000-07:00</published><updated>2011-06-29T08:29:51.496-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Samba'/><title type='text'>Sample smb.conf File</title><content type='html'>&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;[global]&lt;br /&gt; netbios name = KAPRE&lt;br /&gt; workgroup = HEDCEN&lt;br /&gt; server string = HedCen File Server&lt;br /&gt; security = user&lt;br /&gt; guest account = bisita&lt;br /&gt;&lt;br /&gt;[teachers]&lt;br /&gt; path = /home/teacher/Documents&lt;br /&gt; writeable = yes&lt;br /&gt; valid users = @teacher&lt;br /&gt; locking = yes&lt;br /&gt; create mode = 0660&lt;br /&gt; directory mode = 0770&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;[students]&lt;br /&gt; path = /home/student/Documents&lt;br /&gt; writeable = yes&lt;br /&gt; valid users = @student&lt;br /&gt; locking = yes&lt;br /&gt; create mode = 0660&lt;br /&gt; directory mode = 0770&lt;br /&gt;&lt;br /&gt;[home]&lt;br /&gt; comment = Home Directory&lt;br /&gt; path = %H&lt;br /&gt; valid users = %S&lt;br /&gt; create mode = 0600&lt;br /&gt; directory mode = 0700&lt;br /&gt; locking = no&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7110215444991825034?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7110215444991825034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7110215444991825034' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7110215444991825034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7110215444991825034'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2011/06/sample-smbconf-file.html' title='Sample smb.conf File'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-4435744197672797577</id><published>2011-06-17T22:40:00.000-07:00</published><updated>2011-06-17T22:41:20.713-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Squid'/><title type='text'>HedCen Squid Server</title><content type='html'>&lt;span style="font-size:78%;"&gt;acl all src all&lt;br /&gt;acl manager proto cache_object&lt;br /&gt;acl localhost src 127.0.0.1/32&lt;br /&gt;acl to_localhost dst 127.0.0.0/8 0.0.0.0/32&lt;br /&gt;acl localnet src 10.0.0.0/8    # RFC1918 possible internal network&lt;br /&gt;acl localnet src 172.16.0.0/12    # RFC1918 possible internal network&lt;br /&gt;acl localnet src 192.168.0.0/16    # RFC1918 possible internal network&lt;br /&gt;&lt;br /&gt;acl blocksites url_regex "/etc/squid/block-squid.acl"&lt;br /&gt;acl blocktime url_regex "/etc/squid/timeblock-squid.acl"&lt;br /&gt;&lt;br /&gt;acl morning time 07:00-12:00&lt;br /&gt;acl okam1 time 00:00-06:59&lt;br /&gt;acl okam2 time 12:01-12:29&lt;br /&gt;acl afternoon time 12:30-19:00&lt;br /&gt;acl okpm1 time 19:01-23:59&lt;br /&gt;&lt;br /&gt;acl SSL_ports port 443&lt;br /&gt;acl Safe_ports port 80        # http&lt;br /&gt;acl Safe_ports port 21        # ftp&lt;br /&gt;acl Safe_ports port 443        # https&lt;br /&gt;acl Safe_ports port 70        # gopher&lt;br /&gt;acl Safe_ports port 210        # wais&lt;br /&gt;acl Safe_ports port 1025-65535    # unregistered ports&lt;br /&gt;acl Safe_ports port 280        # http-mgmt&lt;br /&gt;acl Safe_ports port 488        # gss-http&lt;br /&gt;acl Safe_ports port 591        # filemaker&lt;br /&gt;acl Safe_ports port 777        # multiling http&lt;br /&gt;acl CONNECT method CONNECT&lt;br /&gt;&lt;br /&gt;http_access deny blocksites&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;http_access deny morning blocktime&lt;br /&gt;http_access deny afternoon blocktime&lt;br /&gt;&lt;br /&gt;http_access allow okam1 blocktime&lt;br /&gt;http_access allow okam2 blocktime&lt;br /&gt;http_access allow okpm1 blocktime&lt;br /&gt;&lt;br /&gt;http_access allow manager localhost&lt;br /&gt;http_access deny manager&lt;br /&gt;http_access deny !Safe_ports&lt;br /&gt;http_access deny CONNECT !SSL_ports&lt;br /&gt;http_access allow localnet&lt;br /&gt;http_access allow localhost&lt;br /&gt;http_access deny all&lt;br /&gt;icp_access allow localnet&lt;br /&gt;icp_access deny all&lt;br /&gt;&lt;br /&gt;http_port 3128 transparent&lt;br /&gt;&lt;br /&gt;hierarchy_stoplist cgi-bin ?&lt;br /&gt;access_log /var/log/squid/access.log squid&lt;br /&gt;refresh_pattern ^ftp:        1440    20%    10080&lt;br /&gt;refresh_pattern ^gopher:    1440    0%    1440&lt;br /&gt;refresh_pattern -i (/cgi-bin/|\?) 0    0%    0&lt;br /&gt;refresh_pattern .        0    20%    4320&lt;br /&gt;acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]&lt;br /&gt;upgrade_http0.9 deny shoutcast&lt;br /&gt;acl apache rep_header Server ^Apache&lt;br /&gt;broken_vary_encoding allow apache&lt;br /&gt;coredump_dir /var/spool/squid&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-4435744197672797577?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/4435744197672797577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=4435744197672797577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4435744197672797577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4435744197672797577'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2011/06/hedcen-squid-server.html' title='HedCen Squid Server'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-6148471199607510552</id><published>2011-06-17T22:39:00.000-07:00</published><updated>2011-06-17T22:40:01.102-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on DHCP'/><title type='text'>HedCen DHCP Server</title><content type='html'>&lt;span style="font-size:78%;"&gt;#&lt;br /&gt;# DHCP Server Configuration file.&lt;br /&gt;#   see /usr/share/doc/dhcp*/dhcpd.conf.sample &lt;br /&gt;#&lt;br /&gt;ddns-update-style interim;&lt;br /&gt;ignore client-updates;&lt;br /&gt;&lt;br /&gt;subnet 10.10.10.0 netmask 255.255.255.0 {&lt;br /&gt;range 10.10.10.10 10.10.10.110;&lt;br /&gt;option routers 10.10.10.1;&lt;br /&gt;option subnet-mask 255.255.255.0;&lt;br /&gt;option domain-name "hedcen.portal.ph";&lt;br /&gt;option domain-name-servers 10.10.10.1;&lt;br /&gt;option netbios-name-servers 10.10.10.1;&lt;br /&gt;default-lease-time 21600;&lt;br /&gt;max-lease-time 43200;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-6148471199607510552?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/6148471199607510552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=6148471199607510552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6148471199607510552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6148471199607510552'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2011/06/hedcen-dhcp-server.html' title='HedCen DHCP Server'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-6462348357407769209</id><published>2011-06-17T22:37:00.000-07:00</published><updated>2011-06-17T22:38:51.365-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Squid'/><title type='text'>Transparent Squid Setup Firewall Script</title><content type='html'>&lt;span style="font-size:78%;"&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;&lt;br /&gt;# Flush rules&lt;br /&gt;iptables -F&lt;br /&gt;iptables -X&lt;br /&gt;iptables -t nat -F&lt;br /&gt;iptables -t nat -X&lt;br /&gt;iptables -t mangle -F&lt;br /&gt;iptables -t mangle -X&lt;br /&gt;&lt;br /&gt;iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128&lt;br /&gt;iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128&lt;br /&gt;iptables -t nat -A POSTROUTING -s 10.10.10.0/255.255.255.0 -d 0.0.0.0/0.0.0.0 -j MASQUERADE&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-6462348357407769209?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/6462348357407769209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=6462348357407769209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6462348357407769209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6462348357407769209'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2011/06/transparent-squid-setup-firewall-script.html' title='Transparent Squid Setup Firewall Script'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-4424659410895073603</id><published>2011-06-02T09:03:00.000-07:00</published><updated>2011-06-02T09:06:38.566-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Squid'/><title type='text'>Sample Squid Configuration File</title><content type='html'>The following is a sample squid 2.7 configuration file (/etc/squid/squid.conf):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;acl all src all&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl manager proto cache_object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl localhost src 127.0.0.1/32&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl to_localhost dst 127.0.0.0/8 0.0.0.0/32&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl localnet src 10.0.0.0/8    # RFC1918 possible internal network&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl localnet src 172.16.0.0/12    # RFC1918 possible internal network&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl localnet src 192.168.0.0/16    # RFC1918 possible internal network&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl blocksites url_regex "/etc/squid/squid-block.acl"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl officehour time M T W H F 9:00-16:59&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl afteroffice time 17:00-24:00&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl beforeoffice time 00:00-6:00&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl banned dst www.pornsite.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl SSL_ports port 443        # https&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl SSL_ports port 563        # snews&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl SSL_ports port 873        # rsync&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 80        # http&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 21        # ftp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 443        # https&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 70        # gopher&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 210        # wais&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 1025-65535    # unregistered ports&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 280        # http-mgmt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 488        # gss-http&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 591        # filemaker&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 777        # multiling http&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 631        # cups&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 873        # rsync&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl Safe_ports port 901        # SWAT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl purge method PURGE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl CONNECT method CONNECT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access allow afteroffice blocksites&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access allow beforeoffice blocksites&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access deny blocksites&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access deny banned&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access allow manager localhost&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access deny manager&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access allow purge localhost&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access deny purge&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access deny !Safe_ports&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access deny CONNECT !SSL_ports&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access allow localhost&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_access deny all&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;icp_access allow localnet&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;icp_access deny all&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http_port 3128&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;hierarchy_stoplist cgi-bin ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;access_log /var/log/squid/access.log squid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;refresh_pattern ^ftp:        1440    20%    10080&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;refresh_pattern ^gopher:    1440    0%    1440&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;refresh_pattern -i (/cgi-bin/|\?) 0    0%    0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;refresh_pattern (Release|Package(.gz)*)$    0    20%    2880&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;refresh_pattern .        0    20%    4320&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;upgrade_http0.9 deny shoutcast&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;acl apache rep_header Server ^Apache&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;broken_vary_encoding allow apache&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;extension_methods REPORT MERGE MKACTIVITY CHECKOUT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;hosts_file /etc/hosts&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;coredump_dir /var/spool/squid&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-4424659410895073603?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/4424659410895073603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=4424659410895073603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4424659410895073603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4424659410895073603'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2011/06/sample-squid-configuration-file.html' title='Sample Squid Configuration File'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7563849476247185588</id><published>2011-05-28T04:45:00.000-07:00</published><updated>2011-05-28T08:43:20.509-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Linux'/><title type='text'>Installing Windows Fonts on Ubuntu Linux</title><content type='html'>There are three (3) ways to install Windows fonts on Ubuntu Linux.  I have tested the following procedure under Ubuntu 10.10 Linux distribution but my guess is it should also work on other Linux distributions as well.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Way No. 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(1)  Access the Linux terminal by accessing the menu, Applications-&amp;gt;Accessories-&amp;gt;Terminal&lt;br /&gt;(2)  On the terminal, you have to be user "root" to install the package.  To become "root", issue the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ sudo su&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will prompt you for your password.  Type in your password.  If you are "root", the prompt should change from $ to #.&lt;br /&gt;&lt;br /&gt;(3)  To download and install the Windows fonts, type the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# apt-get install ttf-mscorefonts-installer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(4)  To load the fonts, type the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#  fc-cache -f -v&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I am assuming that your computer is connected to the Internet and therefore by issuing the above-mentioned commands, installation of the fonts becomes trivial.  As far as I know, you can also use the "Ubuntu Software Center" (click Applications-&amp;gt;Ubuntu Software Center) and look for the MS True Type Fonts package.&lt;br /&gt;&lt;br /&gt;If you are curious as to where the fonts are located, Ubuntu Linux copies the fonts to the directory "/usr/share/fonts".  This directory is only accessible to the "root" user.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Way No. 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In way 2, we will be installing fonts by manually copying the Windows fonts files and pasting it in the Ubuntu Linux directory.&lt;br /&gt;&lt;br /&gt;(1)  Copy the Windows fonts in your computer and place it in a transferable media such as a USB stick or CD.&lt;br /&gt;(2)  On the Ubuntu Linux computer, access the default home directory by going to "Places-&amp;gt;Home Folder".  On the home folder, check the "Show Hidden Files" on the "View" menu.&lt;br /&gt;(3)  Create the folder ".fonts".  Yes, the folder got a dot before the word fonts.  On Linux, folders with beginning dots means &lt;span style="font-style: italic;"&gt;hidden&lt;/span&gt; folders.&lt;br /&gt;(4)  Copy the Windows fonts to the ".fonts" folder.&lt;br /&gt;(5)  Load the fonts by issuing the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$   fc-cache -f -v&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see, you don't need to be a "root" user to do this procedure.  The fonts however will only be applied to the current user but not system wide unlike Way 1 procedure.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Way No. 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In way 3, the procedure involves making the fonts available system-wide.&lt;br /&gt;&lt;br /&gt;(1)  On the terminal, become "root" by issuing the command:&lt;br /&gt;&lt;br /&gt;$ sudo su&lt;br /&gt;&lt;br /&gt;(2)  Access the file manager in root mode by issuing the command:&lt;br /&gt;&lt;br /&gt;# nautilus&amp;amp;&lt;br /&gt;&lt;br /&gt;The file manager is called &lt;span style="font-style: italic;"&gt;nautilus&lt;/span&gt;.  The &amp;amp; makes the program independent of the terminal where it is run.&lt;br /&gt;&lt;br /&gt;(3)  Since you are already on the graphical file manager as "root", copy the Windows fonts to the Ubuntu Linux directory "/usr/share/fonts".  I suggest creating a separate folder under this like "msttcorefonts".&lt;br /&gt;&lt;br /&gt;(4) Load the fonts by issuing the command in the terminal:&lt;br /&gt;&lt;br /&gt;# &lt;span style="font-family:courier new;"&gt;fc-cache -f -v&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Other fonts can also be installed on Linux by following way 2 and 3 procedure above.&lt;br /&gt;&lt;br /&gt;By the way, if you are concerned about licensing, the Microsoft Core fonts I have mentioned above can be redistributed freely as depicted in its license terms.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7563849476247185588?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7563849476247185588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7563849476247185588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7563849476247185588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7563849476247185588'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2011/05/installing-windows-fonts-on-ubuntu.html' title='Installing Windows Fonts on Ubuntu Linux'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-2431794239608288053</id><published>2010-08-12T18:22:00.001-07:00</published><updated>2010-08-12T18:28:06.123-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Statistics'/><title type='text'>Formula for the Intercept and Slope</title><content type='html'>Given a two (2) variable equation of a straight line, the formula for the slope is:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Slope (b) = S xy / S x^2&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;where: &lt;/div&gt;&lt;div&gt;S = summation&lt;/div&gt;&lt;div&gt;             x = X minus the Mean of X&lt;/div&gt;&lt;div&gt;             y = Y minus the Mean of Y&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The formula for the intercept at its point of origin is:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Intercept (a) = M Y - b (M X)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;where: &lt;/div&gt;&lt;div&gt;M = arithmetic mean&lt;/div&gt;&lt;div&gt;             M Y = Mean of Y&lt;/div&gt;&lt;div&gt;             b = Slope&lt;/div&gt;&lt;div&gt;             M X = Mean of X&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-2431794239608288053?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/2431794239608288053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=2431794239608288053' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2431794239608288053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2431794239608288053'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2010/08/formula-for-intercept-and-slope.html' title='Formula for the Intercept and Slope'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7539054075072752139</id><published>2010-06-14T22:50:00.000-07:00</published><updated>2010-06-14T22:56:40.578-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Statistics'/><title type='text'>Getting the Square Root and Cube Root</title><content type='html'>The OpenOffice Calc spreadsheet formula for square root is:&lt;br /&gt;&lt;br /&gt;= sqrt ( A )&lt;br /&gt;&lt;br /&gt;Where A = data&lt;br /&gt;&lt;br /&gt;This can also be reformulated as:&lt;br /&gt;&lt;br /&gt;= A^(1/2)&lt;br /&gt;&lt;br /&gt;This reformulation is versatile as it can be extended to handle cube roots as follows:&lt;br /&gt;&lt;br /&gt;= A^(1/3)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7539054075072752139?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7539054075072752139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7539054075072752139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7539054075072752139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7539054075072752139'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2010/06/getting-square-root-and-cube-root.html' title='Getting the Square Root and Cube Root'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-2939175429954251792</id><published>2010-06-14T22:41:00.000-07:00</published><updated>2010-06-14T22:46:41.534-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Statistics'/><title type='text'>Harmonic Mean</title><content type='html'>The Harmonic Mean formula is:&lt;br /&gt;&lt;br /&gt;HM = 1.5 / (0.5/A + 0.5/B + 0.5/C )&lt;br /&gt;&lt;br /&gt;Where:  A, B, and C = sample data&lt;br /&gt;0.5 is the assigned weight for each  sample&lt;br /&gt;1.5 is the total assigned weight for all samples&lt;br /&gt;&lt;br /&gt;Given only two samples, the formula becomes:&lt;br /&gt;&lt;br /&gt;HM = 1 / ( 0.5/A + 0.5/B )&lt;br /&gt;&lt;br /&gt;The manual calculation of Harmonic Mean becomes tedious as the number of samples increases.&lt;br /&gt;&lt;br /&gt;OpenOffice Calc spreadsheet uses the following formula in calculating for the Harmonic Mean:&lt;br /&gt;&lt;br /&gt;= harmean ( range of cells of the sample data )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-2939175429954251792?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/2939175429954251792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=2939175429954251792' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2939175429954251792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2939175429954251792'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2010/06/harmonic-mean.html' title='Harmonic Mean'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-496936342828370705</id><published>2010-06-14T22:34:00.000-07:00</published><updated>2010-06-14T22:39:37.025-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Statistics'/><title type='text'>Geometric Mean Formula</title><content type='html'>The geometric mean formula is:&lt;br /&gt;&lt;br /&gt;GM = ( A * B * C ) ^ (1 / n )&lt;br /&gt;&lt;br /&gt;Where:  A, B, and C = sample data&lt;br /&gt;              n = is the number of samples, in this case 3&lt;br /&gt;&lt;br /&gt;If there are only 2 sample data, the formula becomes:&lt;br /&gt;&lt;br /&gt;GM = ( A * B ) ^ (1/2)&lt;br /&gt;&lt;br /&gt;The calculation of the Geometric Mean becomes tedious as soon as the number of samples increases.  Fortunately, modern spreadsheets can easily calculate this measure of central tendency.  The OpenOffice formula for the Geometric Mean is:&lt;br /&gt;&lt;br /&gt;=geomean( range of cells of the sample data )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-496936342828370705?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/496936342828370705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=496936342828370705' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/496936342828370705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/496936342828370705'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2010/06/geometric-mean-formula.html' title='Geometric Mean Formula'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-4603946855494160075</id><published>2009-10-02T06:41:00.000-07:00</published><updated>2009-10-02T06:46:15.657-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Linux'/><title type='text'>What is omserv running on port 764?</title><content type='html'>There is not much information on omserv running on port 764.  By doing trial and error and using the lsof command, I found that omserv is actually nfslock.   If you want to turn off this service (I surely do, since I don't know and use this service), issue the command:&lt;br /&gt;&lt;br /&gt;chkconfig --levels 2345 nfslock off&lt;br /&gt;&lt;br /&gt;This will remove the autoexecute of the nfslock.  Afterwards, issue the command to stop the process:&lt;br /&gt;&lt;br /&gt;/etc/rc.d/init.d/nfslock stop&lt;br /&gt;&lt;br /&gt;To verify if you have stopped the service, type the command:&lt;br /&gt;&lt;br /&gt;nmap localhost&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-4603946855494160075?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/4603946855494160075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=4603946855494160075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4603946855494160075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4603946855494160075'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/10/what-is-omserv-running-on-port-764.html' title='What is omserv running on port 764?'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7802571560261711694</id><published>2009-08-03T08:47:00.000-07:00</published><updated>2009-08-10T19:58:15.379-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Squid'/><title type='text'>Installing Squid as a Service</title><content type='html'>To install the Squid Proxy Cache Server as a service under Windows, issue the command:&lt;br /&gt;&lt;br /&gt;c:\squid\sbin\&gt;squid.exe -f c:\squid\etc\squid.conf -i -n Squid&lt;br /&gt;&lt;br /&gt;The name of the service is "Squid".  To verify, type the command "services.msc" and look up the name of "Squid" under the name services column.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7802571560261711694?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7802571560261711694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7802571560261711694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7802571560261711694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7802571560261711694'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/08/installing-squid-as-service.html' title='Installing Squid as a Service'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-2531080236407733038</id><published>2009-08-03T08:43:00.000-07:00</published><updated>2009-08-10T19:59:40.341-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on PostgreSQL'/><title type='text'>Installing PostgreSQL as a Service</title><content type='html'>To install the PostgreSQL database as a Service under Windows, issue the command the the PostgreSQL directory as follows:&lt;br /&gt;&lt;br /&gt;c:\pgsql\bin&gt; pg_ctl -D c:\pgsql\data register -N PostgreSQL&lt;br /&gt;&lt;br /&gt;In the above example, PostgreSQL is the name of the PostgreSQL service.  Type the command "services.msc" to verify the name "PostgreSQL".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-2531080236407733038?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/2531080236407733038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=2531080236407733038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2531080236407733038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2531080236407733038'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/08/installing-postgresql-as-service.html' title='Installing PostgreSQL as a Service'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-9051944475034419582</id><published>2009-07-19T20:13:00.000-07:00</published><updated>2009-07-19T20:23:29.266-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Statistics'/><title type='text'>Sample Size Formula</title><content type='html'>If you are at a lost as to how to determine your sample size, I suggest you use Taro Yamane's formula:&lt;br /&gt;&lt;br /&gt;n = N /[1+N(e)^2]&lt;br /&gt;&lt;br /&gt;where:&lt;br /&gt;&lt;br /&gt;n = sample size&lt;br /&gt;N = population size (the universe)&lt;br /&gt;e = sampling error (usually .10, .05 and .01 acceptable error)&lt;br /&gt;^ = raised to the power of&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-9051944475034419582?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/9051944475034419582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=9051944475034419582' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/9051944475034419582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/9051944475034419582'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/07/sample-size-formula.html' title='Sample Size Formula'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-1298165825507580046</id><published>2009-07-19T08:18:00.000-07:00</published><updated>2009-07-19T08:26:41.851-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Squid'/><title type='text'>Blocking Sites Using Squid</title><content type='html'>&lt;div style="text-align: left; font-family: georgia;"&gt;Steps&lt;br /&gt;&lt;/div&gt;&lt;pre style="font-family: georgia;font-family:lucida grande;" &gt;&lt;br /&gt;1.  Edit the squid.conf configuration file and add the following lines:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;acl blocksites url_regex "c:\squid\etc\squid-block.acl"&lt;br /&gt;http_access deny blocksites&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2.  Create the file "squid-block.acl" with the following pattern:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;.playboy.com&lt;br /&gt;.friendster.com&lt;br /&gt;.facebook.com&lt;br /&gt;porn&lt;br /&gt;pornstars&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will block the sites with URL playboy.com, friendster.com, facebook.com and&lt;br /&gt;pages with "porn" or "pornstars" entries.&lt;br /&gt;&lt;br /&gt;3.  Restart squid&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-1298165825507580046?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/1298165825507580046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=1298165825507580046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1298165825507580046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1298165825507580046'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/07/blocking-sites-using-squid.html' title='Blocking Sites Using Squid'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-5679666871599865140</id><published>2009-07-18T23:05:00.000-07:00</published><updated>2009-08-03T08:42:54.332-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Squid'/><title type='text'>Compiling and Running Squid on Windows</title><content type='html'>The following compilation procedure has been tested on MS Windows XP Professional using Squid 3.0 STABLE 16, MinGW 5.1.4 and MSYS 1.0.11.rc-1, ActivePerl 5.1.&lt;br /&gt;&lt;br /&gt;Steps&lt;br /&gt;&lt;br /&gt;1.  Download MinGW and MSYS from http://www.mingw.org&lt;br /&gt;2.  Download Squid source code from http://www.squid-cache.org&lt;br /&gt;3.  Download the Perl installer from http://www.activestate.com/activeperl/&lt;br /&gt;4.  Install MinGW under the directory c:\mingw&lt;br /&gt;5.  Install MSYS under the directory c:\msys.  Indicate where mingw is located when prompted by MSYS.&lt;br /&gt;&lt;br /&gt;6.  Add the path to Windows for the following directories:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;c:\msys\1.0\bin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;c:\msys\1.0\mingw\bin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;c:\msys\1.0\mingw\sbin&lt;br /&gt;c:\mingw\bin&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is done by going to "Start-&gt;Settings-&gt;Control Panel-&gt;System icon-&gt;Advanced tab-&gt;Environment Variables button". Then under the "System Variables" grouping, Select the "Path" and choose "Edit" button. Add the above directories at the end by delimiting it with a semi-colon (;).&lt;br /&gt;&lt;br /&gt;8.  Unpack the Squid source code and copy it to the directory c:\msys\1.0\home\{username}\squid.&lt;br /&gt;&lt;br /&gt;The source code is in tar.gz format.  You can use the 7zip software from http://www.7-zip.org to unpack the source code.&lt;br /&gt;&lt;br /&gt;9.  At the MSYS terminal, go to the Squid source code directory and run the compile commands as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;$ cd /home/{username}/squid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ ./configure --prefix=/usr/local/squid --enable-win32-service&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ make all&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ make install&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will create the Squid binaries in the following directory c:\msys\1.0\local\squid&lt;br /&gt;&lt;br /&gt;10. You can now copy the folder of Squid binaries to your desired location like "c:\squid" or create an installer package for your other machines.&lt;br /&gt;&lt;br /&gt;The MinGW and MSYS software are not needed by Squid once you are able to create its binaries under Windows.&lt;br /&gt;&lt;br /&gt;11.  Assuming that you have relocated the Squid binaries to c:\squid, edit the squid.conf configuration file to reflect the relative references to the file locations under Windows.&lt;br /&gt;&lt;br /&gt;12.  Initialize the cache by issuing the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;c:\squid\sbin&gt; squid.exe -z&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The will create the cache folders and files under c:\squid\var\cache&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;13.  Start the Squid server by issuing the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;c:\squid\sbin\squid -f c:\squid\etc\squid.conf &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will start Squid and will load the configuration file squid.conf under the directory c:\squid\etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-5679666871599865140?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/5679666871599865140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=5679666871599865140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5679666871599865140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5679666871599865140'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/07/compiling-squid-on-windows.html' title='Compiling and Running Squid on Windows'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7936446441821228912</id><published>2009-07-12T02:51:00.001-07:00</published><updated>2009-07-12T05:19:33.624-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on PostgreSQL'/><title type='text'>Initializing, Starting, Stopping, and Accessing the PostgreSQL Server on Windows</title><content type='html'>This assumes that you have the PostgreSQL binaries for Windows and that you have placed it at "c:\pgsql" directory.  To set up PostgreSQL, copy the "libpq.dll" file located in the directory "c:\pgsql\lib" to the "c:\windows\system32" directory as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;c:\pgsql\lib&gt; copy libpq.dll c:\windows\system32&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To initialize the database, create the data directory and initialize it by issuing the "initdb" command in the "c:\pgsql\bin" directory as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;c:\pgsql\bin&gt;mkdir c:\pgsql\data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;c:\pgsql\bin&gt;initdb -D "c:\pgsql\data"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To start the database, type the "pg_ctl" command as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;c:\pgsql\bin&gt;  pg_ctl -D "c:\pgsql\data" -l logfile start&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will start the PostgreSQL database and create the database log file "logfile".&lt;br /&gt;&lt;br /&gt;To stop the database, type the "pg_ctl" command as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;c:\pgsql\bin&gt; pg_ctl -D "c:\pgsql\data" stop&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To access the database at the DOS command prompt on Windows, type the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;c:\pgsql\bin&gt; cmd.exe /c chcp 1252&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;c:\pgsql\bin&gt; psql&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7936446441821228912?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7936446441821228912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7936446441821228912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7936446441821228912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7936446441821228912'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/07/initializing-starting-stopping-and.html' title='Initializing, Starting, Stopping, and Accessing the PostgreSQL Server on Windows'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-3648665013972572028</id><published>2009-07-12T02:51:00.000-07:00</published><updated>2009-07-18T00:31:05.894-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on PostgreSQL'/><title type='text'>Compiling PostgreSQL on Windows</title><content type='html'>The following compilation procedure has been tested on MS Windows XP Professional using PostgreSQL 8.4.0, MinGW 5.1.4 and MSYS 1.0.11.rc-1.&lt;br /&gt;&lt;br /&gt;Steps&lt;br /&gt;&lt;br /&gt;1.  Download MinGW and MSYS from http://www.mingw.org&lt;br /&gt;2.  Download PostgreSQL source code from http://www.postgresql.org&lt;br /&gt;3.  Download the zlib compression library from http://www.zlib.org&lt;br /&gt;4.  Install MinGW under the directory c:\mingw&lt;br /&gt;5.  Install MSYS under the directory c:\msys.  Indicate where mingw is located when prompted by MSYS.&lt;br /&gt;&lt;br /&gt;6.  Add the path to Windows for the following directories:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;c:\msys\1.0\bin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;c:\msys\1.0\mingw\bin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;c:\msys\1.0\mingw\sbin&lt;br /&gt;c:\mingw\bin&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is done by going to "Start-&gt;Settings-&gt;Control Panel-&gt;System icon-&gt;Advanced tab-&gt;Environment Variables button". Then under the "System Variables" grouping, Select the "Path" and choose "Edit" button. Add the above directories at the end by delimiting it with a semi-colon (;).&lt;br /&gt;&lt;br /&gt;7.  Install the zlib library:&lt;br /&gt;&lt;br /&gt;a)  Unpack the zlib in MSYS (c:\msys\home\{username}\zlib)&lt;br /&gt;b)  Run MSYS by typing the msys.bat file in c:\msys\1.0&lt;br /&gt;c)  At the MSYS terminal, type the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;$ cd /home/{username}/zlib&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ make -f win32/Makefile.gcc&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;d)  Copy the zlib1.dll to c:\mingw\bin&lt;br /&gt;e)  Copy the libzdll.a and libz.a to c:\mingw\lib&lt;br /&gt;f)   Copy the zlib.h and zconf.h to c:\mingw\include&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.  Unpack the PostgreSQL source code and copy it to the directory c:\msys\1.0\home\{username}\postgresql.&lt;br /&gt;&lt;br /&gt;The source code is in tar.gz format.  You can use the 7zip software from http://www.7-zip.org to unpack the source code.&lt;br /&gt;&lt;br /&gt;9.  At the MSYS terminal, go to the PostgreSQL source code directory and run the compile commands as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;$ cd /home/{username}/postgresql&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ ./configure&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ make&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ make install&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will create the PostgreSQL binaries in the following directory c:\msys\1.0\local\pgsql&lt;br /&gt;&lt;br /&gt;10.  Create the default data directory for PostgreSQL as "c:\msys\1.0\local\pgsql\data"&lt;br /&gt;&lt;br /&gt;11.  You can now copy the folder of PostgreSQL binaries to your desired location like "c:\pgsql" or create an installer package for your other machines.&lt;br /&gt;&lt;br /&gt;The MinGW and MSYS software are not needed by PostgreSQL once you are able to create its binaries under Windows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-3648665013972572028?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/3648665013972572028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=3648665013972572028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/3648665013972572028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/3648665013972572028'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/07/compiling-postgresql-on-windows.html' title='Compiling PostgreSQL on Windows'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-5494335486088063924</id><published>2009-06-29T01:34:00.000-07:00</published><updated>2009-06-29T02:32:21.589-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on PostgreSQL'/><title type='text'>Web-based Administration of PostgreSQL</title><content type='html'>The web-based administration tool for PostgreSQL is the "phppgadmin" software.  The software is freely downloadable at the "http://phppgadmin.sourceforge.net" website.&lt;br /&gt;&lt;br /&gt;To install the phppgadmin on Ubuntu 9.04, issue the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# apt-get install phppgadmin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Afterwards, the phppgadmin is now accessible using the browser at the localhost address of "http://localhost/phppgadmin".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Common Problem&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1.    You cannot access the database using the "postgres" user.&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;login as postgres user and create another administrator user as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# su postgres&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ psql&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ createuser myadmin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When prompted if the user will be "administrator", choose "yes" as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;postgres@asus:/home/clemrasul$ createuser&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Enter name of role to add: myadmin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Shall the new role be a superuser? (y/n) y&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style="font-family:times new roman;"&gt;Then, use the new administrator username and password to login into the phppgadmin web interface.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-5494335486088063924?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/5494335486088063924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=5494335486088063924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5494335486088063924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5494335486088063924'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/06/web-based-administration-of-postgresql.html' title='Web-based Administration of PostgreSQL'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-1708130489760318908</id><published>2009-06-29T01:25:00.000-07:00</published><updated>2009-06-29T01:31:00.677-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on PostgreSQL'/><title type='text'>GUI Administration of PostgreSQL</title><content type='html'>The graphical user interface (GUI) administration tool for PostgreSQL is "pgadmin".  To install "pgadmin" on Ubuntu 9.04, issue the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#apt-get install pgadmin3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will install the "pgadmin" software under "Applications -&gt; Programming -&gt; PgAdmin III".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-1708130489760318908?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/1708130489760318908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=1708130489760318908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1708130489760318908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1708130489760318908'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/06/gui-administration-of-postgresql.html' title='GUI Administration of PostgreSQL'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-231320970237318310</id><published>2009-06-29T01:07:00.000-07:00</published><updated>2009-06-29T01:15:53.685-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on PostgreSQL'/><title type='text'>Accessing PostgreSQL on CLI</title><content type='html'>The command line interface (CLI) of PostgreSQL is called "psql".  To access the PostgreSQL server, issue the following commands:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# su postgres&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ psql&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first command is to shift from the "root" user to the "postgres" user.  PostgreSQL does not allow "root" login.  Instead, it uses the "postgres" user as the default administrator of the system.&lt;br /&gt;&lt;br /&gt;The second command is to invoke the "psql" CLI under the user "postgres".&lt;br /&gt;&lt;br /&gt;The following is the screen example of the above-mentioned command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;root@asus:/etc/init.d# su postgres&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;postgres@asus:/etc/init.d$ psql&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Welcome to psql 8.3.7, the PostgreSQL interactive terminal.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Type:  \copyright for distribution terms&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       \h for help with SQL commands&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       \? for help with psql commands&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       \g or terminate with semicolon to execute query&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       \q to quit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;postgres=# &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Given the psql, you can now create databases and users.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-231320970237318310?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/231320970237318310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=231320970237318310' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/231320970237318310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/231320970237318310'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/06/accessing-postgresql-on-cli.html' title='Accessing PostgreSQL on CLI'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-115458894713810971</id><published>2009-06-29T00:43:00.000-07:00</published><updated>2009-06-29T01:24:11.115-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on PostgreSQL'/><title type='text'>Installing PostgreSQL on Ubuntu</title><content type='html'>&lt;span style="font-weight: bold;"&gt;What is PostgreSQL?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;PostgreSQL is a production-grade multi-platform SQL database system.  The database system is ANSI SQL92/99 compliant.  The software is freely downloadable at http://www.postgresql.org website and is licensed under the BSD open source license. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Installation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To install PosgreSQL on Ubuntu 9.04, issue the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# apt-get install postgresql&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To start PostgreSQL, issue the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#/etc/init.d/postgresql-8.3 start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To restart PostgreSQL, issue the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#/etc/init.d/postgresql-8.3 restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To stop PostgreSQL, issue the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#/etc/init.d/postgresql-8.3 stop&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;More Notes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a)  Default port of PostgreSQL is "5342"&lt;br /&gt;b)  Default database administrator username is "postgres"&lt;br /&gt;c)  Default database template is "template1"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Limits&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;According to the PostgreSQL website, the following are PostgreSQL 8.3 limits:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;table style="font-family: courier new;" border="0"&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="bold"&gt;&lt;b&gt;Limit&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="bold"&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Maximum Database Size&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Unlimited&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Maximum Table Size&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;32 TB&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Maximum Row Size&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;1.6 TB&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Maximum Field Size&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;1 GB&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Maximum Rows per Table&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Unlimited&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Maximum Columns per Table&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;250 - 1600 depending on column types&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Maximum Indexes per Table&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Unlimited&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;License Text&lt;/span&gt;&lt;br /&gt;&lt;h1 style="font-family: courier new;"&gt;&lt;span style="font-size:78%;"&gt;License&lt;/span&gt;&lt;/h1&gt; &lt;h2 style="font-family: courier new;"&gt;&lt;span style="font-size:78%;"&gt;PostgreSQL is released under the BSD license.&lt;/span&gt;&lt;/h2&gt; &lt;span style="font-size:78%;"&gt;&lt;span style="font-family: courier new;"&gt;PostgreSQL Database Management System&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; (formerly known as Postgres, then as Postgres95)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  Portions Copyright (c) 1996-2008, The PostgreSQL Global Development Group&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  Portions Copyright (c) 1994, The Regents of the University of California&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-115458894713810971?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/115458894713810971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=115458894713810971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/115458894713810971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/115458894713810971'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/06/installing-postgresql-on-ubuntu.html' title='Installing PostgreSQL on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-2495136073230227098</id><published>2009-06-24T05:58:00.000-07:00</published><updated>2009-06-24T06:09:01.108-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on SSH'/><title type='text'>Restricting Access of Local Users to SSHD</title><content type='html'>&lt;span style="font-weight: bold;"&gt;How to restrict access of local users to the OpenSSH services?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Step 1:  Assuming you want to restrict the user "myfriend", edit the "/etc/ssh/sshd_config" file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# vi /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Step 2:  Insert the following line in the file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DenyUsers myfriend&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Step 3:  Save and restart your SSH server:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# /etc/rc.d/init.d/sshd restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tested&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have tested the above procedure on CentOS 5.3 with OpenSSH as the SSH server software.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Furthermore&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(a)    For two or more users, the format of the "DenyUsers" directive is as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DenyUsers user1 user2 user3 user4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(b)   To restrict groups, the directive is "DenyGroups".  The format is as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DenyGroups group1 group2 group3 group4&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-2495136073230227098?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/2495136073230227098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=2495136073230227098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2495136073230227098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2495136073230227098'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/06/restricting-access-of-local-users-to.html' title='Restricting Access of Local Users to SSHD'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-5939537600554648320</id><published>2009-06-22T17:38:00.000-07:00</published><updated>2009-06-22T18:00:52.906-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on DenyHosts'/><title type='text'>Installing DenyHosts</title><content type='html'>&lt;p style="font-weight: bold;"&gt;What is DenyHosts?&lt;/p&gt;&lt;p&gt;DenyHosts is a small python program created by Phil Schwartz which is intended to stop SSH attacks by adding an entry to the /etc/hosts.deny file on UNIX/LINUX systems based on the number of failed logins.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Software License&lt;/p&gt;&lt;p&gt;The program is licensed under the General Public License (GPL) version 2.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Download&lt;/p&gt;&lt;p&gt;The program can be downloaded from &lt;a href="http://denyhosts.sourceforge.net/"&gt;http://denyhosts.sourceforge.net/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Installing DenyHosts&lt;/p&gt;&lt;p&gt;Using an rpm package of DenyHost, issue the command as "root" user:&lt;/p&gt;&lt;p&gt;# rpm -Uvh DenyHosts-2.6-python2.4.noarch.rpm&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;DenyHost Files&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;/usr/bin/denyhosts.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/__init__.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/__init__.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/allowedhosts.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/allowedhosts.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/constants.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/constants.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/counter.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/counter.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/daemon.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/daemon.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/deny_hosts.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/deny_hosts.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/denyfileutil.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/denyfileutil.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/filetracker.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/filetracker.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/lockfile.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/lockfile.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/loginattempt.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/loginattempt.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/old-daemon.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/old-daemon.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/plugin.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/plugin.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/prefs.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/prefs.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/purgecounter.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/purgecounter.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/python_version.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/python_version.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/regex.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/regex.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/report.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/report.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/restricted.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/restricted.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/sync.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/sync.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/util.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/util.pyc&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/version.py&lt;br /&gt;/usr/lib/python2.4/site-packages/DenyHosts/version.pyc&lt;br /&gt;/usr/share/denyhosts/CHANGELOG.txt&lt;br /&gt;/usr/share/denyhosts/LICENSE.txt&lt;br /&gt;/usr/share/denyhosts/README.txt&lt;br /&gt;/usr/share/denyhosts/daemon-control-dist&lt;br /&gt;/usr/share/denyhosts/denyhosts.cfg-dist&lt;br /&gt;/usr/share/denyhosts/plugins/README.contrib&lt;br /&gt;/usr/share/denyhosts/plugins/shorewall_allow.sh&lt;br /&gt;/usr/share/denyhosts/plugins/shorewall_deny.sh&lt;br /&gt;/usr/share/denyhosts/plugins/test_deny.py&lt;br /&gt;/usr/share/denyhosts/scripts/restricted_from_invalid.py&lt;br /&gt;/usr/share/denyhosts/scripts/restricted_from_passwd.py&lt;br /&gt;/usr/share/denyhosts/setup.py&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Tested&lt;/p&gt;&lt;p&gt;The installation of the program is fairly easy.  I have tested it under CentOS 5.3 with Python 2.4 installation.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;Installation Instruction&lt;/p&gt;&lt;p&gt;Read the README.txt file.  The README.txt files contains a clear installation instruction for the program.  This file is reproduced below:&lt;/p&gt;&lt;p style="font-family: courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;DenyHosts is a utility developed by Phil Schwartz which aims to &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;thwart sshd (ssh server) brute force attacks.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Please refer to http://www.denyhosts.net/faq.html&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;INSTALLATION:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;=============&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SOURCE DISTRIBUTION&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;===================&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;If you downloaded the source distribution file (DenyHosts-#.#.#-tar.gz)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;then:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ tar zxvf DenyHosts-#.#.#-tar.gz       (Where #.#.# is the version)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ cd DenyHosts-#.#.#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;as root:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# python setup.py install&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;This will install the DenyHosts modules into python's site-packages &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;directory.  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;BINARY DISTRIBUTION (rpm, deb, etc)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;===================&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;It is assumed that you are familiar with installing a binary package&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;on your particular operating system.  If you are unsure how to do&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;this, you may wish to install from souce instead.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ALL DISTRIBUTIONS &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;=================&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Once you have installed DenyHosts, by default the directory&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/usr/share/denyhosts will be created and a sample configuration &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;file will be copied into it. A sample daemon-control script will &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;also be copied into the /usr/share/denyhosts directory.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DenyHosts requires that a configuration file be created before&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;it can function.  The sample configuration file denyhosts.cfg-dist&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;contains most of the possible settings and should be copied and&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;then edited as such:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# cp denyhosts.cfg-dist denyhosts.cfg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# &lt;edit&gt; denyhosts.cfg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;(where &lt;edit&gt; is your preferred text editor such as emacs, vi, etc)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;The sample configuration file contains informational comments that&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;should help you quickly configure DenyHosts.  After you have&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;edited your configuration file, save it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Next, if you intend to run DenyHosts in daemon mode (recommended) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;copy the sample daemon-control.dist script as such:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# cp daemon-control-dist daemon-control&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Edit the daemon-control file.  You should only need to edit this section&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;near the top:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;###############################################&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;#### Edit these to suit your configuration ####&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;###############################################&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DENYHOSTS_BIN   = "/usr/bin/denyhosts.py"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DENYHOSTS_LOCK  = "/var/lock/subsys/denyhosts"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DENYHOSTS_CFG   = "/usr/share/denyhosts/denyhosts.cfg"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;These defaults should be reasonable for many systems.  You&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;should customize these settings to match your particular&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;system.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Once you have edited the configuration and daemon control files&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;make sure that the daemon control script it executable (by root).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# chown root daemon-control&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# chmod 700 daemon-control&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;STARTING DENYHOSTS MANUALLY&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;===========================&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Assuming you have configured DenyHosts to run as a daemon, you&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;can use the daemon-control script to control it:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# daemon-control start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;You should refer to the daemon log (typically /var/log/denyhosts)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;to ensure that DenyHosts is running successfully.  If you&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;notice any problems you may wish to consult the FAQ at&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;http://www.denyhosts.net/faq.html&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;If you wish to run DenyHosts from cron rather than as a &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;daemon, please refer to the FAQ.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;STARTING DENYHOSTS AUTOMATICALLY&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;================================&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;METHOD 1 (preferred)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;====================&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Create a symbolic link from /etc/init.d such as:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# cd /etc/init.d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# ln -s /usr/share/denyhosts/daemon-control denyhosts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;If you have chkconfig installed you can then use it to&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ensure that DenyHosts runs at boot time:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# chkconfig --add denyhosts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;If you do not have chkconfig (or similar) installed you can either manually&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;create the symlinks in /etc/rc2.d, /etc/rc3.d, /etc/rc5.d but that is beyond&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;the scope of this document.  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;METHOD 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;========&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Add an entry into the /etc/rc.local file:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/usr/share/denyhosts/daemon-control start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-5939537600554648320?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/5939537600554648320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=5939537600554648320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5939537600554648320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5939537600554648320'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/06/installing-denyhosts.html' title='Installing DenyHosts'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-901138636942794757</id><published>2009-05-04T05:44:00.000-07:00</published><updated>2009-05-04T05:47:51.452-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on PHP'/><title type='text'>Installing PHP on Ubuntu</title><content type='html'>To install PHP on Ubuntu 8.10, issue the following command:&lt;br /&gt;&lt;br /&gt;#apt-get install php5&lt;br /&gt;#apt-get install libapache2-mod-php5&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-901138636942794757?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/901138636942794757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=901138636942794757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/901138636942794757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/901138636942794757'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/05/installing-php-on-ubuntu.html' title='Installing PHP on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7186882368295646081</id><published>2009-05-01T07:06:00.000-07:00</published><updated>2009-05-01T07:09:43.408-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on SSH'/><title type='text'>Disallow Root Login on SSHD</title><content type='html'>To disallow root login access on ssh, open the file "/etc/ssh/sshd_config" and edit or add the line:&lt;br /&gt;&lt;br /&gt;PermitRootLogin no&lt;br /&gt;&lt;br /&gt;Then restart your sshd server:&lt;br /&gt;&lt;br /&gt;#/etc/rc.d/init.d/sshd restart&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7186882368295646081?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7186882368295646081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7186882368295646081' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7186882368295646081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7186882368295646081'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/05/disallow-root-login-on-sshd.html' title='Disallow Root Login on SSHD'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-6950354818328657862</id><published>2009-05-01T05:46:00.000-07:00</published><updated>2009-05-01T05:49:11.451-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Dovecot'/><title type='text'>Installing Dovecot on CentOS</title><content type='html'>To install the Dovecot on your CentOS 5.2 server, issue the command:&lt;br /&gt;&lt;br /&gt;#yum install dovecot&lt;br /&gt;&lt;br /&gt;If you are installing the RPM package that comes with the CD, the command to install dovecot is:&lt;br /&gt;&lt;br /&gt;#rpm -Uvh dovecot-1.0.7-2.el5.i386.rpm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-6950354818328657862?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/6950354818328657862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=6950354818328657862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6950354818328657862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6950354818328657862'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/05/installing-dovecot-on-centos.html' title='Installing Dovecot on CentOS'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7618834586733273000</id><published>2009-05-01T05:37:00.000-07:00</published><updated>2009-05-01T05:41:03.965-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Linux'/><title type='text'>What is port 111 on my CentOS box?</title><content type='html'>Port 111 on my CentOS 5.2 box is the "portmap" service.  You can turn this off by issuing the following command:&lt;br /&gt;&lt;br /&gt;#/etc/rc.d/init.d/portmap stop&lt;br /&gt;&lt;br /&gt;By default, this is turned on my machine.  So upon reboot of your machine, expect that is again turned on.  If you want to set the default execution to off, issue the command:&lt;br /&gt;&lt;br /&gt;#chkconfig --levels 2345 portmap off&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7618834586733273000?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7618834586733273000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7618834586733273000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7618834586733273000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7618834586733273000'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/05/what-is-port-111-on-my-centos-box.html' title='What is port 111 on my CentOS box?'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-5225851415080709012</id><published>2009-04-26T02:23:00.000-07:00</published><updated>2009-04-26T02:26:33.422-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Solaris'/><title type='text'>Home Directory of Solaris</title><content type='html'>The default home directory of Solaris 2008.11 is "/export/home".  This location is different from all distributions of Linux which places the user's home directories under "/home".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-5225851415080709012?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/5225851415080709012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=5225851415080709012' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5225851415080709012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5225851415080709012'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/home-directory-of-solaris.html' title='Home Directory of Solaris'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-1248366765966213777</id><published>2009-04-26T02:16:00.000-07:00</published><updated>2009-04-26T02:23:41.856-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Solaris'/><title type='text'>Installing Flash Player on Firefox under Solaris 2008.11</title><content type='html'>The following are  the steps on how to install the flash player in Firefox under Solaris 2008.11:&lt;br /&gt;&lt;br /&gt;1.  Download the flash player package at the www.adobe.com website (flash_player_10_solaris_x86.tar.bz2)&lt;br /&gt;&lt;br /&gt;2.  Unpack the package by clicking on the file and clicking the "extract" button&lt;br /&gt;&lt;br /&gt;3.  On the extracted directory, copy the file (libflashplayer.so) and place it under the directory "/usr/lib/firefox/plugins"&lt;br /&gt;&lt;br /&gt;4.  Restart Firefox&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-1248366765966213777?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/1248366765966213777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=1248366765966213777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1248366765966213777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1248366765966213777'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/installing-flash-player-on-firefox.html' title='Installing Flash Player on Firefox under Solaris 2008.11'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-2925393249332723706</id><published>2009-04-26T01:35:00.000-07:00</published><updated>2009-04-26T02:16:09.784-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Solaris'/><title type='text'>Review of Solaris 2008.11</title><content type='html'>If you are like me who enjoys testing various operating systems, then you must have heard about Solaris.  Solaris is an industrial-grade server operating system published by Sun Microsystems.  I've always wanted to test drive Solaris but I don't have the resources to do so, up still recently when Sun placed Solaris under open source.  Now I can test drive the system. &lt;br /&gt;&lt;br /&gt;I tried downloading the latest Solaris version that comes under the name OpenSolaris 2008.11.  Here are my notes:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Desktop&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Solaris now sports a pretty GNOME desktop interface.  So if you are an old Linux hand like me, you will feel at home with the graphical user interface.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;RAM&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Solaris 2008.11 requires a huge  memory to effectively install it.  On my machine, it required 512MB of RAM.  Anything lower, the system will not install.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Home Directory&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To my surprise, the user's home directory is not located in "/home" unlike in all distributions of Linux.  It is located in "/export/home".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;User Name&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Solaris still does not support long usernames.  So you will have to make do with an 8-letter username.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Internet Browser&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The default Internet browser is Mozilla Firefox.  However, you cannot view "youtube" since flash has to be manually installed.  Fortunately, there is a flash player available for Solaris which you can download from www.adobe.com. &lt;br /&gt;&lt;br /&gt;To install the flash player, download and unpack the flash player package (flash_player_10_solaris_x86.tar.bz2).  The package only contains one file (libflashplayer.so) and does not contain any instructions on how to install it.  So I tried experimenting with it given my knowledge of Firefox.  Here is what I did:&lt;br /&gt;&lt;br /&gt;a)  I copied the file (libflashplayer.so) to the Firefox plugin directory at "/usr/lib/firefox/plugins"&lt;br /&gt;b)  Then, I restarted Firefox.&lt;br /&gt;&lt;br /&gt;I went immediately to youtube to test if the flash player will work.  To my delight, it did!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Office Suite&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;OpenOffice is not part of the installer CD.  But my guess is, it can easily be installed since it is published by Sun Microsystems.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Network Card&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Solaris 2008.11 still got limited network card support unlike Linux.  I tried installing it on three other desktops, it did not work.  There was no driver support for the network card.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Sound&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On all three desktops and 1 laptop I installed Solaris 2008.11 on, none of the built-in sound  card was supported.  I did not investigate any further as all distributions of Linux do not have problems with the sound card on all of those machines.  My guess is, Solaris 2008.11 still needs some polishing in terms of its driver support.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-2925393249332723706?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/2925393249332723706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=2925393249332723706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2925393249332723706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2925393249332723706'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/review-of-solaris-200811.html' title='Review of Solaris 2008.11'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-3826723942366814413</id><published>2009-04-25T06:38:00.000-07:00</published><updated>2009-04-25T06:40:57.053-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on VirtualBox'/><title type='text'>Installing VirtualBox</title><content type='html'>VirtualBox is a software package that allows you to install Windows in a virtual environment.  Under Ubuntu 8.10 and 9.04, VirtualBox can be installed by issuing the following command:&lt;br /&gt;&lt;br /&gt;#apt-get install virtualbox&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-3826723942366814413?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/3826723942366814413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=3826723942366814413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/3826723942366814413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/3826723942366814413'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/installing-virtualbox.html' title='Installing VirtualBox'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-6926279962165911384</id><published>2009-04-17T03:36:00.000-07:00</published><updated>2009-04-17T03:37:58.376-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on GIMP'/><title type='text'>Adjusting Image Sizes in GIMP</title><content type='html'>To adjust image sizes in GIMP, click on "Image"-&gt;"Scale".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-6926279962165911384?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/6926279962165911384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=6926279962165911384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6926279962165911384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6926279962165911384'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/adjusting-image-sizes-in-gimp.html' title='Adjusting Image Sizes in GIMP'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-2478396045867607069</id><published>2009-04-17T03:27:00.000-07:00</published><updated>2009-04-17T03:29:15.980-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Squid'/><title type='text'>Installing Squid on Ubuntu</title><content type='html'>Squid is an industrial grade web proxy server cache.  To install squid on Ubuntu 8.10, issue the following command:&lt;br /&gt;&lt;br /&gt;#apt-get install squid&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-2478396045867607069?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/2478396045867607069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=2478396045867607069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2478396045867607069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2478396045867607069'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/installing-squid-on-ubuntu.html' title='Installing Squid on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-1186608528433716874</id><published>2009-04-16T08:56:00.000-07:00</published><updated>2009-04-16T08:57:23.516-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Squirrelmail'/><title type='text'>Installing Squirrelmail on Ubuntu</title><content type='html'>To install the Squirrelmail web interface software on Ubuntu 8.10, issue the command:&lt;br /&gt;&lt;br /&gt;#apt-get install squirrelmail&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-1186608528433716874?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/1186608528433716874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=1186608528433716874' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1186608528433716874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1186608528433716874'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/installing-squirrelmail-on-ubuntu.html' title='Installing Squirrelmail on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7696950005879600932</id><published>2009-04-16T08:54:00.000-07:00</published><updated>2009-04-16T08:55:49.770-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on BIND'/><title type='text'>Installing BIND on Ubuntu</title><content type='html'>To install BIND on Ubuntu 8.10, issue the command:&lt;br /&gt;&lt;br /&gt;#apt-get install bind9&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7696950005879600932?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7696950005879600932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7696950005879600932' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7696950005879600932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7696950005879600932'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/installing-bind-on-ubuntu.html' title='Installing BIND on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-1101874981936054665</id><published>2009-04-16T08:51:00.001-07:00</published><updated>2009-04-16T09:01:18.517-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on DHCP'/><title type='text'>Installing ISC's DHCP Server on Ubuntu</title><content type='html'>To install ISC's DHCP server on Ubuntu 8.10, issue the following command:&lt;br /&gt;&lt;br /&gt;#apt-get install dhcp&lt;br /&gt;&lt;br /&gt;The configuration file of the ISC's DHCP server (dhcpd.conf) is located in the director "/etc/dhcp3".&lt;br /&gt;&lt;br /&gt;The server can be started by issuing the command:&lt;br /&gt;&lt;br /&gt;#/etc/dhcp3-server start&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-1101874981936054665?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/1101874981936054665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=1101874981936054665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1101874981936054665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1101874981936054665'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/installing-iscs-dhcp-server-on-ubuntu.html' title='Installing ISC&apos;s DHCP Server on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-9169747963885811369</id><published>2009-04-16T08:42:00.000-07:00</published><updated>2009-04-16T09:00:47.523-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on GIMP'/><title type='text'>GIMP Commands for Slicing Images</title><content type='html'>Why do you want to slice images?  Well, for most web designers, slicing images into smaller image files tend to make the images load faster when using a browser.  GIMP allows you to easily slice images and create the corresponding HTML fragment file which you can copy and paste to your web page.  Here is how:&lt;br /&gt;&lt;br /&gt;1.  Go to the menu "Image"-&gt;"Guides"-&gt;"New Guide"&lt;br /&gt;2.  Then select the preferred guide.  Usually you either choose horizontal or vertical.  Choosing horizontal will give you a horizontal guide rule which you can transfer to the part of the image you want sliced.&lt;br /&gt;3.  To slice, click on the menu "Filter"-&gt;"Web"-&gt;"Slice"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-9169747963885811369?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/9169747963885811369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=9169747963885811369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/9169747963885811369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/9169747963885811369'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/gimp-commands-for-slicing-images.html' title='GIMP Commands for Slicing Images'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-6470208563389896391</id><published>2009-04-16T08:38:00.000-07:00</published><updated>2009-04-16T08:50:43.750-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Dovecot'/><title type='text'>Installing Dovecot IMAP4 and POP3 Mail Delivery Agent on Ubuntu</title><content type='html'>Dovecot is a secured IMAP4 and POP3 mail delivery agent (MDA).  To install, issue the following command:&lt;br /&gt;&lt;br /&gt;#apt-get install dovecot-imapd&lt;br /&gt;#apt-get install dovecot-pop3d&lt;br /&gt;&lt;br /&gt;The configuration file of Dovecot (dovecot.conf) can be found in the directory "/etc/dovecot".&lt;br /&gt;&lt;br /&gt;The package usually works in tandem with the Postfix SMTP mail transfer agent (MTA).  I've tested the above commands under Ubuntu 8.10.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-6470208563389896391?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/6470208563389896391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=6470208563389896391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6470208563389896391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6470208563389896391'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/installing-dovecot-imap4-and-pop3-mail.html' title='Installing Dovecot IMAP4 and POP3 Mail Delivery Agent on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7392996150369369452</id><published>2009-04-16T08:36:00.000-07:00</published><updated>2009-04-16T08:37:41.160-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Postfix'/><title type='text'>Installing the Postfix SMTP Mail Server on Ubuntu</title><content type='html'>To install the Postfix SMTP mail server on Ubuntu 8.10, issue the command:&lt;br /&gt;&lt;br /&gt;#apt-get install postfix&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7392996150369369452?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7392996150369369452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7392996150369369452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7392996150369369452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7392996150369369452'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/installing-postfix-smtp-mail-server-on.html' title='Installing the Postfix SMTP Mail Server on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-4104739709720916328</id><published>2009-04-16T08:31:00.000-07:00</published><updated>2009-04-16T08:36:08.388-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on MySQL'/><title type='text'>Installing MySQL on Ubuntu</title><content type='html'>As always, various distributions of Linux have different ways of naming their software packages.  In the case of Ubuntu 8.10 Linux, the software packages for MySQL database system are: "mysql-client" and "mysql-server".  To install MySQL on Ubuntu, issue the following commands:&lt;br /&gt;&lt;br /&gt;#apt-get install mysql-client&lt;br /&gt;#apt-get install mysql-server&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-4104739709720916328?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/4104739709720916328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=4104739709720916328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4104739709720916328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4104739709720916328'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/installing-mysql-on-ubuntu.html' title='Installing MySQL on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7335571231152513487</id><published>2009-04-15T08:10:00.000-07:00</published><updated>2009-04-15T08:22:00.384-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Apache'/><title type='text'>Installing Apache on Ubuntu</title><content type='html'>Ubuntu is one of the Linux distributions that grew out of the Debian Linux distribution.  Unlike the RedHat-based distributions (RedHat, Fedora, CentOS and Mandrake), installation under Ubuntu does not use the "yum" command.  Instead it uses the "apt-get" command.  Variation also exists between the package names under Ubuntu and those of the RedHat-based distributions.&lt;br /&gt;&lt;br /&gt;Installing the Apache web server under Ubuntu uses the following command:&lt;br /&gt;&lt;br /&gt;#apt-get install apache2&lt;br /&gt;&lt;br /&gt;As you may have noticed, the package name for the Apache web server is "apache2" instead of "httpd" under RedHat-based distributions.&lt;br /&gt;&lt;br /&gt;You can also install the accompanying PHP scripting engine by issuing the following commands:&lt;br /&gt;&lt;br /&gt;#apt-get install php5&lt;br /&gt;#apt-get install libapache2-mod-php5&lt;br /&gt;&lt;br /&gt;The home directory of the Apache web server is located in "/var/www" directory instead of "/var/www/html" directory under RedHat-based distributions.&lt;br /&gt;&lt;br /&gt;I've tested the above procedure under Ubuntu 8.10.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7335571231152513487?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7335571231152513487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7335571231152513487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7335571231152513487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7335571231152513487'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/04/installing-apache-on-ubuntu.html' title='Installing Apache on Ubuntu'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-1112624567925610426</id><published>2009-03-05T18:58:00.000-08:00</published><updated>2009-03-05T19:11:20.131-08:00</updated><title type='text'>What is Port 898 on my CentOS box?</title><content type='html'>What is port 898 on my Linux CentOS box?  Using the #nmap program, I was able to verify that on my system port 898 is open and the service name is "sun-manageconsole".  Since I do not know what sun-manageconsole is, I issued the #lsof command to verify what open file is associated with it:&lt;br /&gt;&lt;br /&gt;#lsof | grep 898&lt;br /&gt;&lt;br /&gt;This gave me the information that its "rpc.statd".  I did a quick google search on what rpc.statd is.  Accordingly, this is run by the service "nfslock".  Since on the server, you will not be using nfs, I quickly deactivated the service and remove it in my startup:&lt;br /&gt;&lt;br /&gt;# /etc/rc.d/init.d/nfslock stop&lt;br /&gt;# chkconfig --levels 2345 nfslock off&lt;br /&gt;&lt;br /&gt;The next #nmap command no longer shows port 898, which gave a sigh of relief knowing no server process that I don't know about is running.  &lt;br /&gt;&lt;br /&gt;By the way, researching a bit further, I found out that "nfslock" may also run on other ports besides 898.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-1112624567925610426?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/1112624567925610426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=1112624567925610426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1112624567925610426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1112624567925610426'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/03/what-is-port-898-on-my-centos-box.html' title='What is Port 898 on my CentOS box?'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-5030056262975762706</id><published>2009-03-05T18:53:00.000-08:00</published><updated>2009-03-05T18:58:50.134-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Linux'/><title type='text'>What process is running on the port?</title><content type='html'>Have you wondered what process is running on the port of your Linux box?  The command to know the process that is running on the port is:&lt;br /&gt;&lt;br /&gt;#lsof&lt;br /&gt;&lt;br /&gt;This command comes handy with the #nmap program that identifies what ports are open.  The command however tries to list all open files and therefore expect a long list to run through your screen.  If you just want to investigate a particular port say port 898, use #lsof with grep:&lt;br /&gt;&lt;br /&gt;#lsof | grep 898&lt;br /&gt;&lt;br /&gt;This will list the open files with the particular port 898.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-5030056262975762706?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/5030056262975762706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=5030056262975762706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5030056262975762706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5030056262975762706'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/03/what-process-is-running-on-port.html' title='What process is running on the port?'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-6825345346881146979</id><published>2009-03-05T18:48:00.000-08:00</published><updated>2009-03-05T18:53:38.603-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Linux'/><title type='text'>Knowing What Ports Are Open on Linux?</title><content type='html'>On Linux, it is easy to know what ports are open.  You just need to use the program "nmap".  If you don't have it on your system, download and install it using the command:&lt;br /&gt;&lt;br /&gt;#apt-get install nmap&lt;br /&gt;&lt;br /&gt;on your Ubuntu or using the yum for Fedora/RedHat/CentOS as follows:&lt;br /&gt;&lt;br /&gt;#yum install nmap&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once installed, issue the command:&lt;br /&gt;&lt;br /&gt;#nmap localhost&lt;br /&gt;&lt;br /&gt;to know which ports are open in your computer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-6825345346881146979?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/6825345346881146979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=6825345346881146979' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6825345346881146979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6825345346881146979'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/03/knowing-what-ports-are-open-on-linux.html' title='Knowing What Ports Are Open on Linux?'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-4164762708541224036</id><published>2009-02-17T03:57:00.000-08:00</published><updated>2009-02-17T04:03:31.075-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Apache'/><title type='text'>PHP Support in the Apache Webserver</title><content type='html'>The following are my notes on PHP support in the Apache Webserver.  The Linux box I am using runs on CentOS 5.0 operating system.  The following steps assumes that the Linux box is connected to the Internet:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;# yum install httpd&lt;br /&gt;# yum install php&lt;br /&gt;# yum install php-mysql&lt;br /&gt;# yum install php-pgsql&lt;br /&gt;# yum install php-mbstring&lt;br /&gt;# yum install php-xmlrpc&lt;br /&gt;# yum install php-gd&lt;br /&gt;&lt;/blockquote&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Among others, the above commands installs Apache and PHP with support for the MySQL and PostgreSQL databases.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-4164762708541224036?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/4164762708541224036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=4164762708541224036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4164762708541224036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4164762708541224036'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/02/php-support-in-apache-webserver.html' title='PHP Support in the Apache Webserver'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-5769775038891335130</id><published>2009-02-17T03:11:00.000-08:00</published><updated>2009-02-17T05:06:23.723-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Apache'/><title type='text'>Virtual Hosting in Apache</title><content type='html'>Virtual hosting is the ability of webserver to host more than one domain.  The Apache webserver supports virtual hosting.  Here are the steps on how to do it.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Considerations:&lt;/b&gt;&lt;br /&gt;The web pages will be stored in the home folder of the user such as "/home/bse/www/html".  Normally, Apache locates the web pages under the directory "/var/www/html".  &lt;br /&gt;&lt;br /&gt;I am using CentOS 5.0 (http://www.centos.org) as my operating system of choice.&lt;br /&gt;&lt;br /&gt;This setup assumes that you are connected to the Internet.&lt;br /&gt;&lt;br /&gt;Here are the steps...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1:&lt;/b&gt;&lt;br /&gt;Download the Apache software as follows:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;#yum install httpd&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2:&lt;/b&gt;&lt;br /&gt;Create the virtual file "virtual.conf" under the directory "/etc/httpd/conf.d".  The "virtual.conf" file should read as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;ServerName idep01.bse.deped.gov.ph&lt;br /&gt;&lt;br /&gt;&amp;lt; Directory /home &amp;gt;&lt;br /&gt;    Order Deny,Allow&lt;br /&gt;    Allow from all&lt;br /&gt;    DirectoryIndex index.html index.htm index.php index.phtml&lt;br /&gt;&amp;lt; /Directory &amp;gt;&lt;br /&gt;&lt;br /&gt;NameVirtualHost *:80&lt;br /&gt;&lt;br /&gt;&amp;lt; VirtualHost *:80 &amp;gt;&lt;br /&gt;    ServerName www.bse.deped.gov.ph&lt;br /&gt;    DocumentRoot /home/bse/www/html&lt;br /&gt;    ErrorLog /home/bse/www/logs/error_log&lt;br /&gt;    TransferLog /home/bse/www/logs/access_log&lt;br /&gt;&amp;lt; /VirtualHost &amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3:&lt;/b&gt;&lt;br /&gt;Create the user and folders for the web pages as follows:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;# adduser bse&lt;br /&gt;# mkdir /home/bse/www&lt;br /&gt;# mkdir /home/bse/www/html&lt;br /&gt;# mkdir /home/bse/www/logs&lt;br /&gt;# touch /home/bse/www/logs/error_log&lt;br /&gt;# touch /home/bse/www/logs/access_log&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 4:&lt;/b&gt;&lt;br /&gt;Change the ownership and permissions of the "bse" user and its home folders.  I assume that Apache is owned by the user "apache" and group "apache".  Here are the commands:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;# chown -R bse.apache /home/bse&lt;br /&gt;# chmod -R 755 /home/bse&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 5:&lt;/b&gt;&lt;br /&gt;Copy a test page with the filename "index.html" to the directory "/home/bse/www/html". &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 6:&lt;/b&gt;&lt;br /&gt;Start the Apache web server as follows:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;# /etc/rc.d/init.d/httpd start&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Verify if you got it right by pointing your browser to the web address of the Apache webserver.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-5769775038891335130?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/5769775038891335130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=5769775038891335130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5769775038891335130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5769775038891335130'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/02/virtual-hosting-in-apache.html' title='Virtual Hosting in Apache'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-2667456293403149834</id><published>2009-02-17T00:29:00.000-08:00</published><updated>2009-04-13T00:57:11.695-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on BIND'/><title type='text'>Setting up a Master DNS Server</title><content type='html'>These are my notes on setting up a master DNS server.  DNS is short for Domain Name System.  The DNS is responsible for translating computer addresses in the form of numbers into human understandable convention like "www.google.com".&lt;br /&gt;&lt;br /&gt;First, my system.  The operating system that I am installing to is a CentOS 5.0 Linux box.  If you are not familiar with the CentOS Linux distribution, CentOS is generally a "Red Hat Enterprise Product" distribution intended for production deployments without the branding and support of Red Hat.  It is in many ways the same as the Red Hat Enterprise Linux product and is related to the Fedora distribution.&lt;br /&gt;&lt;br /&gt;Setting up the master DNS server requires the following steps:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1:&lt;/b&gt;&lt;br /&gt;Download and install the BIND software.  BIND is short for Berkeley Internet Name Domain.  I am assuming that you are connected to the Internet.  The command to do that is:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# yum install bind&lt;br /&gt;# yum install bind-utils&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2:&lt;/b&gt;&lt;br /&gt;Create the configuration file "named.conf" in the directory "/etc".  The file "named.conf" should read as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;zone "0.0.127.in-addr.arpa" {&lt;br /&gt;   type master;&lt;br /&gt;   file "mylocalhost";&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;zone "bse.deped.gov.ph" {&lt;br /&gt;   type master;&lt;br /&gt;   notify no;&lt;br /&gt;   file "bse.deped.gov.ph";&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;zone "126.126.222.in-addr.arpa" {&lt;br /&gt;   type master;&lt;br /&gt;   notify no;&lt;br /&gt;   file "222.126.126";&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3:&lt;/b&gt;&lt;br /&gt;Create the file "mylocalhost" in the directory "/var/named".  The "mylocalhost" file should read as follows: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;$TTL 3D&lt;br /&gt;@     IN     SOA     ns.bse.deped.gov.ph.     hostmaster.bse.deped.gov.ph. (&lt;br /&gt;    1     ; serial&lt;br /&gt;    8H    ; Refresh&lt;br /&gt;    2H    ; Retry&lt;br /&gt;    4W    ; Expire&lt;br /&gt;    1D)   ; Minimum TTL&lt;br /&gt;&lt;br /&gt;    NS     ns.bse.deped.gov.ph.&lt;br /&gt;&lt;br /&gt;1     PTR     localhost.&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 4:&lt;/b&gt;&lt;br /&gt;Create the zone file for the domain like "bse.deped.gov.ph" in the directory "/var/named".  The file "bse.deped.gov.ph" should read as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;$TTL 3D&lt;br /&gt;@     IN     SOA     ns.bse.deped.gov.ph.     hostmaster.bse.deped.gov.ph. (&lt;br /&gt;    19980214     ; serial&lt;br /&gt;    8H     ; refresh&lt;br /&gt;    2H     ; retry&lt;br /&gt;    4W     ; expire&lt;br /&gt;    1D)    ; minimum TTL&lt;br /&gt;&lt;br /&gt;    NS     ns&lt;br /&gt;    MX     10     mail01.bse.deped.gov.ph.&lt;br /&gt;           20     mail02.bse deped.gov.ph.&lt;br /&gt;&lt;br /&gt;localhost     A     127.0.0.1&lt;br /&gt;www           A     222.126.126.211&lt;br /&gt;&lt;br /&gt;ns            A     222.126.126.211&lt;br /&gt;mail01        A     222.126.126.211&lt;br /&gt;mail02        A     222.126.126.212&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 5:&lt;/b&gt;&lt;br /&gt;Create the reverse domain file such as "222.126.126" in the directory "/var/named".  The file "222.126.126" should read as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;$TTL 3D&lt;br /&gt;@     IN     SOA     ns.bse.deped.gov.ph.     hostmaster.bse.deped.gov.ph.   (&lt;br /&gt;    19980214     ; serial&lt;br /&gt;    8H           ; Refresh&lt;br /&gt;    2H           ; Retry&lt;br /&gt;    4W           ; Expire&lt;br /&gt;    1D )          ; Minimum TTL&lt;br /&gt;&lt;br /&gt;    NS     ns.bse.deped.gov.ph.&lt;br /&gt;&lt;br /&gt;211     PTR     www.bse.deped.gov.ph.&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 6:&lt;/b&gt;&lt;br /&gt;Start the server as follows:&lt;br &gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;# /etc/rc.d/init.d/named start&lt;br /&gt;Starting named:                                            [  OK  ]&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;If there are no errors proceed to the next step.  If there are errors, double check on the contents of the setup files.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 7:&lt;/b&gt;&lt;br /&gt;Check the name resolution functionality of your server by using the "nslookup" utility that comes with the "bind-utils" package as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;# nslookup www.bse.deped.gov.ph&lt;br /&gt;Server:  127.0.0.1&lt;br /&gt;Address: 127.0.0.1#53&lt;br /&gt;&lt;br /&gt;Name: www.bse.deped.gov.ph&lt;br /&gt;Address: 222.126.126.211&lt;br /&gt;&lt;br /&gt;# nslookup 222.126.126.211&lt;br /&gt;Server:  127.0.0.1&lt;br /&gt;Address: 127.0.0.1#53&lt;br /&gt;&lt;br /&gt;211.126.126.222.in-addr.arpa name = www.bse.deped.gov.ph.&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-2667456293403149834?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/2667456293403149834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=2667456293403149834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2667456293403149834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2667456293403149834'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2009/02/setting-up-master-dns.html' title='Setting up a Master DNS Server'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-891955321133048257</id><published>2008-12-19T07:10:00.000-08:00</published><updated>2008-12-19T07:19:36.654-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Linux'/><title type='text'>Raw Printing in Linux</title><content type='html'>Raw printing in Linux is achieved by issuing the command and piping the result to /dev/lp0.  For example:&lt;br /&gt;&lt;br /&gt;# ls -l &gt; /dev/lp0&lt;br /&gt;&lt;br /&gt;Raw printing is useful if you want to take advantage of fast printing using the default fonts of the printer.  More often, this is useful if you will be printing under a dot matrix printer.&lt;br /&gt;&lt;br /&gt;Furthermore, you can also issue printer codes to the printer to make condensed printing as follows:&lt;br /&gt;&lt;br /&gt;# echo -ne '\033\017' &gt;&gt; /dev/lp0&lt;br /&gt;&lt;br /&gt;The printer code "\033\017" is an octal equivalent for condensed printing under an Epson-like dot matrix printers.  Commonly, the following codes may also be used:&lt;br /&gt;&lt;br /&gt;\033\115 for elite and \033\120 for pica&lt;br /&gt;&lt;br /&gt;If you are using a different dot matrix printer, the printer codes are found in your printer manual.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-891955321133048257?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/891955321133048257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=891955321133048257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/891955321133048257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/891955321133048257'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/12/raw-printing-in-linux.html' title='Raw Printing in Linux'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-3427085053611225351</id><published>2008-12-19T05:55:00.000-08:00</published><updated>2008-12-19T07:21:54.181-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on PostgreSQL'/><title type='text'>Solution to PostgreSQL Serial Limitations</title><content type='html'>In PostgreSQL, an automatic incrementing column is called "serial".  This is often used as a primary key of a table.  The default serial column is of type INT4 which has a maximum value of 2,147,483,647.    To increase this maximum number, create an INT8 data type for your serial column, as follows:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;CREATE SEQUENCE person_id_seq;&lt;br /&gt;&gt;CREATE TABLE person( id INT8 NOT NULL DEFAULT nextval('person_id_seq'), name TEXT);&lt;br /&gt;&gt;CREATE UNIQUE INDEX person_id_key on person(id);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This will increase the capacity of the column to 9,223,372,036,854,775,807.  I don't know if there is an INT16 column type.  If there is, theoretically we can increase further the capacity of the column by a factor of 2 since PostgreSQL does not support unsigned integers as far as I know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-3427085053611225351?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/3427085053611225351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=3427085053611225351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/3427085053611225351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/3427085053611225351'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/12/solution-to-postgresql-serial.html' title='Solution to PostgreSQL Serial Limitations'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-5753127350933695153</id><published>2008-12-19T05:40:00.000-08:00</published><updated>2008-12-19T05:54:31.361-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on MySQL'/><title type='text'>Solution to MySQL auto_increment Limitations</title><content type='html'>By default, MySQL's auto_increment column has a maximum number of 2,147,483,647.  In practice, this number may even be less since the next NULL insert to the table will use the next value of the highest insert number.  Consequently, once you have reached the maximum number, the next null insert will cause an error because of the occurrence of a duplicate key.&lt;br /&gt;&lt;br /&gt;The solution to MySQL's auto_increment limitations is to create a primary key as an UNSIGNED BIGINT(20) type.  As an example for the table "mytest", issue the following MySQL command:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;CREATE TABLE mytest(p_id BIGINT(20) UNSIGNED PRIMARY KEY AUTO_INCREMENT, name CHAR(10) );&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The UNSIGNED BIGINT(20) type has a maximum number of 18,446,744,073,709,551,616.  A SIGNED BIGINT(20) type has a maximum number of 9,223,372,036,854,775,807.  Since you will be using this as a non-duplicating primary key in your table, most likely you will be using the UNSIGNED BIGINT(20) type since there is no need for storing negative values.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-5753127350933695153?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/5753127350933695153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=5753127350933695153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5753127350933695153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5753127350933695153'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/12/solution-to-mysql-autoincrement.html' title='Solution to MySQL auto_increment Limitations'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-4975121025058841185</id><published>2008-12-19T04:54:00.001-08:00</published><updated>2008-12-19T05:13:16.534-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Linux'/><title type='text'>Firewall Script</title><content type='html'>The following is a sample firewall script on Linux.  It also acts as a network address translation (NAT) script that masquerades the IP addresses of the local area network.  The script assumes that the local area network is in the 192.168.0.0 network class.  Here it is:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# Load Modules&lt;br /&gt;modprobe ip_conntrack&lt;br /&gt;modprobe ip_conntrack_ftp&lt;br /&gt;&lt;br /&gt;echo 1 &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;&lt;br /&gt;# Flush rules&lt;br /&gt;iptables -F &lt;br /&gt;iptables -X&lt;br /&gt;iptables -t nat -F&lt;br /&gt;iptables -t nat -X&lt;br /&gt;iptables -t mangle -F&lt;br /&gt;iptables -t mangle -X&lt;br /&gt;&lt;br /&gt;# Default Deny Policy&lt;br /&gt;iptables -P INPUT DENY&lt;br /&gt;iptables -P OUTPUT DENY&lt;br /&gt;iptables -P FORWARD DENY&lt;br /&gt;&lt;br /&gt;# Perform NAT&lt;br /&gt;iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -d 0.0.0.0/0.0.0.0 -j MASQUERADE&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-4975121025058841185?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/4975121025058841185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=4975121025058841185' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4975121025058841185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4975121025058841185'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/12/firewall-script.html' title='Firewall Script'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-7605254573179857381</id><published>2008-12-18T18:05:00.001-08:00</published><updated>2008-12-19T21:42:46.261-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Linux'/><title type='text'>Removing Comment Lines and Spaces in a File</title><content type='html'>How to remove comment lines and spaces on a configuration file in Linux?&lt;br /&gt;&lt;br /&gt;To remove comment lines under Linux, issue the following command:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# sed -e '/^#/d' -e '/^$/d' &lt; squid.conf &gt; newsquid.conf&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then, go can backup the original squid.conf file by copying it to say squidconf.bak:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# cp squid.conf squidconf.bak&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And finally copying the new squid file to replace the original file as:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# cp newsquid.conf squid.conf&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-7605254573179857381?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/7605254573179857381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=7605254573179857381' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7605254573179857381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/7605254573179857381'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/12/removing-comment-ines-and-spaces-under.html' title='Removing Comment Lines and Spaces in a File'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-6453292706054343785</id><published>2008-12-18T17:56:00.000-08:00</published><updated>2009-04-30T18:31:05.380-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on DHCP'/><title type='text'>DHCP 3.x Server Configuration</title><content type='html'>The following is the DHCP 3.x configuration file "dhcpd.conf" on a Linux server:&lt;br /&gt;&lt;br /&gt;-- Start of Configuration File --&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ddns-update-style interim;&lt;br /&gt;ignore client-updates;&lt;br /&gt;&lt;br /&gt;subnet 192.168.0.0 netmask 255.255.255.0 {&lt;br /&gt;range 192.168.0.100 192.168.0.200;&lt;br /&gt;option routers 192.168.0.254;&lt;br /&gt;option subnet-mask 255.255.255.0;&lt;br /&gt;option domain-name "portal.ph";&lt;br /&gt;option domain-name-servers 192.168.0.1;&lt;br /&gt;option netbios-name-servers 192.168.0.1;&lt;br /&gt;default-lease-time 21600;&lt;br /&gt;max-lease-time 43200;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;-- End of Configuration File --&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-6453292706054343785?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/6453292706054343785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=6453292706054343785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6453292706054343785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6453292706054343785'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/12/dhcp-3x-server-configuration.html' title='DHCP 3.x Server Configuration'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-1465608147597859320</id><published>2008-12-18T06:10:00.000-08:00</published><updated>2008-12-18T06:19:04.239-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on MySQL'/><title type='text'>Recovering Lost MySQL Password</title><content type='html'>The following are the steps on how to recover lost passwords in MySQL.&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;&lt;br /&gt;1.  Kill the MySQL daemon.&lt;br /&gt;&lt;br /&gt;(the command on a RedHat-based system)&lt;br /&gt;# /etc/rc.d/init.d/mysqld stop&lt;br /&gt;&lt;br /&gt;2.  Run the command:&lt;br /&gt;&lt;br /&gt;# safe_mysqld --skip-grant-tables&amp;amp;&lt;br /&gt;(on Fedora Core 5, the command is "mysqld_safe" instead of "safe_mysqld")&lt;br /&gt;&lt;br /&gt;3.  Go to the CLI.&lt;br /&gt;&lt;br /&gt;#mysql&lt;br /&gt;&gt; use mysql&lt;br /&gt;&gt; update user set password=password('test123') where user='root' and host='localhost';&lt;br /&gt;&gt;\quit&lt;br /&gt;&lt;br /&gt;4.  Stop the MySQL&lt;br /&gt;&lt;br /&gt;#mysqladmin -u root -p shutdown&lt;br /&gt;&lt;br /&gt;5.  Rerun MySQL&lt;br /&gt;&lt;br /&gt;# /etc/rc.d/init.d/mysqld start&lt;br /&gt;&lt;br /&gt;You can now access your database using the new password 'test123' as follows:&lt;br /&gt;&lt;br /&gt;#mysql -u root -ptest123&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-1465608147597859320?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/1465608147597859320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=1465608147597859320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1465608147597859320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/1465608147597859320'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/12/recovering-lost-mysql-password.html' title='Recovering Lost MySQL Password'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-2309089524781334290</id><published>2008-12-16T02:23:00.001-08:00</published><updated>2008-12-16T02:36:08.907-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Python'/><title type='text'>HTTP Proxy Script in Python</title><content type='html'>&lt;p&gt;&lt;br /&gt;The following is an HTTP proxy script written by Suzuki Hisao using the Python programming language.  I lifted this post from the original posting at http://mail.python.org/pipermail/python-list/2003-June/210343.html since I may have need for this script in the future.  I have tested this script and it works great.  Its even better than the one I wrote using the Ruby programming language.  Thanks Mr. Suzuki Hisao for sharing this with us.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;#!/bin/sh -&lt;br /&gt;"exec" "python" "-O" "$0" "$@"&lt;br /&gt;&lt;br /&gt;__doc__ = """Tiny HTTP Proxy.&lt;br /&gt;&lt;br /&gt;This module implements GET, HEAD, POST, PUT and DELETE methods&lt;br /&gt;on BaseHTTPServer, and behaves as an HTTP proxy.  The CONNECT&lt;br /&gt;method is also implemented experimentally, but has not been&lt;br /&gt;tested yet.&lt;br /&gt;&lt;br /&gt;Any help will be greatly appreciated.  SUZUKI Hisao&lt;br /&gt;"""&lt;br /&gt;&lt;br /&gt;__version__ = "0.2.1"&lt;br /&gt;&lt;br /&gt;import BaseHTTPServer, select, socket, SocketServer, urlparse&lt;br /&gt;&lt;br /&gt;class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):&lt;br /&gt;   __base = BaseHTTPServer.BaseHTTPRequestHandler&lt;br /&gt;   __base_handle = __base.handle&lt;br /&gt;&lt;br /&gt;   server_version = "TinyHTTPProxy/" + __version__&lt;br /&gt;   rbufsize = 0                        # self.rfile Be unbuffered&lt;br /&gt;&lt;br /&gt;   def handle(self):&lt;br /&gt;       (ip, port) =  self.client_address&lt;br /&gt;       if hasattr(self, 'allowed_clients') and ip not in self.allowed_clients:&lt;br /&gt;           self.raw_requestline = self.rfile.readline()&lt;br /&gt;           if self.parse_request(): self.send_error(403)&lt;br /&gt;       else:&lt;br /&gt;           self.__base_handle()&lt;br /&gt;&lt;br /&gt;   def _connect_to(self, netloc, soc):&lt;br /&gt;       i = netloc.find(':')&lt;br /&gt;       if i &gt;= 0:&lt;br /&gt;           host_port = netloc[:i], int(netloc[i+1:])&lt;br /&gt;       else:&lt;br /&gt;           host_port = netloc, 80&lt;br /&gt;       print "\t" "connect to %s:%d" % host_port&lt;br /&gt;       try: soc.connect(host_port)&lt;br /&gt;       except socket.error, arg:&lt;br /&gt;           try: msg = arg[1]&lt;br /&gt;           except: msg = arg&lt;br /&gt;           self.send_error(404, msg)&lt;br /&gt;           return 0&lt;br /&gt;       return 1&lt;br /&gt;&lt;br /&gt;   def do_CONNECT(self):&lt;br /&gt;       soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;       try:&lt;br /&gt;           if self._connect_to(self.path, soc):&lt;br /&gt;               self.log_request(200)&lt;br /&gt;               self.wfile.write(self.protocol_version +&lt;br /&gt;                                " 200 Connection established\r\n")&lt;br /&gt;               self.wfile.write("Proxy-agent: %s\r\n" % self.version_string())&lt;br /&gt;               self.wfile.write("\r\n")&lt;br /&gt;               self._read_write(soc, 300)&lt;br /&gt;       finally:&lt;br /&gt;           print "\t" "bye"&lt;br /&gt;           soc.close()&lt;br /&gt;           self.connection.close()&lt;br /&gt;&lt;br /&gt;   def do_GET(self):&lt;br /&gt;       (scm, netloc, path, params, query, fragment) = urlparse.urlparse(&lt;br /&gt;           self.path, 'http')&lt;br /&gt;       if scm != 'http' or fragment or not netloc:&lt;br /&gt;           self.send_error(400, "bad url %s" % self.path)&lt;br /&gt;           return&lt;br /&gt;       soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;       try:&lt;br /&gt;           if self._connect_to(netloc, soc):&lt;br /&gt;               self.log_request()&lt;br /&gt;               soc.send("%s %s %s\r\n" % (&lt;br /&gt;                   self.command,&lt;br /&gt;                   urlparse.urlunparse(('', '', path, params, query, '')),&lt;br /&gt;                   self.request_version))&lt;br /&gt;               self.headers['Connection'] = 'close'&lt;br /&gt;               del self.headers['Proxy-Connection']&lt;br /&gt;               for key_val in self.headers.items():&lt;br /&gt;                   soc.send("%s: %s\r\n" % key_val)&lt;br /&gt;               soc.send("\r\n")&lt;br /&gt;               self._read_write(soc)&lt;br /&gt;       finally:&lt;br /&gt;           print "\t" "bye"&lt;br /&gt;           soc.close()&lt;br /&gt;           self.connection.close()&lt;br /&gt;&lt;br /&gt;   def _read_write(self, soc, max_idling=20):&lt;br /&gt;       iw = [self.connection, soc]&lt;br /&gt;       ow = []&lt;br /&gt;       count = 0&lt;br /&gt;       while 1:&lt;br /&gt;           count += 1&lt;br /&gt;           (ins, _, exs) = select.select(iw, ow, iw, 3)&lt;br /&gt;           if exs: break&lt;br /&gt;           if ins:&lt;br /&gt;               for i in ins:&lt;br /&gt;                   if i is soc:&lt;br /&gt;                       out = self.connection&lt;br /&gt;                   else:&lt;br /&gt;                       out = soc&lt;br /&gt;                   data = i.recv(8192)&lt;br /&gt;                   if data:&lt;br /&gt;                       out.send(data)&lt;br /&gt;                       count = 0&lt;br /&gt;           else:&lt;br /&gt;               print "\t" "idle", count&lt;br /&gt;           if count == max_idling: break&lt;br /&gt;&lt;br /&gt;   do_HEAD = do_GET&lt;br /&gt;   do_POST = do_GET&lt;br /&gt;   do_PUT  = do_GET&lt;br /&gt;   do_DELETE=do_GET&lt;br /&gt;&lt;br /&gt;class ThreadingHTTPServer (SocketServer.ThreadingMixIn,&lt;br /&gt;                          BaseHTTPServer.HTTPServer): pass&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;   from sys import argv&lt;br /&gt;   if argv[1:] and argv[1] in ('-h', '--help'):&lt;br /&gt;       print argv[0], "[port [allowed_client_name ...]]"&lt;br /&gt;   else:&lt;br /&gt;       if argv[2:]:&lt;br /&gt;           allowed = []&lt;br /&gt;           for name in argv[2:]:&lt;br /&gt;               client = socket.gethostbyname(name)&lt;br /&gt;               allowed.append(client)&lt;br /&gt;               print "Accept: %s (%s)" % (client, name)&lt;br /&gt;           ProxyHandler.allowed_clients = allowed&lt;br /&gt;           del argv[2:]&lt;br /&gt;       else:&lt;br /&gt;           print "Any clients will be served..."&lt;br /&gt;       BaseHTTPServer.test(ProxyHandler, ThreadingHTTPServer)&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-2309089524781334290?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/2309089524781334290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=2309089524781334290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2309089524781334290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/2309089524781334290'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/12/http-proxy-script-in-python.html' title='HTTP Proxy Script in Python'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-6244752000290069061</id><published>2008-10-16T19:34:00.000-07:00</published><updated>2009-04-25T06:41:22.430-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on Finance'/><title type='text'>Comparing Costs with Different Time Periods</title><content type='html'>How do you compare costs with different time periods?&lt;br /&gt;&lt;br /&gt;To answer the above question, people who have no background in Economics or Finance will just ignore the difference in the time periods of costs.  So the analysis becomes simple, it is a matter of comparing the cost items.  The resulting comparison while theoretically is wrong is practical especially under three (3) conditions:&lt;br /&gt;&lt;br /&gt;1.  The time period involved is too short, say 2 years;&lt;br /&gt;2.  The amount is too small, say a few hundred pesos; and&lt;br /&gt;3.  The interest rate is too low, say less than 1%.&lt;br /&gt;&lt;br /&gt;Whoa!  interest rate?  What has interest rate got to do with comparing costs?  Well, interest rate is the cost differences between the two periods.  Say if you got P1.00 now and you place it in a bank for 2 years and your deposit registered P1.20, the P1.00 now can be said to be equal to P1.20 after two years.  The differences between now and the future value is the interest rate earned or foregone.  Economists refer to this as the "opportunity cost of capital".&lt;br /&gt;&lt;br /&gt;In most investments situations, you will be faced with decisions involving costs at difference time periods.  So it is best that you know how much is the interest rate.  In the above example, the interest rate is 10% per year.&lt;br /&gt;&lt;br /&gt;So when comparing costs at different time periods, know the interest rate.  Use it as a gauge in deciding which costs are higher or lower.  In investment decision-making, if the yield from an investment is say 20% and the interest rate is 10%, then you gain by 10% if you decide to invest.  Assuming all other things to be equal.&lt;br /&gt;&lt;br /&gt;If however the investment yield is only 5%, and the interest rate is 10%, then the investment is not attractive since you will actually be losing 5% have you decided to put your money in the bank that yields 10%.&lt;br /&gt;&lt;br /&gt;In short, faced with an investment decision problem, don't just compare costs without regard to its time period.  You may lose money in the process.  But if it does not involve much money, then perhaps, it is just practical to compare costs without regard to its time period.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-6244752000290069061?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/6244752000290069061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=6244752000290069061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6244752000290069061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/6244752000290069061'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/10/comparing-costs-with-different-time.html' title='Comparing Costs with Different Time Periods'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-4710942390066244992</id><published>2008-10-02T06:55:00.000-07:00</published><updated>2009-04-25T06:42:01.522-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Notes on OpenOffice'/><title type='text'>Page Numbering in OpenOffice</title><content type='html'>Of late, I have to write a long report.  So being an open source enthusiast, I decided to use OpenOffice instead of Microsoft Office.  Guess what?  Page numbering under OpenOffice is a bit cumbersome.  In fact, I have to search the web for answer and it would seem that I am not the only one experiencing the problem.  So after some playing around with OpenOffice, I finally was able to do the things I need for a long report.  Here it is...&lt;br /&gt;&lt;br /&gt;(1)  Page Numbering&lt;br /&gt;&lt;br /&gt;The procedure is to go "Insert-&gt;Footer-&gt;Default", then "Insert-&gt;Fields-&gt;Page Number".  If you want your page number to appear in the header, use "Insert-&gt;Header-&gt;Default", then "Insert-&gt;Fields-&gt;Page Number".&lt;br /&gt;&lt;br /&gt;Quite cumbersome, but still if you are an old hand in using computers, you may eventually figure that out.  Here is the more difficult part.  How do you insert a page number that does not start with page 1? It took me hours to figure it out.  But since, I cannot find a solution also online, I had vowed to post the procedure online.    Here it is...&lt;br /&gt;&lt;br /&gt;(2)  Starting a page number not from the default page 1, say page 20 ...&lt;br /&gt;&lt;br /&gt;The procedure is to locate your cursor on the first paragraph where you want the page to start.  Then, go "Format-&gt;Paragraph" then select the "Text Flow" tab.  Under the "Breaks" line, check the "Insert", and check the "With Page Style", then indicate your desired page number under "Page Number".&lt;br /&gt;&lt;br /&gt;Very cumbersome.  I think, the creators of OpenOffice can make this more intuitive since regularly writers will need this feature.  Sigh!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-4710942390066244992?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/4710942390066244992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=4710942390066244992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4710942390066244992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/4710942390066244992'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/10/page-numbering-in-openoffice.html' title='Page Numbering in OpenOffice'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8322821163940828832.post-5282864085539095069</id><published>2008-09-08T07:35:00.000-07:00</published><updated>2008-09-08T07:40:03.380-07:00</updated><title type='text'>About Me</title><content type='html'>Hello!  My name is Clement Rasul.  I am an information and communication technology (ICT) and project management (PM) specialist.  My professional interests are:  (i) Statistics, (ii) Economics, (iii) Information and Communication Technology, (iv) Project Management, and (v) Management Consultancy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8322821163940828832-5282864085539095069?l=clemrasul.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clemrasul.blogspot.com/feeds/5282864085539095069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8322821163940828832&amp;postID=5282864085539095069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5282864085539095069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8322821163940828832/posts/default/5282864085539095069'/><link rel='alternate' type='text/html' href='http://clemrasul.blogspot.com/2008/09/about-me.html' title='About Me'/><author><name>Clem Rasul</name><uri>http://www.blogger.com/profile/06104196059140601674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
