Subscribe: Shinning Star
http://afriel.blogspot.com/feeds/posts/default
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
add  apt install  create  file  files  git  ies linux  install  linux  local  make  server  ssh  sudo  svn  user  windows 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Shinning Star

Shinning Star



Simple blog for remembering complex HOWTOs



Updated: 2014-10-02T12:46:54.015+08:00

 



Non geek post

2008-02-19T22:24:07.495+08:00

Today I take a break from a geek entry and post a link to a cool site. This site lets you print and fold your own TIE fighter or even a Macross VF-1S. Have fun at http://www7a.biglobe.ne.jp/~sf-papercraft/Gallery/Gallery.html.



Git-ty up (Part 2)

2008-02-04T13:36:07.478+08:00

Setting up your own Git server. I learned how to setup using this guide. I am duplicating the guide here for a quick reference.
  1. Installing GIT
    • If it doesn't exist on ubuntu. For some reason, GIT needs it.
      • touch /etc/inittab
    • sudo apt-get install git-arch git-cvs git-svn git-email git-daemon-run git-core curl python-setuptools
    • sudo adduser --system --shell /bin/sh --gecos 'GIT Version Control' --group --disabled-password --home /path/to/git_home_directory git_user_name (set up a user to handle all Git request)
  2. Installing gitosis-admin (for user management)
    • In any directory
      • git clone git://eagain.net/gitosis.git
    • cd gitosis
    • sudo python setup.py install
  3. Setting up initial user
    • On local machine generate a public/private ssh key it it doesn't already exist
      • ssh-keygen -t rsa
    • Copy the public key to the Git server and put it in a publicly readable folder
      • scp ~/.ssh/id_rsa.pub user@git_server:/tmp/id_rsa.pub
    • Back on Git server (as a user with sudo privileges)
      • sudo -H -u git gitosis-init < /tmp/id_rsa.pub
    • Git uses SSH as the default transport to communicate with the server, so make sure user_git is allowed in the sshd AllowUsers directive.
  4. Adding users
    • On local machine with the private key
    • Some of us will run SSH on a non standard port so it may be wise to create a .ssh/config file and add a directive to establish connection to the Git server.
      • vi ~/.ssh/config
      • Host git_server
        User git
        Hostname <ip of git server>
        Port <port ssh is listening on>
      • Quit and save.
    • Clone the gitosis-admin file for user management.
      • gitosis-clone git_server:gitosis-admin.git
      • cd gitosis-admin
      • Copy the new users SSH public keyfile to the keydir folder with the format user@server.pub. The .pub is absolutely necessary otherwise the user will not be added. The user@server is the name which appears after the == IN the public keyfile.
      • vi gitosis.conf
      • Add new users you would like to administer gitosis or keep them for other repositories.
      • Quit and save.
      • git commit -a -m "Whatever commit message you like to add"
      • git push origin master:refs/heads/master

  5. Adding repositories
    • Go back to the gitosis-admin folder on your local machine.
    • vi gitosis.conf
    • On a new line, add
      • [group repo_name]
        writable = repo_name
        members = user1@server user2@server

    • Quit and save.
    • git commit -a -m "Whatever commit message you like to add"
    • git push origin master:refs/heads/master

In the final part, I'll list a few basic commands to get started.



Git-ty up (Part 1)

2008-01-30T12:27:23.059+08:00

2 days ago I was introduced to git, a distributed version control system (DVCS). A DVCS basically creates a copy of the repository on your local PC allowing you to work without access to the main server. You can do everything you need i.e. create new branches, tags, etc all locally. Especially useful to those working via laptops on the go. There have been opinions on VCS and DVCS even by Linus torvalds himself. In fact, in there was a guy in Drupal groups who did an evaluation on git. A few days prior to discovering git, i was reading up on Bazaar, another DVCS system sponsored by Canonical, the creators of Ubuntu. After trying out git and comparing it with SVN, here are my personal opinions on it :-

  • + Git is extremely fast. Syncing with the server was significantly faster than via SVN.
  • + Git uses SSH by default so no extra tunneling to secure your connection is required. This also means that user authentication is simplified whereby only uses who have their public key can even attempt to connect.
  • + Branching is supported natively.
  • + There is only 1 place where details of your files are stored, in .git, which, unlike SVN stores it in each folder. This also has the benefit of less space being used.
  • - Learning curve is slightly higher than SVN (took me longer to get a working copy with Git than SVN).
Don't get me wrong, but once you get your head wrapped around how and what Git does, it's actually pretty easy and fast to get things done. In my next post, I'll outline the steps I used to get Git working.



Look out Outlook

2008-01-15T13:52:47.563+08:00

2 posts in a day. That's new. Heh. I've just finished setting up IMAP + Google calendar on my Thunderbird. I've kinda given up on managing everything purely using the web as I've got a few different mail accounts (not only from Gmail) and it gets pretty tiring to logout and login to different accounts. Also, my friend has been asking me if there is an alternative to Outlook for some time now so I decided to look around. Since I've never used Outlook before its hard for me to comment exclusively on its limitations or strengths.

So for my setup, I used Thunderbird + Lightning + IMAP for syncing my mail and calendars. And this method works for both Linux and Windows (should work on OSX as well but i haven't tried it out yet). Google has a good guide on setting up IMAP with your mail account in Thunderbird and this site gives a tutorial (with screenshots) on syncing Google calendar with Thunderbird. I'll post the guide on setting up an IMAP server with a local calendar setup for companies once my friend passes me the guide. Till then, happy syncing.



Secure GRUB

2008-01-15T11:39:08.348+08:00

No its not about food. Its about making sure no one fiddles with your boot menu which can allow them to boot into single user more or change any other setting. Here's how you do it :-

  • To create a password, type "grub-md5-crypt". Enter your desired password TWICE and if it matches, the application will give you the MD5 password. Example
    • grub-md5-crypt
    • Password : <Enter your password>
    • Retype password : <Enter your password again>
    • $1$D3V8K$EnFFr14dK5PCgmz2GCsDS.
  • Copy the output given i.e. "$1$D3V8K$EnFFr14dK5PCgmz2GCsDS." either by using your mouse or you can write it down somewhere.
  • Edit your GRUB config file in "/boot/grub/menu.1st".
  • Add the line "password --md5 <MD5 password>". It can look like this
    • default 0
    • timeout 3
    • password --md5 $1$D3V8K$EnFFr14dK5PCgmz2GCsDS.
    • hiddenmenu
  • Optionally, if you dual boot, you can also make sure Windows does not boot unless the password you specified is given. For it just add the word 'lock' after the 'title' section for Windows
    • title 'Windows XP Professional Edition'
    • lock
    • root (hd0, 1)
    • chainloader +1
  • Quit and save your changes
And you're done. Happy grub-ing...



Workrave

2008-01-14T14:48:52.390+08:00

Heh. A title that matches the software. That's new. Anyway, while I was going through the software collection in Open Source programs for Windows I stumbled onto WorkRave. From the site, "Workrave is a program that assists in the recovery and prevention of Repetitive Strain Injury (RSI). The program frequently alerts you to take micro-pauses, rest breaks and restricts you to your daily limit." Useful for those people who are constantly working in front of their PC non-stop.

Happy raving ;)



IE coming to a Linux near you

2008-01-05T18:36:56.597+08:00

Well first up HAPPY NEW YEAR to everyone. Goodbye 2007, helooo 2008 :D. Ok now back to blogging...

If you're into web development AND you're on a Linux machine, testing your site to make sure it looks and plays well with IE is a definite must. Well thanks to the folks at IEs 4 Linux, we can now get it working on Linux without having to boot up windows. This script can install IE5, IE5.5 or IE6. Below are the steps to get it working :-
  • You must install wine and cabextract first.
    • sudo apt-get install wine cabextract
  • Download ies4linux here.
  • Untar it in a folder of your choice and switch to that directory.
  • Install it using "./ies4linux --no-gui" (if you're installing on a remote machine).
  • Watch it download and install the necessary stuff from Microsoft's website and Flash from Adobe.
  • After you're done, you can execute it by typing "ie6" from the command line or on the link from your desktop.
  • Test your site on IE to see how it looks ;)

It is also possible to install IE7 using the method described here. Google has been kind enough create a stand alone installer which can be obtained from this link for those who just wish to obtain IE7. I'm listing the quick steps to get IE7 working here. For a more comprehensive explanation, check out the link above.
  • Switch to your local ies4linux directory.
    • cd ~/.ies4linux
  • Copy your existing IE6 folder to IE7
    • cp -r ie6 ie7
  • Replace all references of ie7 to ie7
    • sed ~/.ies4linux/bin/ie6 -e 's/ie6/ie7/g' > ~/.ies4linux/bin/ie7
  • Make the new ie7 script executable
    • chmod +x ~/.ies4linux/bin/ie7
  • switch to the directory your downloaded IE7 to.
  • use cabextract to extract the files needed
    • cabextract IE7Setup_G.exe
  • now use cabextract on the IE7 setup actual
    • cabextract IE7-Setup.exe
  • now run this command
    • for i in wininet iertutil shlwapi urlmon jscript vbscript \
      ieframe mshtml mshtmled mshtmler advpack
      do
      chmod +x $i.dll
      cp $i.dll ~/.ies4linux/ie7/drive_c/windows/system/$i.dll
      done
    • chmod +x inetcpl.cpl
    • cp inetcpl.cpl ~/.ies4linux/ie7/drive_c/windows/system/
  • These 2 files are needed for IE7 to work
    • normaliz.dll = http://www.dll-files.com/dllindex/dll-files.shtml?normaliz
    • inetcplc.dll = http://www.dlldump.com/download-dll-files_new.php/dllfiles/I/inetcplc.dll/6.00.2800.11068/download.html
  • Copy the 2 files to your IE7 folder
    • cp normaliz.dll ~/.ies4linux/ie7/drive_c/windows/system
    • cp inetcplc.dll ~/.ies4linux/ie7/drive_c/windows/system
  • Make sure WINE is using Windows XP as its container otherwise the there will be view pane corruption
    • WINEPREFIX=~/.ies4linux/ie7 winecfg
  • Lastly create a shortcut to IE7
    • ln -s ~/.ies4linux/bin/ie7 ~/bin/ie7

Happy browsing :D



Foxy tips

2007-10-31T11:23:49.988+08:00

Here are some tips for Firefox which will make your browsing a little more snappier. For this you have to launch Firefox and type "about:config" in the addressbar which brings you to your personalized configuration list.

  1. Restore your session when you repoen your browser (not when crashed)
    1. browser.startup.page = 3
  2. Address bar auto completion
    1. browser.urlbar.autoFill = true
  3. Disabling IPv6
    1. network.dns.disableIPv6 = true
  4. Download only what your specifically click (by default Firefox downloads links which it thinks you want)
    1. network.prefetch-next = false
  5. Stop that RAM hogging
    1. RAM size 128MB - 512MB : browser.cache.memory.capacity = 5000
    2. RAM size 512MB - 1GB : browser.cache.memory.capacity = 15000
Those are some of the more interesting tips from "about:config".

Here's another extremely cool feature to have. It basically lets you create keywords for sites your frequently visit i.e. g for searching through google or wiki for searching through wikipedia and you can create as many as you wish. I've been using this feature for some time and I hope this benefits someone else out there. So here's how you do it (using google as an example).
  1. Right click on the search box.
  2. Click 'Add a keyword for this search'.
  3. Enter a Name, your desired keyword and a location for your bookmark.
  4. Click OK
And now you're done. Go to your address bar, type in the keyword with your search query and watch as the magic unfolds. Experiment with other sites and see how can make this wonderful feature suit your needs.

Stay foxy ;)...




DVD not mounting?

2007-10-23T08:20:33.928+08:00

Ever had this scenario happen to you? Place a DVD in your DVD-ROM only for the OS to spew out "mount: wrong fs type, bad option, bad superblock on /dev/sr0,
missing codepage or other error
...
". Well it happened to me and after going through the logs and forums, I finally found a solution. Apparently my /etc/fstab left out the filesystem for the CD so I had to add it in and everything started working again. Sheesh...

Original
/dev/dvd1 /mnt/dvd1 udf ro,user,noauto,unhide 0 0

Modified
/dev/dvd1 /mnt/dvd1 udf,iso9660 ro,user,noauto,unhide 0 0


Hope this helps someone out there ;)



Slow X applications over SSH

2007-10-20T23:08:24.406+08:00

Just a quick tip for those tunneling X applications over SSH and you experience slow responsiveness (not because of slow lines) or get the an error similar to the following
"Gdk-WARNING **: Connection to display localhost:10.0 appears to be untrusted. Pointer and keyboard grabs and inter-client communication may not work as expected."

try this "ssh -2 -4 -C -Y user@host". This enables trusted X forwarding which removes the message above and speeds things up

From the SSH man page
"
-X Enables X11 forwarding. This can also be specified on a per-host basis in a configuration file.

X11 forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the
user's X authorization database) can access the local X11 display through the forwarded connection. An attacker may then be
able to perform activities such as keystroke monitoring.

For this reason, X11 forwarding is subjected to X11 SECURITY extension restrictions by default. Please refer to the ssh -Y
option and the ForwardX11Trusted directive in ssh_config(5) for more information.

-x Disables X11 forwarding.

-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.

ssh may additionally obtain configuration data from a per-user configuration file and a system-wide configuration file. The
file format and configuration options are described in ssh_config(5).

"







FTP me

2007-10-15T11:18:13.232+08:00

If you're looking for a good FTP client but don't want to install more programs, check out FireFTP, a Firefox plugin. It's great, small and efficient. After installing it, you can access it using Tools->FireFTP. Alternatively, you can add it to your toolbar by right-clicking on the toolbar, choose 'Customize' and drag the FireFTP button onto the toolbar. That's it :D. FTP away.



Wiki on the go

2007-10-15T21:03:35.219+08:00

Plenty of people are looking for a program that lets them keep notes on the go. And there are plenty of applications out there which can do this already i.e Tomboy. As for me, I was looking for something which had the following criterias:-
  • It had to be small.
  • It had to be accessible from any platform.
  • It has to fit on a usbdrive.

This led me to MoinMoin Desktop Edition (MMDE). Its basically a wiki but one that sits on your desktop (or thumbdrive once you get Portable Python). However, its overkill (a full wiki for personal use???) and it does have a slight learning curve. Scouted around some more and found this little darling, TiddlyWiki.

Its a personal wiki writting 100% using Javascript and HTML thus all you need to use it is a modern browser i.e. Firefox or Opera. Installation is as simple as right clicking on the download link and choosing "Save link as" to your preferred location. And that IS all there is to it Now launch your browser, open the file you just saved and you're ready to start keeping notes. You can now copy the file to your usbdrive and carry it with you wherever you go. Heck, there are some people who are using this to even create a personal websites (don't worry. Once hosted, the editing feature is disabled). Neat huh :D





Blogs of fire

2007-10-13T23:15:18.529+08:00

I was recently looking for a tool to help with my blogging. It gets tedious at times when you HAVE to login to the blog before jotting down the ideas and then publishing them. Tried a few of them but nothing worked out well for me until i stumbled onto a Firefox extension called ScribeFire. It supports blogger, WordPress, LiveJournal and even Windows Live Spaces. After installing it, i tried adding a single blog and everything simply worked fine. You can create and save your blog as a local copy making it easier to edit it later.

All posts done via ScribeFire adds a "Powered by ScribeFire" at the end. Some people don't mind the promotion, others do. I have nothing against free software wishing to promote itself but I also believe that people should be allowed to make the decision for themselves. For those wishing to remove the link (or change it to something else) here's the tip.


  1. Go to your firefox extensions folder.
  2. Open up "editor" using your favorite editor.
  3. Look for "performancingUI.insertPoweredByPFF" (or similar). This is where you can edit and add your own stuff or remove the entire line completely.
  4. Save and quit.
  5. Restart your browser for the changes to take effect.

Now that it's done, you can blog away from your browser wherever you are. Blog away my pretty...;)




Read em CHM files

2007-10-13T23:13:22.778+08:00

Sometimes we "acquire" some e-books in CHM format and have some trouble opening them up in Linux boxes. This is not a problem in Windows (CHM is a MS format) as it comes with the tools to open it but us Linux (and BSD) users can't open it up by default. So, what do we use to view it? Well there are 2 options.
  1. Using GnoCHM
    • A decent viewer (for GNOME) to open .chm files directly. You can install it using
      • sudo apt-get install gnochm
  2. Using archmage
    • It basically decompiles the .chm file and stores the contents in a folder of your designation
    • To install it
      • sudo apt-get install archmage
    • To use it
      • archmage file.chm output_name

Happy reading :D





Pretty GUI apps over SSH

2007-10-06T21:10:37.738+08:00

I've been running some of my X applications i.e. scite, kdevelop, etc over SSH on my work pc for a long time now. Recently a friend of mine asked me how it was done so I decided to post it here for those looking for a similar solution.

First, make sure your SSH server has this option enabled "X11Forwarding yes" in your /etc/ssh/sshd_config file and then restart the SSH server.

On your client machine, establish a connection using "ssh -2 -4 -C -X user@server". This effectively tells your SSH client to connect to the SSH server using protocol version 2 running on IPv4 with compression enabled and to allow X forwarding.

Alternatively, you can create a .ssh/config file on the client and add the following options to it which gives the same result as above
Protocol 2
Compression yes
AddressFamily inet
ForwardX11 yes



And you're done. You can now run remote X programs on Linux or Windows (using cygwin).

NOTE: 1 possible error that you might encounter is "Gtk-WARNING **:cannot open display:". If this happens, execute your ssh command with the following "ssh -2 -4 -C -X -v user@server" and look at the debug output. If you see something similar to "debug1: Remote: No xauth program; cannot forward with spoofing." make sure you have xauth installed. If you do, delete your existing .Xauthority file, logout and login again. This will cause a new .Xauthority file to be created and hopefully it will solve the annoying error message above. Enjoy ;)



SVN tips

2007-09-20T14:29:48.408+08:00

Ok here are some more tips in addition to the earlier ones. Sometimes, you want to create a copy of an existing directory to another one before making significant changes. I know that's why we have SVN in the first place, to revert to last known working copy, but at times (especially when it involves looks) it can be quite tiresome. However, SVN will not add the copied directory as it considers it already under version control. Hmm..a tough one. Actually, its pretty easy. Here's how I did it :-
  • cd /path/to/project/copied directory
  • find ./ -name ".svn" | xargs rm -fr
Now the directory is no longer under version control. You can run "cd /path/to/project/;svn add * --force" to add the copied folder to the version control. Thats all folks :D



Safeguard your streams

2007-09-13T14:24:32.860+08:00

Question:
If you wish to secure a connection from 1 service to another, what would you use?
a.) Why would I want to do that?
b.) Set up VPN.
c.) SSH tunneling.
d.) Stunnel.

Answer
a.) There is no such thing as being too paranoid.
b.) Ever heard the phrase "using a nuke to kill an ant"?
c.) Same as above by replace nuke with high explosive.
d.) BINGO!!

Stunnel is an application which wraps your normal connection over SSL/TLS to make sure no one can eavesdrop on your connection. This is particularly useful when you wish to secure your mail (SMTP, POP3) or securing your SVN server (heh, its what I am using it for:P). Its main benefits is that its extremely easy to set up (within 5 minutes) and it
only establishes a connection when needed, and not
maintain its secure tunnel perpetually, which eats up
your bandwidth unnecessarily.

This is my instruction on setting it up (for Ubuntu) on the server (svn as an example). Feel free to change the location and/or configuration to suit your needs.

  • sudo apt-get install stunnel
  • mkdir -p /home/shinning/secure_services/pid
  • mkdir -p /home/shinning/secure_services/service
  • cd /home/shinning/secure_services/
  • [create server cert] - openssl req -new -days 365 -nodes -out newreq.pem -keyout stunnel.pem
  • vi /home/shinning/secure_services/service/svn.sh
  • stunnel -P /home/shinning/secure -p /home/shinning/secure_services/stunnel.pem -d 4000 -r localhost:3690

And that it. Your SVN server is now running securely on top of SSL/TLS making it hard for anyone to sniff your traffic. You can also make your client authenticate itself against your server if you want to by following this guide. There are also tonnes of other examples here. Happy securing ;)



Fortune, meet planning

2007-09-13T14:19:29.280+08:00

"Good fortune is what happens when opportunity meets with planning - Thomas Alva Edison"

The above saying is SOO true. How many times have we had the oppurtunity to do big things, but we failed because we didn't have a proper plan. And NO, I'm not talking about a bid to take over the world. Unless that's your plan of course, then I ain't gonna stop you. Perhaps the following tool can help you list out the things you have to do and set a timeline for it :P

The tool I'm talking about is called Planner which exists for both Linux and Windows. Think MS Project, but cross platform. Having never used MS Project before, its hard for me to say what are its limitations. However, its been really useful to me so far and far easier to use than some other project management software i.e. TaskJuggler.

For those using Linux, you can probably find it in your repository. In Ubuntu "sudo apt-get install planner" is sufficient to download and install this nifty software. Happy planning :D

Some screenshots are below for your viewing pleasure
Task allocation
(image)

Resource allocation and usage
(image)

GANTT chart
(image)



My first version control

2007-09-12T10:16:49.849+08:00

Ok, now we've got our versioning control server up and running. Now what? Now we start using it. I'll list the more basic command/uses here using the CLI. If you like, you can check out some other documentation on SVN.

  • Creating a repository
    • Log in to svn_srv
    • svnadmin create --fs-type fsfs /path/to/svn/repository_name
    • chgrp -R svn /path/to/svn/repository_name
    • cdmod -R 770 /path/to/svn/repository_name
    • cd /path/to/svn/repository_name/conf
    • Edit the svnserve.confauthz and passwd file appropriately if you wish to disallow anonymous access and only allow authorized users to access your repository (recommended).

  • Importing an existing project to the above created repository
    • svn import /path/of/existing/project/folder svn://svn_srv/repository_name --username user_in_authz_file -m "Log message"

  • Downloading a fresh copy of the repository
    • svn checkout svn://svn_srv/repository_name /destination --username user_in_authz_file

  • Sync-ing a local copy with the changes in the repository
    • svn update --username user_in_authz_file  [-r revision_we_want_to_sync_with]

  • Show exact changes in files which have changed from repository and your local copy
    • svn diff --username user_in_authz_file [-r revision_we_want_to_compare_with]

  • Show things which have changed on your local copy and the repository
    • svn status -u

  • Adding new files to be added to the version control (recursively adds files and folders)
    • svn add * --force

  • Merging changes from two sources to the current copy
    • svn merge --username user_in_authz_file --no-auth-cache -r revision_to_merge_to:revision_to_merge_from /path/to/changed/copy
    • svn merge --username user_in_authz_file --no-auth-cache  URL@revision_1 URL@revision_2 /working/copy/path

  • Deleting a file from the local copy or in the repository
    • svn delete svn://svn_srv/repository_name/file
    • svn delete path/to/file
  • Undo all local changes (does not work with removed directories)
    • svn revert --recursive
    • svn revert path/to/file
  • Commit your changes to the repository
    • svn commit


By no means is the above a complete list of options or things you can do with SVN. Read the documentation and try it out for yourself to see the power of this tool.Or, if all this looks too complicated, we could use a GUI for it. Some of the are listed below :-



So many versions, so much confusion

2007-09-09T09:26:16.978+08:00

How many times have you worked on a project or document only toaccidentally delete a critical file, made a modification and wished youhad the original copy, or simply keep track of all the changes to yourproject. The most common way is to create an exact copy before doing any changes. It works, but it takes up unnecessary space and unless you keep a good listing of your changes, you'll be scratching your head wondering where to begin.Obviously there is a solution for this, otherwise it'd be pointless towrite this entry now wouldn't it:P The solution is pretty simpleactually. Install a version control software :D And yes it IS easy toset up as it sounds. It's the using it that's slightly confusing, butI'll address it in a later post. For those who don't know what versioncontrol is, check out this Wikipedia article.This HOW-TO is based on thw howto from this site. I DO NOT take credit for this work and I'd like to express my appreciation to all the people who made ubuntuguide.org possible. I'll be using the client/server version for this guide. It is also possible to set one up to be accessible via web but I'm not going to touch it here. The HOW-TO for that is already available.On Ubuntu (regardless of version), follow the following step-by-step toget your version control software up and running :-Install the necessary software needed.sudo apt-get install subversion subversion-tools xinetdCreate a user and group that will be have read/write access to the repository directory.sudo adduser --system --no-create-home --home /var/svn --group --disabled-login svnCreate the directory where the repositories will reside (your projects/documents)mkdir /opt/svnchown -R svn:svn /opt/svnLets make the software listen on its own connection port.vi /etc/xinetd.conf/svnserveadd the following to the above fileservice svn{port = 3690socket_type = streamprotocol = tcpwait = nouser = svnserver = /usr/bin/svnserveserver_args = -i -r /var/svn}quit and save the contents. This makes our svn server listen to TCP connections on port 3690.vi /etc/servicesCheck if there is an entry similar to "svn 3690/tcp subversion # Subversion protocol". If you changed the port to something else, make the changes appropriately.If it doesn't exist, add it in, otherwise just quit.Note : If the above entry doesn't exist in /etc/services, the svn will not start./etc/init.d/xinetd restartCheck if our svn server is now listening on ourdesignated port.netstat -tuanp | grep 3690And that's all there is to it. Now you have your very own versioncontrol software ready to use. My next post will cover creating andmanaging your repository.I'm also thinking on how to make this also useful for incremental backups. Until then, stay sharp and lets support Open/Free software :D.[...]



Rise of the Star

2007-09-08T23:44:44.762+08:00

Gosh. It's been more than a YEAR since I last blogged. Damn where DOES the time go. Been caught up in some projects and getting distracted here and there ;) Well lets see how long I can keep this blogging thing again before I get lazy :P

P/S : I will also try to answer any questions or comments posted from now on. I apologize for the comments which have not been answered earlier.



Multipost

2006-07-31T15:25:27.313+08:00

This is a multipost. Kinda tired to write up invididual posts, hehehehe.

Anyway just came back from FOSSCAR. It was a really intersting event where I got to meet the rest of the #myoss guys. The presentations were really intersting especially the "10 worst sysadmin mistakes" and "Using open source for enterprise networks". You can get the presentation slide for "Using open source for enterprise networks" from here. Got a few photos which I'll upload once I extract it out.

Also, after looking at some of the guys using Expose-like features from OS X, I decided topost the app for others who want a similar feature. I tried it a few months back for sheer eye candy but disabled it cause didn't quite enjoy it especially without a proper graphics card. You can actually see the lagginess. Anyway the app is called skippy. For ubuntu, just "sudo apt-get install skippy" and its done;)

Well seems like a multi post just turned out to be 2 post:P. Off now, cheerioz;)



Mon It

2007-03-23T10:07:33.476+08:00

Recently I tried an application that aids in ensuring your system is running smoothly called monit. From the website of monit "monit is a utility for managing and monitoring, processes, files, directories and devices on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations." There are packages available for FreeBSD and Ubuntu.Installing and setting up monit on ubuntu is fairly easy, just do "sudo apt-get install monit" and its installed. Configuring monit is extremely easy. In fact the "/etc/monit/monitrc" file explains in depth the options available and how to use the variables.The installation step for FreeBSD is "pkg_add -rvv monit". The monitrc file is in "/usr/local/etc/monitrc".I'm posting a sample of my monitrc here as a simple guide.#start sample monitrcset daemon 120 #monitor the system every 2 minutesset mailserver localhost #use localhost as the mailserverset mail-format {from: monit@system} #set the from field of the mailset alert user@localhost #who will receive the mail#set the http port in which monit will report its status, the address it listens on, who can connect to it as well as the username and password required to login to monitset httpd port 10123 and use address localhost allow localhostallow admin:monitinclude /etc/monit/services/* #Include files containing services, filesystem to monitor#end sample monitrcsample /etc/services/ssh #sample file that monitors the ssh service#start /etc/services/ssh check process SSH with pidfile /var/run/sshd.pid start program = "/etc/init.d/ssh start" stop program = "/etc/init.d/ssh stop" if cpu is greater than 60% for 2 cycles then alert if cpu > 80% for 5 cycles then restart if totalmem > 200.0 MB for 5 cycles then restart if children > 250 then restart if loadavg(5min) greater than 10 for 8 cycles then stop if 3 restarts within 5 cycles then timeout group Server#end /etc/services/sshAs you can notice, the file is pretty self explanatory. Some other things that you can do are monitor if other machines are alive, alert you if the filesystem usage exceeds a certain percentage, ensure that filesystem permissions are set correctly, ensure that the checksum for specific system files are not changed, etc. Feel free to try out the various combination and options available.Happy MonIt-oring;)[...]



Emu v2

2006-07-13T14:35:56.780+08:00

I've managed to get qemu installed and working using the guide posted here. However I'll post a short HOW-TO here as well:) I do not take credit for getting this to work;)Download the QEMU + KQEMU package from here.Install the following packages which includes your linux kernel headers "sudo apt-get install linux-headers-$(uname -r) libsdl1.2-dev zlib1g-dev checkinstall qemu".Create a symlink to your linux kernel for simplifying things at a later stage (which includes updates) using 'sudo ln -s /usr/src/linux-headers-$(uname -r) /usr/src/linux-headers'Extract the qemu package to a folder of your choice (i.e. /home/user/qemu) and also extract the kqemu package into the same directory. Remain in this directory.edit the qemu 'configure' file and change the kernel_path="" to 'kernel_path="/usr/src/linux-headers"', quit and save the file.type './configure' and look for the line that says "kqemu support yes".type 'make'. This process might take some time.Now we're ready to create the debian package. Type 'sudo checkinstall -D' and you will be prompted to answer a few questions. "1st question: Answer = default y2nd question: Answer = Any description you like about qemu"In my case after the creation of the package I had to install the .deb file manually. This is accomplished using 'sudo dpkg -i '.Now we have to make sure that the modules required for functionality are loaded. Edit '/etc/modules' and add kqemu and tun to the file. To load it manually type 'sudo modprobe kqemu' and 'sudo modprobe tun'.Edit your '/etc/rc.local' and add the following mknod /dev/kqemu c 250 0 # Create the KQEMU device chmod 666 /dev/kqemu # Make it accessible to all users chmod 666 /dev/net/tun # Make tun accessible by all mount -o remount,size=544m /dev/shm echo 1024 > /proc/sys/dev/rtc/max-user-freqNow your system can emulate any OS of your choice;) Enjoy[...]



Dragon Reborn

2006-06-09T12:09:47.903+08:00

YESS!!! Dapper Drake has been officially released on the 1st of June. This time we only require a single CD for both the live CD and the installer which makes things easier to manage. I've successfully installed it using the GUI without any hitch and I'm 1 happy dragon rider:D