Archiv der Kategorie: Ubuntu

The best Desktop Distribution in the world (IMHO).

What do I want from my personal NAS

In this post I would like to gather some personal requirements for a NAS System I am going to build.

Right now, I am in the process of ripping all my CDs (around 950 unique releases – More than half of it is already finished). The target is to store all these releases on a personal NAS with the ability to stream those to my stereo. For this I have already selected minimserver as the UPNP-Server. This server has the requirement of a JDK to let it run. Therefore the NAS I am going to build must have the ability to run JAVA.

Since I am already using Linux quite heavily I do not like to let FreeNAS or NAS4Free run on this NAS, also I am very interested in the underlying File System (ZFS) and/or FreeBSD.

Since Linux offers a “similar” File System (btrfs) I would like to use this one for the NAS.

The services which I would like to run on the NAS are then the following:

There some other options, which would be nice, but are not as “necessary”. There is e.g. Ajenti, which provides a nice WebGUI for the administration of the NAS, but this does not really correspond to the way Arch Linux works 😉 A possibility would be to use e.g. CentOS or
Ubuntu as a distro, but I am unsure, if this is really going to work out, just for a nice GUI????

The above mentioned requirements are not really tough for todays hardware and therefor I would like to stick to the Stack provided in the nas-portal forum (see here).

Since I am going to use a filesystem, which seems to be picky about power outages, I am in need of a UPS, and I am currently thinking about this one.

So I am going to explain some more interesting stuff about the tagging of my FLACs for the minimserver and about the used tool (discogstagger) in some future posts. Stay seated, so that you can see how an absolute Hardware Noob tries to build his own NAS 😉

NFS using Linux Ubuntu Feisty Fawn

Hello,
I just upgraded (basically I installed totally from scratch) my machine to Ubuntu Feisty Fawn. I am working at home with NFS all the time. The process of mounting was pretty slow after the upgrade. Therefor I read a couple of articles on the web and figured, that you have to install portmap on your client machine as well. Now everthing is working.

TracCC

I have now updated the TracCC plugin to Trac 0.11dev. You can download the egg-file here.
I have already put the corresponding patches into the ticket system of the original trac project at oss.werkbold.de, take a look at ticket #25.

More on B-Ubuntu

Today, I decided to restructure the Trac / SVN Environment on my test-server, to support multiple projects in the same SVN-Repository as well as multiple projects with only one CGI/FastCGI/ModPython call to trac. There is a description for the latter in the Trac-Wiki, so this was easy. The same is also possible for FastCGI as well as ModPython.
Now I have to think about a multiple project support in my SVN-Repository.
I will report back, as soon as I have a solution to this 🙂

More on the Continuous Integration/Development Stack on Ubuntu

In the last post, I have written about the installation of the Ubuntu Continuous Integration/Development Stack. I have installed all of the applications and now I have some more notes on this. There are quite some additions to the originally installed stack, as well as some further descriptions, on how to install the whole stack:
I added ANT-Contrib as well as JUnit to the ANT installation:


http://ant-contrib.sourceforge.net/
wget http://prdownloads.sourceforge.net/ant-contrib/ant-contrib
   -1.0b3-bin.tar.gz?download
tar xvzf ant-contrib-1.0b3-bin.tar.gz
cd ant-contrib-1.0b3
cp ant-contrib-1.0b3.jar /usr/share/ant/lib/

wget http://prdownloads.sourceforge.net/junit/junit4.1.zip?download
unzip junit4.1.zip
cd junit4.1
cp junit-4.1.jar /usr/share/ant/lib

For testing purposes there is a need for a sample project. Therefor I downloaded a project from the Apache Software Foundation and imported it into the SVN Repository.


wget http://apache.mirroring.de/jakarta/commons/math/source
/commons-math-1.1-src.zip
unzip commons-math-1.1-src.zip
mv commons-math-1.1-src commons-math
cd commons-math
mkdir trunk
mv * trunk
mkdir tags
mkdir branches

svn import /home/mmay/projects/commons-math 
   file:///var/svn/sample/ -m "initial import"

You can have a look at the SVN trunk via the Web-Interface:
http://HOSTNAME/svn/sample/

Finally I wanted to use the full CruiseControl functionality, therefor some more configurations where needed. First of all the file /etc/apache2/workers.properties has to be created with the following content (btw, we are using mod_jk and not mod_jk2).


#
# workers.properties 
#

# In Unix, we use forward slashes:
ps=/

# list the workers by name

worker.list=ajp13_worker

# ------------------------
# First tomcat server
# ------------------------
worker.tomcat1.port=8009
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13

To use this worker, the file jk.conf (directory: /etc/apache2/conf.d/) has to be configured:


### MOD_JK Conf
JkWorkersFile   /etc/apache2/workers.properties

# The location where mod_jk is going to place its log file
JkLogFile       /var/log/apache2/mod_jk.log

# The log level:
# - info log will contain standard mod_jk activity (default).
# - warn log will contain non fatal error reports.
# - error log will contain also error reports.
# - debug log will contain all information on mod_jk activity
# - trace log will contain all tracing information on mod_jk
#   activity
JkLogLevel      info


# Assign specific URLs to Tomcat. In general the structure of a
# JkMount directive is: JkMount [URL prefix] [Worker name]

# send all requests ending in .jsp to ajp13_worker
JkMount /*.jsp ajp13_worker
# send all requests ending /servlet to ajp13_worker
JkMount /*/servlet/ ajp13_worker

## Cruisecontrol
JkMount /cruisecontrol/* ajp13_worker

# JkUnmount directive acts as an opposite to JkMount and 
# blocks access to a particular URL. 
# The purpose is to be able to filter out the
# particular content types from mounted context.

# do not send requests ending with .gif to ajp13_worker
#JkUnMount /servlet/*.gif ajp13_worker

To get everthing right, some permissions have to be set as well. First some changes to the tomcat policies (create a file /etc/tomcat5/policy.d/15cruisecontrol.policy) with the following content:


grant codeBase "file:///usr/share/tomcat5/webapps/cruisecontrol/-" {
  permission java.security.AllPermission;  
};

After this the permissions for the cache directory (can be configured in the web.xml of cruisecontrol) have to be set correctly. This means, that the user tomcat5 should be the owner of the directory (/var/cache/cruisecontrol).

Now we are done, and can enjoy using the stack. Await some more improvements to trac as well as some other niceties.

Ubuntu Continuous Integration / Development Stack (Ubuntu Server, CruiseControl, Subversion, Trac)

I already told you in my last post, that I am currently looking at Buildix, a continuous integration/development stack build ontop of Knoppix. This is a pretty nice distro derivate. The thing is, that I have already a couple of other applications running on my Ubuntu Server and wanted to have something similar on this machine.
After a couple of hours, I figured out, that most of the components in Buildix are already available as Ubuntu Packages, therefore I went ahead and installed all these tools on my server.
In the Buildix-Environment you can also find some tools from Thougthworks (like the UserManager) as well as some nice scripts to e.g. create new projects very easily. Some of these tools are pretty nice and make the life of the administrator of this machine easier. I would like to point out the script for the creation of new projects. In a later post I will probably point out on how to transfer these scripts.
In the following, there is a short description, on how to install this stack. In most of the steps, there are only the packages, you have to install, mentioned.

1. JDK (1.5.0_08)
Ubuntu Package:
sun-java5-jdk
2. ANT (1.6.5-6)
Ubuntu Packages:
ant
ant-doc
ant-optional

3. Tomcat (5.0.30)
Ubuntu Package:
tomcat5

4. Apache HTTP (2.0.55)
Ubuntu Packages:
apache2
apache2-common
apache2-doc
apache2-utils
libapache2-mod-jk
libapache-mod-jk-doc

5. Subversion (1.3.2)
Ubuntu Packages:
subversion
subversion-tools
subversion-helper-scripts (0.5-2)
libapache2-svn
db4.3-util

After the installation, you have to create a Subversion Repository:
http://www.howtoforge.com/debian_subversion_websvn


    mkdir /var/svn 
    mkdir /var/svn/sample
    svnadmin create /var/svn/sample

6. Trac (0.9.6)
trac
enscript
libapache2-mod-python
python-docutils

After the installation of trac the Trac Environment has to be created:


mkdir /var/trac
trac-admin /var/trac/sample initenv Sample sqlite:db/trac.db /var/svn/sample 
   /usr/share/trac/templates

This will create a trac project named Sample in the directory /var/trac/sample and using an SQLite DB and the subversion repository in
/var/svn/sample and the templates in the trac default directory.
After this you will get an output from the system:Project environment for ‚Sample‘ created.
You may now configure the environment by editing the file:
/var/trac/sample/conf/trac.ini
If you’d like to take this new project environment for a test drive,
try running the Trac standalone web server `tracd`:
tracd –port 8000 /var/trac/sample
Then point your browser to http://localhost:8000/sample.
There you can also browse the documentation for your installed
version of Trac, including information on further setup (such as
deploying Trac to a real web server).
The latest documentation can also always be found on the project
website:
http://projects.edgewall.com/trac/
Congratulations!

After this, you can try your installation with the tracd (like stated in the message above). But since I wanted to use the apache2 server
I have had to do some more stuff:


    /var # chown -R www-data trac
    /usr/lib/cgi-bin # ln -s /usr/share/trac/cgi-bin/trac.cgi trac.cgi
    /var/trac/sample/conf # htpasswd -c trac.htpasswd cruise

To enable the trac-configuration in Apache, you have to create a new file in the directory
/etc/apache2/sites-available. I named this file trac.
The following configuration file (trac) works with mod_python.


	Alias /trac "/usr/share/trac/htdocs"	
	
		Options Indexes MultiViews 
		AllowOverride None
		Order allow,deny
		Allow from all
	

	# Hack to get cruisecontrol shot the build log.xml file
	RedirectMatch ^/var/spool/cruisecontrol/(.*) /cruisecontrol/$1

	
		Dav svn
		SVNParentPath /var/svn

		AuthType Basic
		AuthName "SVN Repositories"
		AuthUserFile /etc/apache2/dav_svn.passwd
#	      AuthzSVNAccessFile /etc/apache2/dav_svn.authz

		
			Require valid-user
		
	

	# Trac needs to know where the db is located	
	 #set up Trac handling      
        	SetHandler mod_python    
     		PythonHandler trac.web.modpython_frontend    
     		PythonOption TracEnvParentDir /var/trac    
     		PythonOption TracUriRoot /projects    
		SetEnv PYTHON_EGG_CACHE /var/cache/python 
	

	
		AuthType Basic
		AuthName "Trac"
		AuthUserFile /var/trac/trac.htpasswd
		Require valid-user
	

Because Apache2 will seg fault on my machine (I believe due to some dependency problems with BerkleyDB or so) my current
configuration is using the CGI-mechanism. Therefor you have to exchange the last part of the above configuration.


	# Trac needs to know where the db is located
	
	ScriptAlias /projects/sample /usr/share/trac/cgi-bin/trac.cgi
	
		SetEnv TRAC_ENV "/var/trac/sample"
	

	
		AuthType Basic
		AuthName "Buildix Trac"
		AuthUserFile /var/trac/sample/conf/trac.htpasswd
		Require valid-user
	

This is doing the job. Not quite as fast as with the mod_python, but it works 🙂 After editing this file, it should be enabled throught the command a2ensite trac.

7. Cruisecontrol (2.5.2)
For Cruisecontrol you can use an existing Debian package at:

http://buildix.thoughtworks.com/download/cruisecontrol_2.5-2.deb

To get CC working with Tomcat5, you have to create a link for the webapp.


ln -s /usr/share/cruisecontrol/webapps/cruisecontrol 
   /var/lib/tomcat5/webapps/cruisecontrol

If this does not work, then copy the directory.

8. Integration Trac — CruiseControl
Get the Plugin at https://oss.werkbold.de/trac-cc/
Ubuntu packages:
libixml2
python-libxml2
python-libxslt1

Add CC-Section to trac.ini:
https://oss.werkbold.de/trac-cc/wiki/CruiseControlSection

9. Trac Plugins
I found some Plugins for Trac very useful. You have to install EZ-Setup for installing some of them:
http://peak.telecommunity.com/dist/ez_setup.py
Install it with python ez_setup.py.

One of the most useful Plugins is the WebAdmin Plugin. This Plugin will be included in newer versions of trac, but for
the current version (0.9.6) you still have to install it manually
http://trac.edgewall.org/wiki/WebAdmin
Download the *.egg.zip, rename it into .egg and call easy_install *.egg, then the plugin is installed for all projects.

An extension of this plugin is the WebAdminUserPlugin:
http://trac-hacks.org/wiki/WebAdminUsersPlugin
Just unzip the zip-file and then call python setup.py install
this installs the plugin globally for all projects

I installed some other plugins, you can find most of them on http://trac-hacks.org. Take a look at the GanttChart Plugin.
TODOs:
There are still some open points in this description. Like already stated there is a script to create new projects in the buildix-Distro.
I would like to include this into my server as well. Also, I am looking forward for the version 0.11 of trac, since there are some nice
new features included there.
Also I am still missing some project management features (like time and estimates in the trac tickets), which are already added in future
version of trac.
Another idea would be, to create a new distro based on Ubuntu (possibly called B-Ubuntu) using the Reconstructor Toolchain. If you are interested in this, please write me an email, and possibly we can create something like this.

QEMU and Ubuntu

I just downloaded the ISO Image of Buildix, which is a Knoppix LiveCD with some nice tools for the Build and configuration management. Due to the fact, that I am already running Linux on my Laptop and just would like to browse through some files in this BuildIx, I decided to use qemu for testing out this distro.

First of all, let me tell you, that I was not able to install the qemu acceleration package on my laptop with Ubuntu Edgy Eft 🙁 But the ISO Image starts just fine with the command line

sudo qemu -boot d -m 256 -cdrom  ./buildix-1.1.iso -no-kqemu

In this command line the qemu loads a cdrom image called buildix-1.1.iso with the no-kqemu option, since this is not available on my system. Furthermore, I have given 256M of Memory to this emulation (yeah, it is slow, but it is enough for testing purposes).

With this, it is not possible to use a network connection to the host system, to for example exchange files between the two systems. Therefor I installed the tun/tap stuff (sudo apt-get install uml-utilities). This way is explaned in the FAQ of qemu.

After making the qemu-tab script executable, and call it with

sudo ./qemu-tap -boot d -m 256 -cdrom  ./buildix-1.1.iso -no-kqemu
a new tap-interface is created on the host-system (Ubuntu Linux) with the IP 172.20.0.1. In the guest system I see an interface eth0 and configured this for the same subnet (with ifconfig eth0 172.20.0.2), and can now ping the host system 🙂

Everything I wanted works now in this environment. Pretty slick.

LDAP up and running

So, today I defined my LDAP schema, so that I can use LDAP together with evolution. The site OnLamp was quite helpful for this 🙂 Basically I can now write Contacts into the LDAP Directory. Now I am going to try to add the same functionality for egroupware. One of the things I already found out, is, that nearly every application seems to use another schema.

I hope to find a way to match the entries from these schemes 🙂