Hi girls and guys,
today i want to show you something which a friend of mine
Reiner Herrmann pointed out for me.
There are two main reasons why you want to put your configuration under version control. You can document what you are changing and when you are changing files like ~/.bashrc or ~/.vimrc for example. At least those are the files which changes quite often on my machines. And the second reason is to simply providing an easy way to restore your configuration when things became messed up.
First make sure you have installed git. This should be in the main repository of your distribution. For Debian simply install it using apt-get install git.
I am now going to show you how you can put your ~/.bashrc under version control
using git.
If you are not familiar with git simply go to the website. You find all documentation
you will ever need on this website.
Let's assume for now i am under /home/matthias. Create a Directory ~/.local_gitrc
mkdir ~/.local_gitrc
and create the Git Repository by navigating in this particular directory you've just created. Here you can initialize your git Repository by typing:
git init
That's all. Your Git Repository have been initialized. Next you copy the original ~./bashrc to this
directory
cp ~/.bashrc bashrc
and add this to your git directory blob
git add bashrc
Make your first commit.
git commit -m " bashrc: initial commit"
Now as the final step link the Script in Your Git Repository to it's original location.
ln -sf /home/mattias/.local_gitrc/bashrc /home/matthias/.bashrc
There have been a lot of suggestions around the internet that you should be able to do this with the
/etc directory too. The result is a a script called etckeeper.
Thats it.
Freunde
Donnerstag, 24. März 2011
Mittwoch, 9. März 2011
Mein Damen und Herren ich präsentiere
Das Linux Sheet das über die 8 Monate Lpic1/2 entstanden ist.
Das Sheet ist natürlich noch lange nicht fertig. Verbesserte Versionen folgen demnächst, da es als erste Version die offiziell im Web stehen darf trotzdem noch eine Menge Fehler enthält und einiger Ergänzungen bedarf. Ich hoffe dass es irgendjemanden etwas nützt.
Übersetzung in anderen Sprachen erwünscht.
PLease translate into other languages.
Das Sheet ist natürlich noch lange nicht fertig. Verbesserte Versionen folgen demnächst, da es als erste Version die offiziell im Web stehen darf trotzdem noch eine Menge Fehler enthält und einiger Ergänzungen bedarf. Ich hoffe dass es irgendjemanden etwas nützt.
Übersetzung in anderen Sprachen erwünscht.
PLease translate into other languages.
Mittwoch, 2. März 2011
Setting up XWiki on Opensuse with mysql and tomcat
Hi girls and guys,
After spending hours with my setup of XWiki on Opensuse 11.3 i finally managed to fulfill this task.
Since it is pretty easy to install but has a lot of edges to deal with, i will detailed instruct you how to get this wiki up and running.
I only describe how to do this on opensuse. If you are looking for Debian just go ahead reading here
(1) First install these packages using zypper:
zypper ref && zypper in mysql-community-server mysql-community-server-client tomcat6, tomcat6-el-1_0-api tomcat6-jsp-2_1-api tomcat6-lib tomcat6-servlet-2_5-api
jakarta-commons-collections-tomcat5 mysql-connector-java java-1_6_0-sun
(2) Now copy your XWiki-enterprise-web-A.x.n.war to /srv/tomcat/xwiki.war and start the tomcat6 Server by issuing the following:
service tomcat6 start

(3) After waiting a couple of seconds this command unpacks your war archive and you should end up having a directory xwiki under /srv/tomcat/
Stop the tomcat Server by doing a
service tomcat6 stop
(4) We need to do some changes to the particular init scripts. First edit the /etc/init.d/tomcat6 Script and put
TOMCAT6_SECURITY=no
under the line with
PATH="/bin:/sbin"
and save the file. Next is the /etc/init.d/mysql. Find the line in the case constructor that says
echo -n "Starting service MySQL "
and add the following option line
--max_allowed_packet=32M \
!!!The \ in the end of the line is important here!!!
(6) Next create the database for your xwiki and grant the permissions by executing the follwoing
service mysql start && mysql_secure_installation
(this will finalize the installation of mysql for opensuse)
mysql -u root -p -e "create database xwiki"
(this will create the database xwiki)
mysql -u root -p -e "grant all privileges on xwiki.* to xwiki@127.0.0.1 identified by 'xwiki'"
(this will grant the permissions to Xwiki)
(7) Copy the mysql connector library from /usr/share/java/mysql-connector-java-5.1.6.jar to
/srv/tomcat6/webapps/xwiki/WEB-INF/lib/. A Symbolic link may also work. But i didn't try this out.
(8) You must now edit the /srv/tomcat/webapps/xwiki/WEB-INF/hibernate.cfg.xml file. And
comment out other database configurations you don't need. Especially the one hsqldb which is the line that is not comment out by default. Instead uncomment out the mysql section.
(9) Now you can restart the servers by issuing the following commands:
service mysql restart && service tomcat6 start
(10) You should add the servicedaemons permanently to avoid starting them manually each time.
chkconfig -a mysql && chkconfig -a tomcat6
The wiki should live on localhost:8080/xwiki. All you have to do now is to apply the xwiki-enterprise-wiki.A.x.n.xar file. But this should be no problem if you followed these steps.
You can get the latest XWiki and further Instructions here:
http://www.xwiki.org/xwiki/bin/view/Main/Download
After spending hours with my setup of XWiki on Opensuse 11.3 i finally managed to fulfill this task.
Since it is pretty easy to install but has a lot of edges to deal with, i will detailed instruct you how to get this wiki up and running.
I only describe how to do this on opensuse. If you are looking for Debian just go ahead reading here
(1) First install these packages using zypper:
zypper ref && zypper in mysql-community-server mysql-community-server-client tomcat6, tomcat6-el-1_0-api tomcat6-jsp-2_1-api tomcat6-lib tomcat6-servlet-2_5-api
jakarta-commons-collections-tomcat5 mysql-connector-java java-1_6_0-sun
(2) Now copy your XWiki-enterprise-web-A.x.n.war to /srv/tomcat/xwiki.war and start the tomcat6 Server by issuing the following:
service tomcat6 start

(3) After waiting a couple of seconds this command unpacks your war archive and you should end up having a directory xwiki under /srv/tomcat/
Stop the tomcat Server by doing a
service tomcat6 stop
(4) We need to do some changes to the particular init scripts. First edit the /etc/init.d/tomcat6 Script and put
TOMCAT6_SECURITY=no
under the line with
PATH="/bin:/sbin"
and save the file. Next is the /etc/init.d/mysql. Find the line in the case constructor that says
echo -n "Starting service MySQL "
and add the following option line
--max_allowed_packet=32M \
!!!The \ in the end of the line is important here!!!
(6) Next create the database for your xwiki and grant the permissions by executing the follwoing
service mysql start && mysql_secure_installation
(this will finalize the installation of mysql for opensuse)
mysql -u root -p -e "create database xwiki"
(this will create the database xwiki)
mysql -u root -p -e "grant all privileges on xwiki.* to xwiki@127.0.0.1 identified by 'xwiki'"
(this will grant the permissions to Xwiki)
(7) Copy the mysql connector library from /usr/share/java/mysql-connector-java-5.1.6.jar to
/srv/tomcat6/webapps/xwiki/WEB-INF/lib/. A Symbolic link may also work. But i didn't try this out.
(8) You must now edit the /srv/tomcat/webapps/xwiki/WEB-INF/hibernate.cfg.xml file. And
comment out other database configurations you don't need. Especially the one hsqldb which is the line that is not comment out by default. Instead uncomment out the mysql section.
(9) Now you can restart the servers by issuing the following commands:
service mysql restart && service tomcat6 start
(10) You should add the servicedaemons permanently to avoid starting them manually each time.
chkconfig -a mysql && chkconfig -a tomcat6
The wiki should live on localhost:8080/xwiki. All you have to do now is to apply the xwiki-enterprise-wiki.A.x.n.xar file. But this should be no problem if you followed these steps.
You can get the latest XWiki and further Instructions here:
http://www.xwiki.org/xwiki/bin/view/Main/Download
Dienstag, 8. Februar 2011
Testing Gnome3

Hi guys and girls.
this time i tried out the upcomming gnome3 desktop for you. Gnome3 will be released if there is nothing standing in the way, in april 2011. First i was really sceptical about gnome3 relasing relatively soon after it was official annunced. You know, will it be the same fail as kde4 was. These kind of thoughts. But than i got really impressed. If you want to make the experience yourself, you are welcome to do so. Just download the iso here and get started.

Gnome3 did not just make a new release with all the new blinking and shining. They really did think about how to make a new dektop experience and how to design new interaction concepts and making things better and more userfriendly.
I would like to describe it this way: Think of a new way to organize and work with the desktop. The desktop no longer stands in the way when you want to work with applications. And applications no longer stands in the way when you want to organize your dektop.
When you click on the upper left side of the scren you can swith from running applications to organizing your desktop. In the activity panel you can now see what applications you are running. You can than move the windows across other virtual desktops which in gnome3 you are able to dynamicly add or remove by moving the mouse to the right side and clicking on the appearing plus or minus buttons.

You can also search for applications and start them right away or you click on the applications right next to the Windowbutton which leads you the gnome menu where you can as usual go through and select the application you
want to start. If you want to switch back to the applications just click of one of the application windows and you can continue working in with this program using a nearly fullsized window.

Your personal preferences can be set by cklicking on your user name on the top left side. you also will find your open chats and incomming messages. Surely this was adopted from ubuntu but has also greatly improved.
One last think to say. Setting up a personal desktop background is not working yet. You must install the xdg-user-dirs using
zypper in xdg-user-dirs
and Place the files in your ~/Pictures directory after logging the user out and in aagain. And sure there are still a lot of bugs and the preview should not be used in a productive environment but i hope most of them will be gone when the final version is out.
Dienstag, 14. Dezember 2010
Running the upcoming kernel in older opensuse releases
in this tutorial I’ll going to show you some tricks which will result in a new usableversion of opensuses 2.6.37-rc5 upcoming kernel for 11.4 in older opensuse releases.
i tried this for the older 11.2 but the newer 11.3 might also work.
First you have to download the kernel-source.src.rpm. Yes you heart me right. You need this one
to unpack with rpm2cpio. Assuming you have save the kernel-source-src.rpm downloaded to
~/src/kernel doing
cd ~/src/kernel
rpm2cpio < kernel-source.src.rpm|cpio -id
and you should be left with the original kernel-source.src.rpm and the linux-2.6.36.tar.bz2,
a lot of patches and special files needed to build the package kernel-source.noarch.rpm but as i assure you we will use this for rebuilding the kernel suitable for installing on opensuse 11.2 or 11.3.
next we're creating the preparation base for patching the kernel source code.
tar xvfj kernel-source.tar.bz2
mkdir patches
mv patches*tar.bz2 patches/
cd patches/
for i in ls *; do tar xvjf $i;done
cd ..
Applying the patches is the next step. You should be able to see the apply-patches script. we will use this to apply all needed patches that ships with suse. The apply-patches script is used to patch the kernel in the correct order rather than doing each patch by hand. however if you ever run into a situation where you have do patch a kernel manualy you can fullfill this task using patch with the following syntax:
patch -d /PATH_TO_KERNEL_SOURCE
But in this case we closely run into trouble, as we dont know which patch have to be applied afer what. So i strongly recommend doing it the following way:
cd linux-2.6.36
../apply-patches ../series.conf ../patches/ i386
You may also use x86_64 instead of i386 here if you have a 64 bit capable system.
Now that we have successfully patched our kernel, we can begin with the actual build procedure.
As user root you should copy the linux-2.36 to /usr/src/linux-2.6.37-rc3-git6 directory and link that directory to /usr/src/linux .
cp -r linux-2.6.36 linux-2.6.37-rc3-git6
rm /usr/src/linux
ln -s /usr/src/linux-2.6.37-rc5 /usr/src/linux
The Suse Linux Kernel supports the /proc/config.gz file which holds the configuration setup for the current running kernel. So it seems to be a wise thing here making a clone copy of the actual existing configuration. So do as user root (after this step i assume you are the user root and have changed to the directory /usr/src/linux)
cd /usr/src/linux
zcat /proc/config.gz > .config
We can continue by doing a
make xconfig

to start the configuration in a graphical user interface. Doing this you have to make sure that you ether have the qt3 development files or the qt4 development files. You can install them if they aren’t already in place by simply using opensuses tools for package management:
zypper in qt3-devel libqt4-devel
Uncheck the boxes "Enable enterprise support facility" since we don't need an enterprise kernel, "Split the kernel in multiple packages" since we want the kernel to be created as kernel-2.6.37-rc5.i386.rpm which can live next to our existing kernel. The Box "Kernel to suit desktop workloads" can also be unchecked but doesnt need to.
Unfortunately configuring the kernel is not an easy thing to do. You should study each option very clearly to understand what each option does and how it interacts with your hardware. It is mostly safe to use the suggested configration and leave the configuration in place as this represents the current configuration and should also work with your new kernel. The settings you might be aware of are:
"General Setup" --> "Local Version append to the kernel release".
Here you can give the Kernel a local Version like Test1 or your initials followed by a number.
In
"Processor Type and features"
you can build a kernel which fits perfectly to your machine. For example if you have a Pentium M Processor you should select Pentium M as Processor Type. You also can disable Xen support if you don't ever need this. Or you can set the timer frequency of the kernels scheduler system to your needs. Also i recommend to enable the kernels cgroup support when ever you see it which is new and really fastens up your system.
Caution setting up a configuration setting for a kernel is not a thing you do in five minutes. You really should take your time to make sure you understand what each configuration setting means even it took you 3 hours or more.
If you are done you can grep a caffe and type the following
make prepare && make modules_prepare && make rpm
This will result in two rpms sitting in /usr/src/packages/rpm/SRPMS and /usr/src/packages/rpm/RPMS/i386. If you don't need the src.rpm in /usr/src/packages/rpm/SRPMS you rather want to use the make target binrpm-pkg, which will result only in the rpm /usr/src/packages/RPMS/i386. It may be helpful for you to look at make help to list all make targets
you can possible get. For example if you want to see whether your kernel name is set property you can use the make kernelrelease target.
If the package has successfully build you can finally install it using the rpm Command utility.
In my Case i need to upgrade my package from a former build and my make kernelrelease results in

linux-2.6.37-rc5-Test4
So i need to use
rpm -Uhv /usr/src/packages/RPMS/i386/kernel-2.6.37-rc5*.rpm
This will also install your kernel next to your default distribution kernel so you can choose which
one you want to boot into during grubs first stage and also you have a fallback if your kernel does
not work or not work as you expected it would.
Unfortunately this kernel rpm does not create and install a proper initial ram-disk you have do this by hand.
cd /boot
mkinitrd -k vmlinuz-2.6.37-rc5-Test4 -i initrd-2.6.37-rc5-Test4
Now you should find at least three new files residing here. The vmlinuz-2.6.37-rc5-Test4 or something with an other version number you may applied to, is the kernel you just created by compiling and installing the kernel. The initrd-2.6.37-rc5-Test4 is the initial ram-disk which you have created in the previous step. And the System.map-2.6.37-rc5-Test4 which is used to map modules before initialize the filesystem you are sitting on. So far all seems fine and by adding these lines to /etc/grub/menu.lst
1 title Kernel-Test
2 root (hd0,0)
3 kernel /vmlinuz-2.6.37-rc5-Test4 root=/dev/system/root resume=/dev/system/swap splash=silent quiet showopts vga=0x314
4 initrd /initrd-2.6.37-rc5-Test4
you can actually run your new kernel by restarting the computer.
Abonnieren
Posts (Atom)