Ubuntu Karmic and RabbitVCS

Hey ppl, today I’m goint to give you few steps to install RabbitVCS on your Karmic Koala.

So, these steps are basic and what I did is I read, tried and now writing it here. At least, I’ll know where to look if I need a quick answer :). I hope you will too.

So basically you open terminal and type this:

sudo add-apt-repository ppa:rabbitvcs

Then, you type sudo apt-get update, and when you look for rabbitvcs package with aptitude search rabbitvcs, you’ll get a couple of packages listed. These are the packages:

  • rabbitvcs-cli
  • rabbitvcs-core
  • rabbitvcs-gedit
  • rabbitvcs-nautilus
  • rabbitvcs-thunar

Rabbitvcs-core is a core of rabbitvcs. How hard does it look like 🙂 For me, very interesting is rabbitvcs-thunar. Of course if you want the best looking, you shoud install rabbitvcs-nautilus, because it installs plugins for nautilus, and you get fully integrated rabbitvcs in nautilus. The only thing, I do not like is that every time you start nautilus, rabbitvcs will scan for svn repo directories and that will slow down your work. On the other side, on those svn repo dirs you’ll get icons, similar to those you get when working with Tortoise on Windows. So you can see, by them, if you have to commit working copy, or there is something wrong with it.

If you choose rabbitvcs-thunar, you’ll get rabbitvcs integrated with Thunar. Thunar is best for slow machines, because it is not so fancy like Nautilus. If you want speed, and you don’t care about those little svn repo info icons in the corners of folder icons, you should definitely check this one out.

That is all folks. If you need some help just leave the comment, and I’ll be good host and reply you asap!


Ubuntu Jaunty and RabbitVCS

Hey again, and this time I’m going to talk about setting up RabbitVCS on Ubuntu Jaunty.

Now, I had some issues about following steps that are posted on official site, so I’m going to write them here, and maybe someone will need it.

Ok, it goes like this, first you add the key for packages, with this:

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 34EF4A35 (be sure that you put double dash at keyserver and recv. on official site when you post that it eats one dash, and you can’t do the work and can not proceed with the further installation steps)

deb http://ppa.launchpad.net/rabbitvcs/ppa/ubuntu jaunty main

sudo aptitude update
sudo apt-get install rabbitvcs-core rabbitvcs-nautilus

And further steps are for killing and starting nautilus with rabbitvcs plugins installed:

nautilus -q

pgrep -f service.py | xargs kill

nohup nautilus > /dev/null &

These steps are copied from the official site and I did double dashing to make it work. So I hope I wont get attacked by original writer, coz I only want to make this easier for newbies.

Now, you might be asking yourself, “WTF is he using Jaunty, when there is Karmic and Lucid is about to be launched???”. Well, to be honest, I have installed so many packages on my Ubuntu, and my update to Karmic is going to cost me a milion years and about 2GB of free hard disk space… and I can’t afford that! 🙂

Nevertheless, I’ll do the basic steps on RabbitVCS installation on Karmic, in near future, I hope! 🙂

Take care, bye!

Working with the VBoxManage and VBoxHeadless

Hello everybody, today I’m going to show you some basics in managing virtual machines in VirtualBox, from command line.

First, lets assume you have installed virtual machine and you want to run particular one, but you don’t know what was its real name. To list all virtual machines you use:

VBoxManage list vms

Then when you see the name of machine, you can run it by typing:

VBoxHeadless -startvm “nameofmachine”

This way, you’ll be able to run machine without running VirtualBox GUI.

Now that I experimented with VBoxManage controlvm, you can use it to reset, poweroff , savestate of machine and all those cool stuff you can do in GUI. For example, to restart machine, use:

VBoxManage controlvm “nameofmachine” reset

One more thing, that is very cool is that you can change type of networking while machine is still running. You can do that with:

VBoxManage controlvm “nameofmachine” nic<1-N> null|nat|bridged|intnet|hostonly [<devicename>]

For device name, I have vboxnet0, and that is the device which your host recognizes. After changing the way your virtual machine access the network, you can reset it just in case, and everything should work well.

For exporting you can use command:

VBoxManage export “nameofmachine” -o nameofovffile.ovf –legacy09

You can add some informations about virtual machine but they are not needed for importing it and running safely. Legacy09 is for including possibilities that someone who will import can read OVF 0.9 standard and not newest 1.0.

Importing is also piece of cake:

VBoxManage import nameofovffile.ovf

You can include –dry-run or -n flag to go through the process of imorting in detail and choose what to import and the way of importing.

After importing, you may find some difficulties in network access on virtual machine. The problem should be easy solved by removing /etc/udev/rules.d/70-persistent-net.rules

I’d also point you to this post, cuz this is very good post about doing some virutal machine work in command line. YEY! 😀

Basic steps in installing and setting virtual machine on virtual box (Serbian Srpski)

This is something I wrote for my colleagues who are using VirtualBox for making virtual machines and it is on Serbian language.

Поздрав свима, ево pdf-ова са упутствима за инсталацију VirtualBox-а под Убунту Линуксом и неки основних корака у креирању и намештању виртуалних машина…

VBox Kratak Uvod

VBox Rad sa virtuelnim masinama

Installing LAMP, SSH, Webmin, SVN repository on jeOS

Hey ppl, today I’m going to tell you how I did this particular job of setting up a Linux based server dedicated for my project.

I’m going to cut the intro and start with the real deal :).

First, I used VirtualBox for making virtual machine. I’m using VBox 3.1.4. I made a dynamic sized hard disk and set its max capacity for 6 GB, which is just enough for my needs.

Second, I downloaded jeOS from this link, http://cdimage.ubuntu.com/cdimage/jeos/releases/8.04.3/release/jeos-8.04.3-jeos-i386.iso. You can download it just clicking on this link, ooooor you can use wget tool in your command line(terminal), if you are linux geek, like me :D. After downloading it, make sure you add in the virtual media manager, in VirtualBox. Then, open the settings for your newly created hard disk and choose to mount jeOS’s .iso. In the Network part, choose NAT. I’ll explain that latter. Then ruuuun the coolest virtual machine ever :).

In the mean time, as you install jeOS, let me say that it is based on Ubuntu 8.04 LTS server, where LTS is for Long Time Support. I read somewhere that it is going to be supported until 2013!!! That means, you wont have to think of setting a new virtual machine for a looong time. Cool, isn’t it? 😉

Now that you have installed the jeOS, we are going to update and upgrade installation. First, you can use sudo vi for editing the /etc/apt/sources.list file, and if you know what you are doing, removing some pound symbols. After successfully editing it, run sudo apt-get update for updating the list of available packages. After that, run sudo apt-get upgrade for making sure that installed packages are going to be newest.

Until that happens, I’m going to tell you, that jeOS is Ubuntu based server edition made only for virtual machines, so it doesn’t have all the packages that real 8.04 LTS server edition has. That is going to make our job slightly harder, because there are going to be some dependencies that we are going to have to solve. No need for panic, I already did this, so you are getting this without sleepless nights and red eyes, as I did. Poor mee! 😦 😀

Anyway, thanks for ppl who helped us as much as they could and made us a package called lamp-server^. It basically installs Apache, PHP, MySQL in one, without making us install all these packages one by one, by apt or downloading and compiling them. Compiling is much better if you have to make some slightly changes and fine tune the server. That is not the subject of this post, so we are not going to do that.

So, we install lamp server with sudo apt-get install lamp-server^. Make sure that you put ^ at the end of package name. Next to do is installing the SSH support, so you do not have to do all this from virtual machine, but by accessing it through the terminal or putty. Of course, this is just installing it, for accessing it you will have to to some things that I’m going to explain latter. So, to install ssh server, run sudo apt-get install openssh-server.

After this, the best way to administrate your server machine is to install Webmin. You can get it by wget, that I suggest, because if you download it on host machine at this point, you wont be able to transfer it to virtual machine. So, use wget! How coooool, back to the command line! 😀 Whis is the site where you can get the latest version of webmin, http://www.webmin.com/download.html. After downloading it,if you try to install it, it will print some broken dependencies, about some perl libraries. So before installing webmin, type sudo apt-get install libnet-ssleay-perl openssl libauthen-pam-perl libio-pty-perl libmd5-perl. This is going to fix all dependencies and then run sudo dpkg -i <nameofdownloaded-file>, for installing it. Of course, you have to download the .deb package to install it with dpkg -i, oooor you can download and .rpm for example and use alien to conver it to .deb. This is just an info, we are not going to to that! 🙂 coz there is no need for it.

That is it, now you could access webmin by typing the ip of the machine and choosing the port 10000. Only problem is that virtual machine is accessing the internet over the NAT, so it has IP from private domain, and you can’t see it. No big deal, we will fix that very soon.

Now, to install SVN. This is very useful tool for you if you are working on some project with your colleagues or buddies. It can make work on project a piece of cake. To install it type sudo apt-get install subversion libapache2-svn. The second package is module for Apache, so you can access your svn repository over http with Apache. Cool stuff, but if you are doing some classified project, better use it with https protocol, to make sure it is crypted over the internet. You are going to think that this is the end of setting up the SVN, and I’d like to tell you that! 🙂 Buuuut, it is not! You have to use adduser or useradd commands in command line and add the svn user. Make sure that when you add it, edit the /etc/passwd file with super user permissions and edit the default shell for svn to /bash/false. That way, no one will be able to log in on server as svn user. Next thing is to edit /etc/group file, agains as SU and add you as member of svn group. You can add all users that are going to be using svn repository. After finishing that, we are going to make repository directory. Now, I made it on /srv/svn/, but you can choose whatever you like. When you make a directory, run sudo svnadmin create /path/to/your/directory/repos. I did svnadmin create /srv/svn/repos. Now run sudo chown -R svn.svn /srv/svn for making the svn user a owner of that directory, and then sudo chmod -R g+w /srv/svn, for letting all members of svn group to access and write in your svn repository.

So, now you can access your svn repository ove svn+ssh://machineip/path/to/svn/repos oooor making it available over http or https with Apache. To do the Apache way, you have to turn off the machine. Now is the time for changing the Network settings. When virtual machine is turned of,  go to settings and change from NAT to Host only networking. This way, your host and your virtual machine are going to be able to see each other as if they were in local network. Bad thing is that virtual machine will only see host machine then. But, we installed all the packages we are going to need so that is not the problem. Just for info, internal network is for virtual machines to see each other, and bridged network is for making the virtual machine as real computer on your LAN. That way, it will get real 192.168.. adress and be more like a real server. But this part is more complicated, cuz you have to make some changes on host. Anyway, run the virtual machine, and when you log in run ifconfig and see that it is ip address of virutal machine. Type that address in web browser on host, and you should see the words “Ii works!”. If you use https protocol and name the port 10000, you will be able to access webmin. There you will be able to set a virtual host, or even change settings for svn repository. The way we are going to edit apache’s settings is over the command line! Yey! 😀

So then, edit the /etc/apache2/sites-enabled/000-default file, with SU permissions and add before closing the VirtualHost tag, this:

<Location /svn/repos>
DAV svn
SVNPath /srv/svn/repos
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /etc/apache2/passwords
Require valid-user

Dav svn – Instructs Apache to pass the request onto the DAV layer for processing as a subversion (svn) request. SVNPath is saying where is the repository. AuthType is for authentication, AuthUserFile is file where you specify  the users that are permitted to access repository. There are crypted passwords. Since you create it and it is empty, you can add user and password with this command, sudo htpasswd -cb /etc/apache2/passwords username password. Of course, it is not suggested to type password, coz it is going to be seen in command line history. To make htpasswd propmt for password, exclude the b flag.

Now, you have to reload apache daemon, with sudo /etc/init.d/apache2 force-reload. This way, when you type in hosts browser http://ipofthevirtualmachine/svn/repos login window should appear and when you enter password, it should show you the repository.

I had in mind showing you the basic commands for managing the virtual machines from command line, but since this post took so much time, I’ll leave vbox managing for another time.

I hope my english was good enough, and be free to comment this post, if it is good or bad, or if you have some problems about setting up the LAMP on jeOS. I’d be glad to help.

Bye!!! 🙂