Regular Expressions’ Wizard
If you feel not really safe with regular expressions and your brain does not work like a automaton, try the following link: txt2re
Java 7 for Ubuntu
Ubuntu announced to discontinue packaging of Sun/Oracle's Java for Ubuntu, because Oracle changed the licensing.
Please be careful with upgrades on these packages, since it may drop your Java installation on the system, not only the browser plug-in.
So I followed these steps to establish Java 7 support on my Ubuntu 10.04 LTS:
- Download
jdk-7*-linux-*.tar.gzfrom Oracle - Get privileges:
sudo bash - Extract the archive:
tar -C /usr/lib/jvm -zxf jdk-7*-linux-*.tar.gz - Link to generic name java-7-oracle:
cd /usr/lib/jvm && ln -snf jdk1.7* java-7-oracle - Register Java commands using
update-alternatives:register-alternatives.sh - If you have a 32Bit-Linux, changed the downloaded .sh-script appropriately, i.e. replace amd64 by i386:
sed -i -e 's/amd64/i386/g' register-alternatives.sh - Prepare
/usr/lib/jvm/.java-7-oracle.jinfo. - Mind the name, it begins with a dot.
- If you have a 32Bit-Linux, change the downloaded .jinfo-file appropriately, i.e. replace amd64 by i386:
sed -i -e 's/amd64/i386/g' /usr/lib/jvm/.java-7-oracle.jinfo - Switch Java release:
update-java-alternatives --set java-7-oracle
Check the Installation
- On the command line you can check the Java version by simply calling:
java -version - In the browser, just follow testjava.jsp.
- In a Firefox you can also see a related Java entry in the about:plugins.
Updates
Since the default Java release is no longer bound to the Ubuntu packaging, you have to take care of updates on your own.
Choose some channel (e.g. heise security, Oracle Security Alerts) to at least watch out for security-related updates.
An update itself should be fairly easy, repeat the first steps of the installation:
- Download
jdk-7*-linux-*.tar.gzfrom Oracle - Get privileges:
sudo bash - Extract the archive:
tar -C /usr/lib/jvm -zxf $(ls -t jdk-7*-linux-x64.tar.gz | head -1)
- Link to generic name java-7-oracle:
cd /usr/lib/jvm && ln -snf $(ls -td jdk1.7* | head -1) java-7-oracle
SFTP using ChrootDirectory
In newer releases of OpenSSH it's almost as easy as with ProFTPD's DefaultRoot to restrict a user to the home folder. You no longer need to setup a chroot-Environment including copies/links to essential libraries etc.
In Debian/Ubuntu just apply a few changes to /etc/ssh/sshd_config:
- Create a group (e.g. by
addgroup restricted), that will contain the users subject to the restriction to their home folders. - Change the following line for the sftp protocol:
Subsystem sftp internal-sftp - Add a section that matches the group and adds restriction to sftp in the home folder:
Match group restricted
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
The permissions on the home folder path are critical, don't grant to much permissions to other (non-root) users and watch out for corresponding messages in /var/log/auth.log, if sftp does not work.
Android 2.3.7 on Milestone
It was just about time to update my Motorola Milestone to the latest CynogenMod at https://github.com/nadlabak/android/downloads, providing Android 2.3.7.
The steps I applied included
- the download of update-cm-7.1.0.7-Milestone-KANG-signed.zip from https://github.com/nadlabak/android/downloads,
- the transfer of that zip file to OpenRecovery/updates using USB connection,
- the reboot the device to G.O.T. OpenRecovery,
- the update using the zip file and
- the cleanup of the caches using the 2 options in OpenRecovery.
policyd-weight IN_IPv6_RBL=4.25
Watch out for IN_IPv6_RBL scores in your policyd-weight logs.
If you see regular hits, you probably have to either upgrade your policyd-weight or disable rbl.ipv6world.net manually.
Here is a brief howto for Debian-based installations:
- Generate a configuration file, if you are missing one:
policyd-weight defaults > /etc/policyd-weight.conf - Put a comment before rbl.ipv6world.net:
...
## DNSBL settings
@dnsbl_score = (
# HOST, HIT SCORE, MISS SCORE, LOG NAME
'pbl.spamhaus.org', 3.25, 0, 'DYN_PBL_SPAMHAUS',
'sbl-xbl.spamhaus.org', 4.35, -1.5, 'SBL_XBL_SPAMHAUS',
'bl.spamcop.net', 3.75, -1.5, 'SPAMCOP',
'dnsbl.njabl.org', 4.25, -1.5, 'BL_NJABL',
'ix.dnsbl.manitu.net', 4.35, 0, 'IX_MANITU',
# 'rbl.ipv6-world.net', 4.25, 0, 'IPv6_RBL'
);
... - Restart policyd-weight:
/etc/init.d/policyd-weight restart