Montag, 25. Juni 2012

tomcat7 on Ubuntu 12.04 - access rights need change

After setting up tomcat, I deployed openam. The  initial configuration screen gave me "Configurator does not have write access to /usr/share/tomcat". It turns out that the user tomcat7 (who runs tomcat) has his home in /usr/share/tomcat7 (have a look at /etc/passwd). For some reason (bug?), this directory is owned by root, which made it unwritable for tomcat7. The fix is an easy (as root)

chown -R tomcat7:tomcat7 /usr/share/tomcat7

Donnerstag, 14. Juni 2012

Debian: Copy package selection to another system

The other day I moved to new desktop hardware and wanted to have all the packages that I had on my old desktop there. I made a package list of both systems with dpkg -l, put them together and then extracted the ones only present on one system with uniq. Then I looped over that list with for p in `cat packages.txt`;do apt-get install $p;done . Well, that worked, but it was rather tedious. I finally stumbled upon this mailling list post, which presented a much easier solution:

"
 To make a local copy of the package selection states: 

     $ dpkg --get-selections "*" >myselections   # or use \*

"*" makes myselections include package entries for "purge" too. 

You transfer this file to another computer, and install it there with: 

     # apt-get update
     # dpkg --set-selections <myselections
     # apt-get -u dselect-upgrade

"

Works like a charm!