Tuesday, February 09, 2010
In my last post I wrote about how to install and configure Subversion and WebSvn on Ubuntu server. During the search on how to do that I tested two very good appliances. This two appliances are virtual machines that contains the installation of several source control and comes configured out of the box :). All I need is download the appliance and start using. There is no excuse to don’t have a private source control :).
The first appliance is Revision Source Control from TurnKey and it’s an appliance that includes:
- Revision Control systems supported: Git, Bazaar, Mercurial, Subversion.
- SSL support out of the box.
- Webmin module for configuring Apache2.
- Includes TurnKey web control panel (convenience).
Again everything it’s installed and configured and ready to use. Just download the appliance and run it on Vmware or Virtualbox.
The next appliance, Trac, it’s also from TurnKey and Integrates source control & project management. The appliance includes:
- Revision Control systems supported: Git, Bazaar, Mercurial, Subversion.
- SSL support out of the box.
- Postfix MTA (bound to localhost) to allow sending of email (e.g., password recovery).
- Webmin modules for configuring Apache2 and Postfix.
- Trac
These are just two appliances from TurnKey to make a developer life much easy :) again no excuse :P
I invite every one to see TurnKey site they have LOTS of appliances…
Saturday, February 06, 2010
On my last post I wrote about Ubuntu server and Webmin and why I changed WHS with Ubuntu server. Today I'm going to write about Subversion and WebSVN on Ubuntu server. One of the things that I had in WHS was a source control where I stored my code and documents. For that I used VisualSVN. VisualSVN combines Subversion with a web interface of all repositories and also includes user management. To me VisualSVN is the all in one...Veryyy goood product and unfortunately for me VisualSVN is just for Windows :(.
So one of the things I did before move to Ubuntu Server was backup my Subversion repositories so I could restore them on Ubuntu Server.
In Ubuntu Server I had to do install a few packages and do a few steps in order to once again have source control and a web interface. So today I'm going to explain how to install Subversion and WebSVN on Ubuntu server.
The first thing to do is install Subversion and apache package for Subversion. All I need to do is:
sudo aptitude install subversion libapache2-svn
In the next step I need to create a directory where my repositories will be stored. In my case /var/sourcecontrol/svn/. The default location is /var/lib/svn/.
This command will create de directory where all my repositories will be:
sudo mkdir /var/sourcecontrol/svn
After create the directory I copied my entire repository backup from windows into this directory.
Note if I need to create new repositories I just had to do:
sudo svnadmin create /var/sourcecontrol/svn/newRepository
newRepository is the name of the new repository.
Next I need to change the owner of the files in order to access using apache. This can be done with this command:
sudo chown www-data:www-data /var/sourcecontrol/svn/repositoryName -R
repositoryName is the name of the repository.
Next I just need to configure all my repositories to be access in apache. This can be done by editing the file /etc/apache2/mods-available/dav_svn.conf
To edit I just run the command:
sudo nano /etc/apache2/mods-available/dav_svn.conf
Scroll all the way down and add the following code for each repository:
<Location /repositoryName>
DAV svn
SVNPath /var/sourcecontrol/svn/repositoryName
AuthType Basic
AuthName "Subversion repository repositoryName"
</Location>
Next restart the apache :
sudo /etc/init.d/apache2 restart
Open a browser and type http://[serverip]/repositoryName and the repository is now availably in browser.
Notice the /repositoryName in the location is the same as /repositoryName in the url.
After this step you can start doing some checkin's :P
The next step is to install WebSVN. WebSVN is a very good web interface to see all repositories.
The first thing to do is install the package. This can be done with the command:
sudo aptitude install websvn
To have syntax highlight in the source code just install enscript . This can be done with this command:
sudo aptitude install enscript
Now a few things you should know:
During the install of WebSVN three screens will appear:
1 - Select the webserver for configuration.
2 - Specify the path of the subversion repositories, in this case (/var/sourcecontrol/svn).
3 - If all repositories are in the same parent folder leave this in blank otherwise you will have to specify all repositories separated by comma.
The package WebSVN is installed into /usr/share/websvn/, it's necessary to copy to /var/www/. This can be done with the command:
sudo cp -r /usr/share/websvn/ /var/www/
After copy to /var/www it's necessary to edit the file /etc/apache2/mods-available/dav_svn.conf, again with the command:
sudo nano /etc/apache2/mods-available/dav_svn.conf
Next, scroll down and add the following
<Location /websvn/>
Options FollowSymLinks
order allow,deny
allow from all
AuthType Basic
AuthName "Subversion Repository"
</Location>
Save the file and restart apache by doing:
sudo /etc/init.d/apache2 restart
Now just type http://[serverip]/websvn and you will see the WebSVN page and your repositories.
If for some reason your repositories have strange names in just edit the file /etc/websvn/svn_deb_conf.inc with the command :
sudo nano /etc/websvn/svn_deb_conf.inc
In this file you will have something like this:
<?php
// please edit /etc/websvn/config.php
// or use dpkg-reconfigure websvn
$config->parentPath("/var/sourcecontrol/svn/");
$config->addRepository("repositoryName\", file:///var/sourcecontrol/svn/repositoryName1);
$config->addRepository("repositoryName", "file:///var/sourcecontrol/svn/repositoryName2");
$config->setEnscriptPath("/usr/bin");
$config->setSedPath("/bin");
$config->useEnscript();
?>
Here it's possible specify the parent path of all repositories and specify each repository name and location. it's here also that it's specified the path on enscript installed before.
Hope you enjoy the source control and as much as I do :)
Special Thanks for Guerrix and his post on how to install subversion and websvn.
Wednesday, January 27, 2010
A few months ago I bought a license of Windows Home Server to the home server pc I built (see this post). My first encounter with WHS was terrible I did a stupid mistake and I almost delete every single file I had.
The second encounter was much better and every thing was running fine until I noticed here at home and confirmed in the web that WHS is not green and everything was always running at full speed, even when I’m not using it.
So I start looking for alternatives and I saw a project called Amahi that basically It’s a Linux home server with steroids (lots of options and software) and runs on top of Fedora.
I decided not to continue with Amahi, for a few reasons, and started looking for a simple OS that allows me to share files and alternatively have a source control, some databases and then I tested two. One was FreeNas and the other was Ubuntu Server. Since I’m a Ubuntu fan I decided to give a try and create a VM with Ubuntu server + SSH + Apache + MySql + Php (LAMP). Note FreeNas is also very good and it has a impressive web UI.
My first impression wasn’t good because the UI of Ubuntu Server It’s just command line. Alternatively I could install gnome by running this command line: sudo apt-get install ubuntu-desktop
But since I want something simple I decided to continue with the command line but needed something visual that could help me configure the home server. I search around and found Webmin.
Webmin has a demo and lots of screenshots here and Webmin it’s spectacular, a very good web user interface that allows me to configures almost the entire home server and that was just what I needed.
Install Webmin is very simple I just need to run this:
- On my computer I opened a command line and run the command ssh [serverIP] and login.
- By doing this I’m now able to run commands on the server. Then I just did
- sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl
- To install a few dependecies and the this
- wget http://www.webmin.com/download/deb/webmin-current.deb
- To download the Webmin, and then since the latest version is 1.500 I just need to run this command
- sudo dpkg -i webmin_1.500_all.deb
Now I that I have Webmin Installed I just need to open a browser to the URL https://[serverIP]:10000 and I have a UI that allows me to configure my server.
After given a test in a VM I decided definitely to switch from WHS to Ubuntu server with SSH and LAMP and I don’t regret my decision.
Next post will be about install and configure Subversion and WebSvn on Ubuntu Server… And yes my home server also have a source control.
Sunday, January 24, 2010
It’s been a long time since my last post… my apologies.
The first post of this new year will be about Ubuntu. It’s been 9 months since I stop using Windows at home and at work and start using Ubuntu as my primary OS (only use Windows in a virtual machine). The reason for the switch was because Ubuntu offers me everything I need, FOR FREE. I only use Windows for developing.
I shift because since Windows XP hadn’t saw any good reason to shift to any other version of Windows. Why? Because I don’t need and OS that eats all my memory doing stupid things like shiny colors, stupid effects, etc, etc, etc. You can say you can turn that stupid things off… Yes but that doesn’t solve the problem it just minimize it.
At home and at work almost every thing is running linux. Even the home server I switched for a windows home server to a Ubuntu server. The only thing It’s no using linux, yet, it’s the phone.
So for this new year I will do some posts about .Net and about Ubuntu and you should also expect some news about a project I’m working on at home.
Thursday, July 16, 2009
Did you ever imagine how to run VirtualBox as a windows Service. Check this
post on VirtualBox forum and you will have the solution.
Thanks
João Manso
Tuesday, July 14, 2009
Today I came across a blue screen in VirtualBox 3.0.2 in host Ubuntu and guest windows xp. The problem was related with a file
intelppm.sys. The solution was simple:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Intelppm
And changing the 'Start' value to '4'.
Check this post
here and you will get more info. The post talks about Virtual PC but the solution is the same for VirtualBox
If you use ubuntu you probably had listen the stupid beep upon reboot/shutdown. To disable this stupid beep just do this:
sudo gedit /etc/modprobe.d/blacklist.conf
And add this
blacklist pcspkr
At the end of the file.
Teboot and no more stupid beep.
This was tested with Ubuntu 9.04 Jaunty
Long time I'm a user of VirtualBox, why??? it's much more faster that virtualpc and much more faster that vmware player.
So if any one want to clone a vm just has to do:
VBoxManager clonehd "source.vdi" "destination.vdi"
this command is valid either in windows or linux.
Saturday, July 11, 2009
Saturday, June 27, 2009
During last month I had build a home server from scratch, of course I could buy one already build. But after careful exam of most home server sold out there, I notice that:
- Lack of ram, most of then only have 512mb or the best is 1gb. If i want for instance have a VM running on, that might be a problem
- All home server I’ve saw, most uses the intel atom CPU with just one core.
- Power consuming
- Expansion. I want a home server that I can add disks, if I want, let me just say that my option is not the best but I have 2 sata and 1 ide. So to me it’s enough.
- Silence, I want a home server silent. My choices were not very good at the beginning but now it’s silent enough.
- Network card, I wanted to be a gigabit Ethernet card.
- Price. I didn’t want to spent too much money.
So what were my choices:
First, the case. I choose the the Apex mi-008
It’s a small case, and silent. You can check the review here.
Second, the board. For the board I had choose the Intel D945GCLF2D, it’s a mini-itx board very small, but it had a Intel dual core Atom CPU, each core has hyper-thread. It has 2 sata, 1 ide, 8 usb, vga, 1 gigabit Ethernet connection. More info check here.
This board has a big big problem… do you see that small cooler on the board. That is definitely the loudest GPU cooler I’ve ever saw. Believe me when I say it’s loud.
Third , the ram, I have a 2gb ram ddr2.
Finally the disk is a WDC 640gb.
Put all of this together and you have a home server.
Now you can choose either install some linux distribution like freenas, or Windows home server, or something else. I decided to buy a license of home server.
All of these have some pros and cons.
So the pros are:
- It’s a fast home server. Faster than most home servers sold out there with a fraction of the price. By the way I’ve only spent 230€ here in Portugal for the hardware, plus a license of WHS bought on Amazon.
- I have dual core CPU with 2 gb of ram.
- The CPU is fan less, so it’s silent
Cons:
- Definitely the worst thing in this home server is the GPU cooler
So, after every thing is built I start making changes.
- I’ve turned of the GPU cooler, this is not a very smart idea but after I measure temperatures, in speedfan, with fan and without fan, differences were not very different.
- Since I’ve turned off the cooler I bought a 120mm very silent fun from Noctua and installed on the side. This way I’m able to cool CPU and a GPU.
- Very soon I will buy a silent GPU cooler to replace that “thing”
So my current values of temperatures, on idle, are:
| Ambient | 37ºC |
| Remote 1 | 49ºC |
| Remote 2 | 47ºC |
| HD0 | 38ºC |
| Core 1 | 8ºC |
| Core 2 | 16ºC |
| Core 3 | 8ºC |
| Core 4 | 16ºC |
My opinion, is that, if you have time a patience you can build a better server that those sold out there…