Total Pageviews

Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Saturday, January 25, 2014

How to install Couch DB 1.5 on Ubuntu

A recent task I had to do on my home Ubuntu Linux box running 12.04. LTS was to install CouchDB. I needed it because I wanted to use ACRA as remote error reporting tool for Android Apps. Acra is completely open source (hosted on GitHub) and an incredible cool tool started by Kevin Gaudin.

I used to try it out using Iris Couch but it turns out for me that Iris Couch using the free of charge account is painful slow. Thus I decided to host my own CouchDB at home.

The Ubuntu repositories doesn't host an up to date version of Couch DB. I tried it using apt-get and got CouchDB version 1.0.1. This was not a viable choice, because I wanted to use the replicate function of CouchDB which only is available on version higher than 1.2.

I found a pretty good step by step guide in the Apache CouchDB wiki.
To sum it up:

I installed it by compiling it from source

using the following steps.

  1. Download CouchDB 1.5 sources
  2. Create a user and a group with name 'couchdb'. This is very important. Don't compile and install it with user 'root'. If you do it with root, CouchDB will not start nor write any error messages to any log file, because CouchDB will start under user 'couchdb' but all installed files and folders don't allow read or write access for any other user than 'root'. If you have compiled and installed it with user 'root' you have to adjust the permissions and owner rights of various files and folders by yourself. I have to admit that I did it with user 'root' the first time and it took me two hours to search for the causes and correct everything. So be warned ;-)
  3. Install at least the following packages.
  4.  sudo apt-get install -y g++  
     sudo apt-get install -y erlang-dev erlang-manpages erlang-base-hipe erlang-eunit erlang-nox erlang-xmerl erlang-inets  
     sudo apt-get install -y libmozjs185-dev libicu-dev libcurl4-gnutls-dev libtool  
    
  5. Extract and compile CouchDB using default installation directory /usr/local. You can change it by using a different --prefix when calling configure. Check manual.
  6.  cd /tmp && tar xvzf apache-couchdb-1.5.0.tar.gz  
     cd apache-couchdb-*  
     ./configure && make  
    
  7. Install CouchDB. CouchDB installs into /usr/local
  8.  sudo make install  
    
  9. Sometimes it's necessary to remove old stuff from ubuntu packages. This was not necessary in my case. But you can do the following:
  10.  sudo rm /etc/logrotate.d/couchdb /etc/init.d/couchdb  
    
  11. Install init scripts and logrotate
  12.  sudo ln -s /usr/local/etc/logrotate.d/couchdb /etc/logrotate.d/couchdb  
     sudo ln -s /usr/local/etc/init.d/couchdb /etc/init.d  
     sudo update-rc.d couchdb defaults  
    
  13. Verify that CouchDB is running
  14.  curl http://127.0.0.1:5984/  
    
    It should give you an output like this:
     {"couchdb":"Welcome","uuid":"5a23983ac768251e1c8d413bb52e67b5","version":"1.5.0","vendor":{"version":"1.5.0","name":"The Apache Software Foundation"}}  
    
  15. With this setup, CouchDB only listens on localhost (127.0.0.1). If you want CouchDB to listen on all interfaces and access it externally you have to configure it in /usr/local/etc/couchdb/local.ini
    Just look for the [httpd] section and uncomment the line starting with 'bind_address' and replace 127.0.0.1 with 0.0.0.0
  16.  [httpd]  
     ;port = 5984  
     bind_address = 0.0.0.0  
    
  17. Now restart CouchDB and you are done.
  18.  /etc/init.d/couchdb restart  
    
You are also able to install a CouchDB version built by source alongside the default Ubuntu package. Check out the step by step guide mentioned above to look how this is being achieved.

Monday, May 20, 2013

Install Android Tools on Ubuntu 12.04.

Check this blog when you have to install Android SDK on Ubuntu 12.04. It simply works!

Thursday, January 03, 2013

Howto install icinga with the new PHP based web interface on Ubuntu 12.04

I had a hard time finding good articles about how to install icinga with the new web based PHP interface on Ubuntu 12.04.
I didn't want to grab the sources and compile it. Not that I am not able to do that, but in my opinion it should be an easier way to install it. We are living in 2013 and not in the last century ...
Anyway, to make a long story short I found a very good step by step guide on askubuntu which worked for me exactly the way it was described.
Kudos!

Sunday, December 30, 2012

Friday, December 28, 2012

Pure-FTP Daemon unter Ubuntu Linux installieren und konfigurieren

Und noch eine Perle der Installationsdokumentationen zum Aufsetzen eines FTP Servers (hier Pure FTP unter Ubuntu/Debian). Unter diesem Link findet sich eine schnelle und wie ich finde gut geschriebene, verständliche Anleitung zum Aufsetzen eines FTP Servers.

Mailserver für einen Homeserver unter Linux einrichten

Wer schon immer mal einen Mailserver auf seinem eigenen Server zu Hause betreiben möchte (Stichwort DynDNS), der sollte sich mal diese wirklich gute Anleitung durchlesen.
Die dort beschriebenen Komponenten

  • Postfix
  • Dovecot
  • Fetchmail
  • Sieve

harmonieren sehr gut zusammen.
Generell ist das komplette Wiki dort sehr gut aufgebaut und enthält einige sehr nützliche und tolle Anleitungen.

Saturday, December 22, 2012

Remove all unused Ubuntu Kernel images, headers and modules

Seeing that my linux box is running low on free space I decided to remove all unused Linux kernel images on my Ubuntu 10.04 system.
For some unknown reason Ubuntu Tweak refused to install properly so I decided to go a different way and used the command from this blog article.

The command mentioned in the blog is

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge  


If you don't understand what this command does I recommend to dig into the topic. I must admit it is a little bit complex, but the command is working well.

Use it at your own risk!

Now my system is cleaned up and still boots the correct and latest kernel. All other kernel images, headers and modules are completely removed.

Wednesday, December 07, 2011

Wie man die Größe des Systemfonts in Ubuntu 11.10 ändern kann

Bei Ubuntu 11.10 ist es leider nicht mehr so einfach möglich, den System Font bzw. seine Größe zu ändern.

Auf meinem Netbook ist der Font für mich viel zu groß.

Diese Anleitung zeigt, wie man den Font ändern kann. Ist mir ein Rätsel, warum Ubuntu das nicht standardmäßig in den Systemeinstellungen möglich macht.

Thursday, November 12, 2009

Fixing hibernation problem under Ubuntu 9.10

Recently I upgraded my Ubuntu Linux 9.04 to the latest Ubuntu 9.10 on my Acer Aspire 5652 laptop. So far so good. The upgrade went smooth and without any problems and after 40 minutes I was able to take a look at the latest Ubuntu release.

Soon I found out that neither suspend nor hibernate were working. After resuming I got a blank black screen and I was not able to fix this problem with infos from the ubuntu forums.
I decided to install a fresh Ubuntu 9.10 on my laptop because I wanted to benefit from ext4, a better startup time and the newest grub.
After installation succeeded I really was impressed by the startup time. Even after I installed all the programs I used on Ubuntu 9.04 the startup time was nearly twice as fast. But one problem was still there: Neither suspend nor hibernate did work.

One of the answers in the forum was to wait for a patch but this is no option for me because I need at least hibernation on my laptop.

So I found this link to be very useful: http://www.ubuntugeek.com/fix-for-suspend-and-hibernation-problem-for-laptops.html

It shows how to use the "Userspace Software Suspend" program to fix hibernate or suspend problems.

As root I edited the file
/etc/pm/config.d/00sleep_module

and changed the line
SLEEP_MODULE="kernel"
into
SLEEP_MODULE=”uswsusp”

and all of a sudden hibernation is working again. I still cannot use suspend but for now I can live with it.

UPDATE: 2009-11-29
With the latest Ubuntu updates my hibernation and suspend problems are gone, so I switched back to kernel suspend mode.

Monday, June 01, 2009

Switching my home Linux server from Knoppix to Ubuntu

My Linux box at home crashed during a distribution upgrade of my Knoppix version. I always had troubles in doing a distribution upgrade of my Knoppix server. So I decided to switch to Ubuntu 9.04.
The server is back since yesterday but not all the services are running.
I hope I will not regret this decision.

Monday, April 27, 2009

Encoding mp3 under Ubuntu Linux

I recently ran into a problem encoding some audio files under my Ubuntu Linux 8.10. There was no way I could bring the "Audio CD Extractor" or "Rhythmbox Music Player" to encode my CDs to mp3.
It took me some time to figure out what the problem was. There should be at least three packages installed, to be able to encode audio files to mp3:

lame
gstreamer0.10-plugins-ugly
gstreamer0.10-plugins-ugly-multiverse

My Ubuntu 8.10 did not have the last one installed. So I did a quick

"apt-get install gstreamer0.10-plugins-ugly-multiverse"

and the problem was solved.
The last thing I did was to create and activate an mp3 profile in the preferences dialog of the "Audio CD Creator"

Wednesday, August 13, 2008

Do you need Subversion 1.5 on your Ubuntu box?

Ubuntu 8.04 does not officially support Subversion 1.5. So what if you want to use it? The solution is simple: Go and check out the website: https://launchpad.net/~clazzes.org/+archive and add the listed two lines to your apt sources.list.
It simply works!

Friday, June 13, 2008

Ever wanted to know the exact name of your installed Linux distribution?

Type this command into shell and find out what Linux distro you are using:
cat /etc/issue
It gives you something like this:
Ubuntu 8.04.1 \n \l
If you don't know the kernel you are running with try this one:
uname -a
It gives you something like this:
Linux machinename 2.6.24-19-generic #1 SMP Wed Jun 4 16:35:01 UTC 2008 i686 GNU/Linux

Saturday, October 27, 2007

WLAN on Ubuntu Gutsy Gibbon (7.10) with IPW3945 and WPA encryption

I updated from Feisty to Gutsy yesterday and had massive problems making an internet connection via wlan. My Acer Aspire 5650 has an Intel IPW3945 WLAN card and the kernel modules were loaded successfully without any errors. The restricted WLAN driver was listed as "in use" in Ubuntu's restriced driver manager, so I expected to have a working driver configuration.
Somehow I assumed it had something to do with the network manager. So I completely removed the Network Manager via
apt-get remove network-manager
and configured my wlan interface (using instructions from a german ubuntu forum) manually editing /etc/network/interfaces:
iface eth1 inet dhcp
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
auto eth1
My wpa_supplicant.conf looks something like this:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1

network={
        ssid="YourWlanSSID"
#        scan_ssid=1
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=TKIP
        group=TKIP
        psk=YourPSK
}
Note: I am using WPA encryption for my WLAN.
You can test your wpa_supplicant configuration using the following command:
sudo wpa_supplicant -i eth1 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -d
Option -i defines the network interface name of your WLAN card. Option -D declares the driver to use and option -c defines the wpa_supplicant configuration file.
After this I restarted my system and I got a working wlan connection to my Access Point.

Monday, June 25, 2007

Gnome Keyring without password

Everytime I login into my Ubuntu (Feisty) system the Gnome Keyring Manager asks for the password I already provided when logging into the system (via gdm).
This can be skipped by doing the following steps:
  1. apt-get install libpam-keyring
  2. Edit file /etc/pam.d/gdm and insert the following snippet

@include common-pamkeyring

Note: This does not work if you have enabled automatic or timed login!