Sunday, December 16, 2007

Bluetooth Blues in Kubuntu Gutsy

Got a replacement Bluetooth dongle from MSI only to find out that I can't send files from my Nokia phone to my Kubuntu Gutsy. Turns out that this bug has already been reported at https://bugs.edge.launchpad.net/ubuntu/+source/kdebluetooth/+bug/146145. So for those looking for a quick bluetooth fix, here's a little howto:

1) download kdebluetooth_1.0-beta8-0quickpackage_i386.deb from http://peppesbodega.nu/files/Packages

wget http://peppesbodega.nu/files/Packages/kdebluetooth_1.0-beta8-0quickpackage_i386.deb

2) cd to your download directory

3) Install it

dpkg -i kdebluetooth_1.0-beta8-0quickpackage_i386

Notes:
You have to uninstall kbluetooth and libkbluetooth prior to installing this package. Don't worry, this deb would installed it' patched packages.
If your system also uninstalls bluetooth, just reinstall it.

Blogged with Flock

Thursday, October 25, 2007

Connecting to a MySQL Server remotely

I've been working on a PHP code that uses MySQL DBs, and I've been doing it manually from Quanta and PHPMyAdmin. And everyone knows that coding in a browser is a very bad habit. I sure wish I have an IDE with MySQL Admin integrated in it. But before I go searching for that particular IDE, I wanted to make sure that I can access it from both my desktop and my laptop.

I'll be using MySQL Administrator for this tutorial and my MySQL server is hosted on Ubuntu Server Gutsy, subtle differences are expected (if any).

First, the error that'll show up would be this:



To determine if there's a firewall preventing access, try to ping it:



If you can't ping it, open port 3306

sudo iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT

As I've said earlier, I have PHPMyAdmin installed, I used it to create 4 users for my laptop and my desktop. I made sure I have both the IP Address and Hostname in it. And since I wanted this to be an admin account, I granted it all privileges. Consult the help docs if you don't have PHPMyAdmin installed or if you want to do this manually.



Next up would be to edit /etc/mysql/my.cnf
Comment out bind = 127.0.0.1



Restart MySQL



And lastly, test it out:



I can now create, edit, and drop DBs/Tables from MySQL Administrator. I don't have any need for PHPMyAdmin now that I can access MySQL remotely so I removed it. I'll be searching for a PHP/MySQL IDE next.

Blogged with Flock

Tuesday, October 16, 2007

P3 733MHz Server and SSH

I badly need a multi-purpose server to hone my skills and host my site and my files. So I converted my old P3 733MHz into a server. Good thing it only consumes 19.1 Watts, that'll help a lot with my Power bill. After I installed Ubuntu Gutsy RC1, I disabled everything else... CD-ROM Drive, USB, etc. etc. etc. The only thing running right now is the CPU, PSU, and my trusty old 20GB Hard Disk Drive.

After two days of configuring it, I finally got my server running. Had to wait for my DNS entry to propagate though, but it worked well once I got it up and running. So far, it's been running for 3 days straight, and it's as fast and cool as ever. I might need to take it offline next year though to clean the dust.

And lastly, I need to have it running headless. So I installed OpenSSH-server, imported my key to the authorized_keys file and configured it to only accept logins from me. However, before getting it to work flawlessly, I encountered one problem... it won't allow me to login. I keep on getting Permission denied error.

How did I know I have a permission problem? I checked /var/log/auth.log and saw this line:

Oct 16 16:38:25 t2798 sshd[29599]: Authentication refused: bad ownership or modes for directory /home/dax/.ssh

Since I imported my /home from an old HDD, I forgot to check it's permission. SSH is very particular about permissions. I fixed it by issuing this command:

server$ chmod go-w ~/
server$ chmod 700 ~/.ssh
server$ chmod 600 ~/.ssh/authorized_keys





Blogged with Flock

Monday, October 01, 2007

Helping with Bugs

It is common knowledge that Ubuntu gets hundreds of Bug Reports daily. And currently, we have around 32K Open Bugs.


http://people.ubuntu.com/~brian/graphs/
http://people.ubuntu.com/~brian/testing_graphs/

This is an invite to everyone fond of Ubuntu. Bug Reporting's one thing, but Triaging's another. Once a bug gets reported, it stays there. The Dev/Maintainer would be informed that he has an Open bug, and he may or may not choose to work on it. Sometimes, due to stress and workload, they don't even have the luxury of time to look at your report.

This is where Bug Triaging comes in. We mark duplicate bugs, ask for confirmation from users, and squeeze as much information from both users and reporters. Once we have everything we need, we mark it as Triaged and set the appropriate Priority. The dev/maintainer, no matter how busy he is, is now obligated to look into it. Fix it or replace the affected package with an updated one.

Of course, there will always be old bugs. Sometimes, we have Open Bugs as far back as 2005, and there's nothing we can do but close it and advise users to upgrade to the latest stable version.

This is how we control bugs. Join us, I know you'll have fun doing this.

Additional Resources:
Contribute to Ubuntu
BugSquad
Bug Responses
Bug Importance
How to Report Bugs
Effective Bug Reporting
Finding the Right Package
Getting Backtrace
Debugging Procedures

Blogged with Flock

Sunday, September 23, 2007

Konversation: Error 65 and 3

I haven't used Konversation for a few weeks, and when I did.. Konversation returned this error:
Server sent error 65: Access to restricted port in POST denied.
and
Server sent error 3: Could not start process Unable to create io-slave: klauncher said: Unknown protocol ". .



It's been like this for three weeks and I was forced to rely on IRSSI and IceApe's Chatzilla. My cravings for Konversation grew stronger that I finally ranted about this at #ubuntu-ph. I gave Jucato and Ahmuck this error:

0xffffe410 in ?? ()
#0  0xffffe410 in ?? ()
#1  0xbf909888 in ?? ()
#2  0xb79f1ff4 in ?? () from /lib/tls/i686/cmov/libc.so.6
#3  0xbf909874 in ?? ()
#4  0xb793ee96 in nanosleep () from /lib/tls/i686/cmov/libc.so.6
#5  0xb793eca7 in sleep () from /lib/tls/i686/cmov/libc.so.6
#6  0xb744cad9 in KCrash::startDrKonqi () from /usr/lib/libkdecore.so.4
#7  0xb74634de in KCrash::defaultCrashHandler () from /usr/lib/libkdecore.so.4

and this

Failed to open device
konversation: WARNING: Cannot execute call to system.login: empty server URL
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
konversation: ERROR: : couldn't create slave : Unable to create io-slave:
klauncher said: Unknown protocol ''.
konversation:
konversation: ERROR: <qt>Server sent error 3: <b>Could not start process Unable to create io-slave:
klauncher said: Unknown protocol ''.
.</b></qt>
konversation: ERROR: <qt>Server sent error 3: <b>Could not start process Unable to create io-slave:
klauncher said: Unknown protocol ''.
.</b></qt>
konversation: WARNING: Cannot execute call to addressbook.boaddressbook.search: empty server URL
konversation: WARNING: Cannot execute call to addressbook.boaddressbook.categories: empty server URL
konversation: WARNING: Cannot execute call to addressbook.boaddressbook.customfields: empty server URL
dax@knightlust:~$ QGDict::hashKeyString: Invalid null key
konversation: ERROR: : couldn't create slave : Unable to create io-slave:
klauncher said: Unknown protocol ''.
konversation:
QGDict::hashKeyString: Invalid null key
konversation: ERROR: : couldn't create slave : Unable to create io-slave:
klauncher said: Unknown protocol ''.
konversation:
KCrash: Application 'konversation' crashing...

It was Jucato who asked the maintainer of Konversation (Sho) what's happening.

Jucato: That has something to do with the KAddressBook integration, from the looks of it
Jucato: My guess is that he's using eGroupWare or IMAP to store his address book on a server, and something goes wrong in KIMProxy
Jucato: If it's a dialog box, you can be fairly sure it's not Konversation, we don't use them
Jucato: "kresources/egroupware/kabc_resourcexmlrpc.cpp: QString msg = i18n( "Server sent error %1: %2" ).arg( error ).arg( errorMsg );" btw
from kdepim
Jucato: Perhaps he set up eGroupware, but removed eGroupWare again but forgot to remove the resources in Kontact/KAddressBook

So there it is.... the solution to my problem. Sho was right.. I used (past tense) eGroupware and forgot to delete any reference to it from KAddressbook.

I deleted it.. and it worked. Ha! I said my goodbye to Chatzilla (no.. I'm still fond of IRSSI) and went to bed. This all happened last night.

For those curious how to remove the XML-RPC entry in KAddressbook, just go to Settings > Show Extension > Address Books. That's where you delete it.

Blogged with Flock

Saturday, September 15, 2007

Gutsy - Firefox is disappointing

Since Gutsy Tribe 3, Firefox never really worked. Oh sure, the Addons installs and allows me to surf, but that's it. Everytime I open the Preference window, Bookmark a site, or even download a file... it just crashes. As long as I open a window in Firefox (except Organize Bookmarks and Download windows), I really can't stop Firefox from crashing.

It's been over two months now, and frankly, I'm disappointed. I have Flock installed, but I'm still craving for the red fox! Today, after working on a few (around 15) tabs, it crashed again... and lost 2 hours of work. I keep on forgetting that working in a browser is a bad idea. I'm fed up! I just uninstalled it and will probably wait for the Beta release before I try it out again. I'm now working with IceApe as my primary browser and glad that it's stable enough for me to do my thing.

Come to think of it, it's been a while (like more than a month) since I last saw any updates on Firefox.... I don't know what the hell the Mozilla Team's doing, but I just signed up on their list and will help on my free time. Need my addiction satisfied.

Blogged with Flock

Sunday, September 09, 2007

Confused and Irritated

Recent life-changing events forced me to contemplate on my life and my priorities. After being a bum for a few months - with funds fast depleting - I decided it's now time to get myself a day job. I'm well rested and very much eager to interact with the corporate world again. Let's get it on!

The confused and irritated part was caused by a surprise. This shit happens, and I'm just a victim of synchronicity. But I'll also face it head on!

When I need think, I usually get a piece of paper and a pencil and write down what I can and cannot do. And since I'm stuck in front of my laptop, I'll be doing that right here, right now. I've been using the SWOT method for a long time now, but this time I'll just focus on strengths and weaknesses and my computing and management skills.

Strengths:
System Administration

  • LAMP
  • eGroupware and PHPGroupware
  • Dovecot
  • Postfix
  • Sendmail
  • Dancer IRCD
  • Subversion
  • Installation and Configuration of Debian, Ubuntu, and Fedora
  • IRC Bots (Eggdrop and Supybot)
  • DNS Administration via EditDNS and DynDNS
  • SSH and FTP Configuration
  • Samba
  • Drupal, Joomla, Mambo, e107, PHP-Fusion
  • Wordpress
  • Moodle
  • Search Engine Optimization
  • Software Testing and Quality Improvement
  • Exposure to Open Source Processes
  • LAN Networking
  • Software/Computer Forensics
  • PGP and SSH
Programming
  • C++
  • PHP & HTML
  • KDevelop
  • NetBeans
  • Anjuta
  • Geany
  • MS Visual C++ 6
Management
  • Managing Accelerated Performance (MAP)
  • Knowledge Management
  • Project Management
  • Performance Management
  • Six Sigma Training
  • Risk Management

Weakness:
System Administration
  • Cyrus and Courier Email Servers
  • Kolab, Scalix, and Zimbra
  • Jabber
  • Asterisk
  • BIND
  • JBoss
  • Novell/SUSE and Red Hat
  • LDAP
  • Kerberos
  • SpamAssasin
  • ClamAV
  • Squid
  • IPTables
  • Sugar CRM (or any CRM Applications)
  • Tiny ERP (or any ERP Applications)
  • Chrooted/Jailed Accounts
  • Virtual Email Accounts using MySQL
  • Clustering
  • Solaris
  • WebSphere and Domino
  • MSSQL
  • LTSP
  • WAN Installation and Management
Programming
  • MS Visual C++ 6, I've relied heavily on this.
  • C++ skill not enough, at least for Linux.
  • PHP skill not enough
  • Java
  • Any Scripting Language
Management
  • Not enough experience
So there it is.... based on the list above, I guess I'll have more chances of getting a Sys Admin job. But also based on the list above, there's a lot more stuff I need to learn before I consider myself qualified to be a Sys Admin.

Now the hard part, it's Baguio. There's very, very few companies who use Unix/Linux for their servers, much less for their workstations. I'll see what I can do. But for now, and the next couple of days, I'll be very busy studying and working on my skills.

Blogged with Flock

Wednesday, September 05, 2007

Limits.conf

Setting limits on what processes can be very helpful for those testing out various distributions - Gutsy in my case. There will always be rogue applications spawning tens, sometimes hundreds, of same processes due to bugs. And this almost always happens on Alpha versions. So beware. If you're not up to it, DO NOT INSTALL AN ALPHA VERSION!

Here's one of the tips I learned. You see, a bug in KMail caused it to create multiple KMail processes. If you don't set a limit, it'll slow down your system. Worse, your system would freeze rendering it unusable. Here's how you set limits on running processes.

Edit /etc/security/limits.conf as root and append the following lines.

* soft nproc 200
* hard nproc 300

When you hit the 200th process, it'll warn you.
And your system won't allow you to go beyond 300 processes.

This is very, very useful for shell providers. You can even limit a user to 5 or even 2 processes. But for a tester like me, 300 processes is enough. It'll make sure I can run all the programs I need without worrying about rogue apps going nuts all over my system.

Blogged with Flock

Sunday, September 02, 2007

Setting up Subdomain in Apache2 and EditDNS

So, you want to setup a sub-domain? There's 2 things you need to do.

  • Configure Apache2
  • Add a Sub-domain to your EditDNS account (or your domain providers' control panel)
Configuring EditDNS
You should setup a subdomain on EditDNS first. Why, because it'll take time to propogate. That'll give you enough time to edit Apache's configuration files.

Before doing anything, make sure you can access your domain. If you can, then let's go ahead and create a sub-domain.

In the Record Name, type in subdomain.yourdomain.com
In the Type, select CNAME
Leave AUX and TTL alone
In the IP/Host, type in yourdomain.com
Click Add
Repeat as needed

Here's my EditDNS Entry. I added blog, bugs, forum, learn, and wiki to my account.



Apache2 Configuration
Launch your favorite text editor and edit the default file as root. The file is in the /etc/apache2/sites-available.

sudo nano /etc/apache2/sites-available/default
kdesu kate /etc/apache2/sites-available/default

And append this to the file:
<VirtualHost *>
        DocumentRoot "/var/www/subdomain/kb/"
        ServerName kb.knightlust.com
        ServerAdmin dax@knightlust.com
        ErrorLog /var/log/apache2/kb.log

        <Directory /var/www/subdomain/kb/>
                Options Indexes FollowSymLinks MultiViews +Includes
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
</VirtualHost>

Explanation:
  • The DocumentRoot should be pointed to the directory where you installed your site or script. And it should be enclosed in quotation marks. Don't forget that.
  • ServerName should have your subdomain
  • ServerAdmin and ErrorLog is optional.
  • The <Directory> should also be pointed to where you installed your site or script.
Here's mine:



And here's for my other subdomains. So you see, just edit the entry above to fit your configuration.



Now before you reload Apache2, you need to make sure that the default file is linked in /etc/apache2/sites-enabled. Otherwise, it just won't work.

If there's no linked file there, issue this command:
sudo a2ensite default




Once everything's done, go ahead and reload Apache:
sudo /etc/init.d/apache2 reload


Blogged with Flock

Friday, August 31, 2007

Setting Up Dancer-IRCD in Kubuntu

Definition of IRC:
Internet Relay Chat (IRC) is a form of real-time Internet chat or synchronous conferencing. It is mainly designed for group (many-to-many) communication in discussion forums called channels, but also allows one-to-one communication and data transfers via private message.

IRC was created by Jarkko "WiZ" Oikarinen in late August 1988 to replace a program called MUT (MultiUser talk) on a BBS called OuluBox in Finland. Oikarinen found inspiration in a chat system known as Bitnet Relay, which operated on the BITNET.

IRC gained prominence when it was used to report on the Soviet coup attempt of 1991 throughout a media blackout. It was previously used in a similar fashion by Kuwaitis during the Iraqi invasion. Relevant logs are available from ibiblio archive.

IRC client software is available for virtually every computer operating system.

Reference: http://en.wikipedia.org/wiki/Internet_Relay_Chat

What is Dancer-IRCD:
An IRC server designed for centrally maintained networks This is the ircd designed for use on OpenProjects Net (www.openprojects.net), based on the hybrid ircd used by efnet. It attempts to handle the network transparently as a unit, and to provide features to support the OPN philosophy. This package contains the main binary files.

Reference: http://linux.about.com/cs/linux101/g/dancerircd.htm

Requirements:

  • I'm using Kubuntu Gutsy, but it'll work fine with Debian Sarge & Etch, and Ubuntu Edgy, Feisty, and Dapper.. with or without a desktop environment.
  • You need to have an Internet connection so you can download dancer-ircd and dancer-services. If you don't have a connection, secure those packages via AptOnCD.
  • Text Editor, Gedit or Nano would do fine
  • Sudo or Root Access so you can modify the Dancer files residing in /etc

Installation:
via Command Line: sudo aptitude install dancer-ircd dancer-services
via Synaptic and/or Adept: see Synaptic and Adept Documentation



Configuration:
In this article, we need to configure 2 files /etc/dancer-ircd/ircd.conf and /etc/dancer-services/services.conf. They should be opened as root by your favorite text editor, may it be Gedit, Nano, or in my case, Kate.

We also need an IRC client to test it out. It can be GAIM or Pidgin, Konversation, Chatzilla, or Ksirc. I'll be using the Ksirc in this article.

/etc/dancer-ircd/dancer-ircd:
In line 48, change it to:
M:localhost.: :dancer-services localhost:

In line 314, change it to:
C:127.0.0.1:P@ssw0rD:services.
where P@ssw0rD is Your Password. Please change it accordingly.

In line 315, change it to
N:127.0.0.1:REMEMBER:services.

Trust me, you have to place REMEMBER on this line, this is temporary until we get our hashed password.

Hashed Password:
Open a text editor and place your password there. Please make sure you don't include a space after your password and do not hit the Enter key. Save it as password in your home directory.


Open a terminal window and type this command:
makepasswd --crypt-md5 --clearfrom password


Now you have there your Hashed password. Copy this string and replace the REMEMBER word on line 315 with this.
Line 315: N:127.0.0.1:$1$CdjQLLLa$/Mq69SSgCK/wtyNo/eIuw/:services.

Please take note that if you run the makepasswd command again, it'll spit out a completely different string. Don't worry, this works either way. It's a hashed result, so it will be a different string everytime you run the command.

/etc/dancer-services/services.conf:
In line 10, replace it with the following:
A:Dax Solomon Umaming <dax@knightlust.com>
Obviously, it's the Operator's username and password

In line 17, replace it with the following:
N:services.:dancer-services

In line 28, replace it with the following:
S:P@ssw0rD:127.0.0.1:6667
Again, please replace the password with your own.
If you want to use another port, do so here.

In line 57, replace it with the following:
O:~dax@127.0.0.1:REMEMBER:Knightlust:segjO
Replace the REMEMBER string with your hashed password
O:~dax@127.0.0.1:$1$CdjQLLLa$/Mq69SSgCK/wtyNo/eIuw/:Knightlust:segjO
Also replace Knightlust with the nick you plan on using with this server

In line 62 $ 63, replace it with the channel you want OperServ to monitor.
C:#baguio
C:#support-ph
Please take note that this is Optional.

In line 130, replace it with the following:
M:localhost:6667:127.0.0.1:6667:1m 4s

Testing:
Before firing up your favorite IRC client, make sure you double-check your settings. Once you're done, restart dancer-ircd and dancer-services.

sudo /etc/init.d/dancer-ircd restart
sudo /etc/init.d/dancer-services restart



In my system, there's a zlib warning, don't you worry about this. This may be bug, and I'll report this in Launchpad. After restarting dancer-ircd and dancer-services, launch your favorite IRC browser and try connecting to localhost:6667



If you have the following results, then you know that your IRCD's working. Now let's test dancer-services by issuing this command.

/msg nickserv register

If NickServ responded to the above command, then you know that dancer-services works. You're also sure that OperServ, ChanServ, and MemoServ's working.



So that's it.. congratulations. You now have an IRC server for your friends, family, and/or your business.

If you need other Dancer's advanced features, please consult the documentation.

Blogged with Flock

eGroupware Screenshots

Been wanting to install a groupware suite for a few weeks now, and I was able to last Tuesday. I went from eGroupware to Kolab to PHPGroupware to Scalix to Zimbra to OpenGroupware, and then finally, back to eGroupware.

I've been eyeing Kolab but I just didn't know how to configure it. I installed it from the repository, and then spent a day looking for ways to configure it, but failed. The Kolab Documentation failed to help me as well. And there's no article anywhere regarding Kolab installation in the Ubuntu forums and wiki. As for the others, some allowed me to install it, some won't. Some allowed me login, some won't - even with correct usernames and passwords. I gave up and went back to eGroupware - the only application from the repository which allowed me to install, login, and configure. It's very sluggish, mind you, but I still need a groupware suite. I'm just afraid that the developers might've compromised speed over user-friendliness. But who cares, I'll rarely use it. What matters is the email via IMAP (which works like a charm in eGroupware) and its' XMLRPC'd calendar. Which me and Jucato would be using to keep track of each other's schedules.

I'll probably spend a few hours configuring eGroupware, but that's just aesthetics. I'll probably do it on a weekend. Here's a few screenshots.

Here's the Home:


Here's the Email Page


Here's the Calendar


Here's the Addressbook


Here's the Project Manager


Here's the TimeSheet


Here's the File Manager


And here's the Site Demo Page


We also have a Work Flow module


a Wiki


And here's the the Site Manager


News Administration


And lastly, the Knowledge Base


There's a lot more modules available, but I disabled them because I know we won't use it - at least not in the near future. And the screenshots, here, it ain't much. But that's because I haven't populated it with data. Oh, I'll use them alright, but not right now. Also, I love the Project Manager module. It still lacks features found in TaskJuggler and KPlato, but it's enough for collaborative uses.

Now if only I can tweak this to make it faster. It is, afterall, soooo slow.

Blogged with Flock

Postfix and Dovecot Configuration Files

Here's my Postfix and Dovecot Configuration. I'll be using this once I install Hardy.

man.cf
home_mailbox = Maildir/

dovecot.conf
protocols = imaps pop3s
pop3_uidl_format = %08Xu%08Xv
mail_location = maildir:~/Maildir
imap_client_workarounds = tb-extra-mailbox-sep

Creating skel for future users
maildirmake.dovecot /etc/skel/Maildir
maildirmake.dovecot /etc/skel/Maildir/.Drafts
maildirmake.dovecot /etc/skel/Maildir/.Sent
maildirmake.dovecot /etc/skel/Maildir/.Trash
maildirmake.dovecot /etc/skel/Maildir/.Templates

Creating Maildir for existing users
cp -r /etc/skel/Maildir /home/myuser/
chown -R myuser:usergroup /home/myuser/Maildir
chmod -R 700 /home/myuser/Maildir

Reference:
https://help.ubuntu.com/community/Dovecot

Blogged with Flock

Thursday, August 30, 2007

New in KMail - for Kubuntu Gutsy fans

After this morning's update, the Basket bug was fixed. Bad news, the fix introduced a new bug - KMail crashing when pasting. Better news, KMail has a new feature. It's reminiscent of MS Office's Outlook.

Blogged with Flock

Subversion Howto - WebDav and SVNServe

It's been a couple of days since I've setup Subversion in my box. I'm posting this for future reference... I'll be reinstalling Kubuntu when the Next Alpha version comes out, and No... I'm not talking about Gutsy, I'm already using it. Most of the instructions here came from the Subversion article of the Ubuntu Documentation.

Preparation

  • Add svn group
  • Add my username and www-data as users of the group

  • sudo mkdir /var/svn
  • cd /var
  • sudo chown -R www-data svn
  • sudo chgrp -R svn svn
  • sudo chmod -R g+rws svn
  • sudo svnadmin create /var/svn
WebDAV Configuration
I need this so I can access my Subversion using the http:// protocol
  • Install libapache2-svn
  • Append the following into /etc/apache2/mods-available/dav_svn.conf
<Location /svn> DAV svn SVNPath /var/svn AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/subversion/passwd <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location>

  • Restart Apache2: sudo /etc/init.d/apache2 restart
  • Add user: sudo htpasswd -c /etc/subversion/passwd username
SVN Configuration
svnserve.conf
[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = Subversion Repository

passwd
[users]
user = password

authz
[/]
user =rw
* = r

/etc/init.d/svn
#!/bin/bash
svnserve -d -r /var/svn

Done!
So there it is, I've been accessing my Subversion by using both http and svn protocols. But I just might drop WebDAV access on my next reinstall. Frankly, it's redundant.

Blogged with Flock

Enabing mod_rewrite for Drupal 5.1 in Kubuntu

By default, Drupal have those annoying ?q= in the URL but you can disable them by configuring apache2.conf and enabling mod_rewrite. Why do we need to disable them? Search Engine Optimization.... the ?q= is the bane of SEO marketers and Search Engine bots sometimes skip sites with ?q= in the URL.

Enabling mod_rewrite
Issue the following command:

sudo a2enmod rewrite

That command will add the rewrite.load file to /etc/apache2/mods-enabled directory. To check if it's loaded, issue the command:

apache2ctl -M



Copy the Rewrite Engine
Append the following into your /etc/apache2/apache2.conf file.

 <Directory /var/www/>
   RewriteEngine on
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>



Restart Apache
Issue the following command:

sudo /etc/init.d/apache2 restart

Configure Drupal's Clean URL
Go to Administer > Site Configuration > Clean URLs
Click the Run the clean URL test link.



Success
If successful, the page below would show up, and would now allow you to Enable Clean URLs. Click the Save configuration button after you're done.



Don't forget the Path Module
Don't forget to enable the Path Module in Administer > Site Building > Modules
This will allow you to change the URL of a page.

Problems I encountered

  • The Clean URLs Handbook is too (and I mean too) generic. And I'll bet new Ubuntu users wouldn't understand what the hell that is.
  • The Option A in the handbook doesn't work. No matter what I do. I've tried re-reading the said handbook and re-configuring the apache2.conf but I still failed to make it work.

Blogged with Flock

EditDNS Howto in Kubuntu

I've been using EditDNS' services for a couple of months now, and I'm happy it's reliable. However, few people has asked me how to go about setting it up on a system with Dynamic IP address, and walking them through setting it up has consumed much of my time. That's why I'm writing this little howto.

Requirements:

  • you have Web Server installed. This may be Apache or Lighttp. Of course, assuming you wanted a web server. If you intend to use it for to host IRC, SVN, POP3, IMAP, etc. then you should have a server application for that as well.
  • your system should be accessible from the outside network. Try surfing to your IP address. If you don't know your IP address, go to http://whatismyip.com/. Also, just to make sure, ask a friend to surf using your IP address too.
  • if you can't access your PC from the outside, try checking your firewall. Better yet, disable it for the mean time.
  • if you still can't access your PC even with firewall disabled, check your router. Configure to forward port 80 (again, assuming you're setting up a web server) to your system. Check your router documentation, and please don't ask me.
  • get an account with EditDNS. There's no sense following this article if you don't have one.
  • if you have a domain, contact your domain provider regarding changing your Nameserver.
Instructions for Adding a Domain:
1. Login to EditDNS and skip the Help Us Spread the Word page.

2. Login to your domain provider's Control Panel and point the nameservers to:
  • ns1.us.editdns.net
  • ns2.us.editdns.net
  • ns3.us.editdns.net


3. Add a domain.. that is, if you have one. We'll go through adding a Sub-Domain later.



4. Add a DynDNS Record



5. On the Dynamic DNS Record Page, type in a password then place a check mark on your two domains listed below. Leave the "New DynRecord record (Optional):" blank. Click the Add button.



6. Verify settings.



7. Now check if it'll update by going to this website:

http://dyndns.editdns.net/api/dynLinux.php?p=password&r=knightlust.com

Please make sure you change the password and the knightlust.com with your details.



It should have one entry: Record has been updated. Now do the same thing for the other domain.

http://dyndns.editdns.net/api/dynLinux.php?p=password&r=www.knightlust.com

8. Get back to the EditDNS page and refresh it. Make sure the IP/Host is also updated. If it's updated, then you know it's working.



9. Install lynx, you don't need it, but the next step does.

sudo aptitude install lynx

10. Create a text file with the following entries:

#!/bin/bash
lynx -source "http://dyndns.editdns.net/api/dynLinux.php?p=password&r=knightlust.com" lynx -source "http://dyndns.editdns.net/api/dynLinux.php?p=password&r=www.knightlust.com"

Save the text file as editdns. We need this so it'll update EditDNS records every time you reboot or start this computer.



11. Move the editdns file to /etc/init.d

sudo mv editdns /etc/init.d

12. Create a symbolic link to /etc/rcS.d

sudo ln -s /etc/init.d/editdns /etc/rcS.d/S90editdns

Notes:
- Wait for at least 4 hours for your domain to propogate. Don't expect it to work right after setting it up.
- You may also add No. 10 to your crontab, instead of placing it into /etc/init.d and /etc/rcS.d.
- If your ISP changes your IP address while online, you don't have to reboot your system. Just issue the command:

sudo /etc/init.d/editdns

Instructions for Adding a Sub-Domain:

1. Login to EditDNS and skip the Help Us Spread the Word page.

2. Type in a sub-domain that you want. Then click the Add button



3. Click the left [x] to modify it. And don't mind the "You currently don't have any domain names." message, I think it's a bug.



4. Add a new DynRecord.



5. Enter a password and place a check mark on your Record Name, just below the Add column. Then click the Add button.



6. Verify Settings.



7. Now check if it'll update by going to this website:

http://dyndns.editdns.net/api/dynLinux.php?p=password&r=dax.mydyn.net

Please make sure you change the password and the dax.mydyn.net with your details.



8. Get back to the EditDNS page and refresh it. Make sure the IP/Host is also updated. If it's updated, then you know it's working.



9. Install lynx, you don't need it, but the next step does.

sudo aptitude install lynx

10. Create a text file with the following entries:

#!/bin/bash
lynx -source "http://dyndns.editdns.net/api/dynLinux.php?p=password&r=dax.mydyn.net"
Save the text file as editdns. We need this so it'll update EditDNS records every time you reboot or start this computer.



11. Move the editdns file to /etc/init.d

sudo mv editdns /etc/init.d

12. Create a symbolic link to /etc/rcS.d

sudo ln -s /etc/init.d/editdns /etc/rcS.d/S90editdns

Notes:
- Wait for at least 4 hours for your domain to propogate. Don't expect it to work right after setting it up.
- You may also add No. 10 to your crontab, instead of placing it into /etc/init.d and /etc/rcS.d.
- If your ISP changes your IP address while online, you don't have to reboot your system. Just issue the command:

sudo /etc/init.d/editdns

Additional Notes:
It is not required to have a DynRecord for knightlust.com and www.knightlust.com. A single DynRecord for knightlust.com is enough. Just make sure to CNAME www.knightlust.com. If you choose this option, then you may remove the second entry from /etc/init.d/editdns.

Blogged with Flock