Archive for the ‘tech’ Category
Accelerating with CloudFare
Sunday, January 15th, 2012More about this soon on CatFind.it. For now suffice it to say, that CloudFare is the work of geniusses!
One small thing you will run into when rolling with Varnish as backend:
You need to remove the Cookie CloudFare adds to your site. Use the following code:
#Remove the Google Analytics cookies & Cloudfare Cookie (__cfduid)
if (req.http.cookie) {
set req.http.Cookie = regsuball(req.http.Cookie, "__(utm|cfdui).=[^;]+(; )?", "");
if (req.http.cookie ~ "^ *$") {
remove req.http.cookie;
}
}
If you don't do this, you will run into cache misses …
Ubuntu Sprache mit der Konsole wechseln
Tuesday, January 10th, 2012Mein Bruder hat auf seinem Ubuntu Notebook chinesisch als Hauptsprache installiert. Klar, wir sprechen alle Chinesisch … nicht!
Jetzt hatte er mich gebeten etwas für ihn daran zu machen. Also musste erst Chinesisch durch z.b. Englisch ersetzt werden.
Leider müsste man in der GUI auch erkennen, welche chinesichen Zeichen denn jetzt dafür stehen, dass man die Sprache konfigurieren kann. Ich habe probeweise ein paar angeklickt, es kamen jedoch immer irgendwelche Dialoge mit noch mehr Chinesisch (im wahrsten Sinne des Wortes!).
Nach einer Internetrecherche, dank dieser Seite die Lösung:
-
eine Konsole aufrufen (die erkennt man an dem Konsolen-Icon)
-
sudo nano /etc/default/locale
-
ggf. User-passwort eingeben
-
eintragen:
LANG="en_GB"
LANGUAGE="en_GB:en"
-
speichern (Ctrl + O)
-
schließen (Ctrl + X)
-
System neustarten ( sudo reboot )
Nach dem Neustart sind wichtige Teile des Systems – bspw. die Menüleiste ganz oben – in Englisch. Das sollte es einem ermöglichen auch den Rest umzustellen … falls notwendig.
Andere Teile, bspw. FireFox bleiben allerdings in Chinesisch, und sind daher verteufelt schwer zu bedienen … so muss sich ein Analphabet vorkommen!
Finestra
Wednesday, January 4th, 2012Running Windows 7? For a working Finestra (with correct Z-Order) use Version 1.1.
Version 1.2 messes up the Z-Order, and Version 2.0 and Version 2.1 both crash when hitting Win + Z to display the window overview (known bug). Sometimes the newest version is not the best one :-)
About Finestra
Finestra is a Virtual Desktop Manager for Windows. Freeware, fast switching, graphical indication to which desktop it switches.
Ability to drag windows to other desktops (using Win + Z to show the preview). Also useful for recovering windows which have been moved to outside your monitor by accident (believe me, it happens. Especially when using different monitor setups on notebooks)
Purging with Varnish
Tuesday, January 3rd, 2012For a newbie, it's a bit tricky to understand how to purge old content from Varnish. Here's a description of what works for me:
Add these code snippets to your Varnish configuration file, reload Varnish:
/etc/init.d/varnish reload
This will "install" the PURGE command. Modify the ACL (access control list) as appropriate. Mine is:
acl purge {
"localhost";
"127.0.0.1";
"varnish server IP";
}
Where you need to replace the Varnish server IP with the IP of your Varnish server.
Next, (thanks to this article!) an easy method from the command line of your Varnish server:
curl -X PURGE http://catfind.it/
Replace catfind.it with your URL. The -X tells curl to replace the GET method with the PURGE method. BTW, you could call the PURGE method anything you'd like, ie. CACTUS – just set up the VCL configuration appropriately.
If you want some other server to be able to purge, you need to add it to your ACL.
You need curl to be installed. It's easily done on Debian / Ubuntu via
apt-get install curl
(as root).
What about the other methods?
-
telnetting into the server (telnet localhost 80) does not work for me, as it drops the connection before I'm finished with typing. Probably there is a way to set up telnet to transmit a certain string, if you want to, share it with us here.
-
Purging using the admin CLI of Varnish NEVER worked for me. Either Varnish has changed it's interface in newer versions, or I need some further configuration to enable it. Again, if you know the ropes, please share your knowledge with us!
varnishadm -T 127.0.0.1:secretport purge req.url == "/"
yields
Unknown request.
Type 'help' for more info.
Installing Zenoss Core on OpenVZ and Ubuntu-VEs
Monday, December 26th, 2011What is Zenoss Core?
Zenoss Core is a fabulous, Open Source, network and device monitor. It allows you to collect statistics, track uptime and get alerts for a wide array of devices and applications, i.e. printers, routers, Linux and Windows servers, Varnish cache and many more.
It is important to see the performance of your digital assets, to ensure optimum experience for the users, and be able to react before someone notices the problems on the outside of your organisation.
Mission-critical components, i.e. corporate e-mail servers can be monitored with this solution.
Setting up Zenoss Core on an Ubuntu-VPS under OpenVZ
OpenVZ can be installed in a OpenVZ container. I chose to use the contributed Ubuntu 10.04 minimal template downloaded from OpenVZ.org. It will be a dedicated VE, just for Zenoss Core.
"ubuntu-10.04-minimal_10.04_amd64.tar.gz"
-
10.04 is LTS (long term supported)
- the minimal comes without Apache or other services
The installation of the Zenoss stack will fail if your resource limits (particularly memory) are set too low. Here's an excerpt from the configuration file of my VPS:
ONBOOT="yes"
# UBC parameters (in form of barrier:limit)
KMEMSIZE="14372700:14790164"
LOCKEDPAGES="256:256"
PRIVVMPAGES="1175000:1250000"
SHMPAGES="21504:21504"
NUMPROC="240:240"
PHYSPAGES="0:9223372036854775807"
VMGUARPAGES="33792:9223372036854775807"
OOMGUARPAGES="26112:9223372036854775807"
NUMTCPSOCK="360:360"
NUMFLOCK="188:206"
NUMPTY="16:16"
NUMSIGINFO="256:256"
TCPSNDBUF="1720320:2703360"
TCPRCVBUF="2703360:3003360"
OTHERSOCKBUF="1126080:2097152"
DGRAMRCVBUF="262144:262144"
NUMOTHERSOCK="360:360"
DCACHESIZE="3409920:3624960"
NUMFILE="9312:9312"
AVNUMPROC="180:180"
NUMIPTENT="128:128"# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="5242880:5242880"
DISKINODES="200000:220000"
QUOTATIME="0"# CPU fair sheduler parameter
CPUUNITS="1000"
You need to install wget and binutils.
apt-get install wget binutils
Then download the newest Zenoss Stack DEB package from Zenoss. The stack includes webserver, a dedicated MySQL instance and other things for running Zenoss. Choose from the native stacks (DEBIAN/UBUNTU), DEB based. In /tmp :
wget http://dev.zenoss.org/deb/dists/main/stable/binary-amd64/zenoss-stack_3.2.1_x64.deb
I used the x64 stack, as we have a 64bit server.
Install the stack using dpkg:
dpkg -i zenoss-stack_3.2.1_x64.deb
This will take quite some time! On finish, start Zenoss Core with
/etc/init.d/zenoss-stack start
Now you are finished with the console part. Fire up your browser, and go to the installation server's IP, port 8080. I.e. http://www.example.com:8080.
Here you will be asked to setup the admin password and a new user for "everyday usage". After creating them, you will be given the opportunity to automatically discover devices and servers, to manually set them up, or to skip to the dashboard. (You can, of course, always add devices and servers later on).
After getting to the dashboard, you can set up a Google Maps API Key. That is pretty self-explanatory, Zenoss Core will help you do it.
Good luck!
Further reading / watching:
Zenoss installation & monitoring a Linux server with SNMP
More information about this screencast on Castix – also includes the example snmpd.conf mentioned in the screencast.
Zenoss Core Getting Started – Adding Devices
Links
- Zenoss Blip.TV Channel (with how-to videos and discussions)
Festplatten sind empfindlich
Sunday, December 11th, 2011Bild: Die Festplatte mit entferntem zweiten Platter und beschädigtem oberen Lesekopf (in der Hoffnung, dass die Platte diesen dann ignorieren würde, hat sie aber nicht)
Was kann passieren wenn man eine Festplatte fallen lässt?
Die Festplatte besteht im Inneren aus sog. Plattern, das sind Scheiben auf denen die Daten gespeichert sind. Lese/Schreibköpfe werden über die Festplatte geschwenkt und können so die Daten von den Plattern nutzen.
Wenn man die Platte fallen lässt, können im schlimmsten Fall die empfindlichen Platter, die manchmal aus einer glasähnlichen Substanz bestehen, kaputtgehen. Wenn man die Festplatte dann leicht schüttelt, scheppert es innendrin. Wenn man sie anmacht, funktioniert sie nicht mehr wie gewöhnlich, sondern macht "komische Geräusche". Kratzen, Klicken, oder auch gar kein Laufgeräusch sind schlimme Zeichen.
Bild: einzelne Splitter eines kaputten Platters.
Was kann man tun wenn es passiert ist?
Wenn tatsächlich einer der Platter defekt ist, hilft nur noch ein professioneller Recovery-Service, um die Daten in einem Reinraum mit Hilfe spezieller Instrumente auszulesen. Dieser Service kann hunderte von Euros kosten.
Wie kann man so einem Fall vorbeugen?
Zunächst: Backup, Backup, Backup! Ich empfehle die sehr gute Software GoodSync, die sehr leicht zu benutzen ist. GoodSync kann auch "vergangene Versionen" speichern, d.h. falls man eine Datei zwischen zwei Backups versehentlich ändert, kann man die vorigen Versionen problemlos wiederherstellen.
SSD Festplatten haben DIESE Probleme nicht – es sind keine empfindlichen mechanischen Teile enthalten, die beim Fallenlassen kaputtgehen könnten. SSDs haben außerdem den Vorteil wesentlich schnellere Zugriffe auf die Daten und schnellere Transferraten zu haben. Es kann gleichzeitig auf Daten die weit auseinander liegen zugegriffen werden, Defragmentierung ist ein Ding der Vergangenheit. Sie haben jedoch auch einen Nachteil: den Preis. Momentan liegt er bis zu zehnmal höher als für klassische Festplatten mit der gleichen Kapazität.
Ich empfehle vor allem für die Systemfestplatte SSD Laufwerke zu nutzen, da das Arbeiten dadurch viel angenehmer wird. Man wartet weniger auf den Computer, die Anwendungen schalten schneller untereinander um, große Dateien werden schneller geöffnet, …. ich selber nutze eine Vertex 2 von OCZ Technologies in meinem Notebook mit 240 GB Speicherkapazität und bin sehr zufrieden.
Man muss auf jeden Fall beide Möglichkeiten kombinieren: Backups sind das A und O. Im Fall des Falles – und es kann sehr viel passieren – kann man die Daten ohne Probleme wiederherstellen, und damit weiterarbeiten. Im anderen Fall kann es sehr teuer werden.
Ein Ansprechpartner für alle Fälle ….
Eine befreundete Firma, PC Kult, berät bei Backup-Lösungen und Daten-Wiederherstellung. Mit fairen Preisen und freundlichen Mitarbeitern ist sie der ideale Ansprechpartner bei allen Fragen rund um PC, Mac und SmartPhones.
Calendaring with Zimbra, Thunderbird and Lightning
Thursday, December 1st, 2011Today, Zimbra Desktop stopped working. I did not particularly like it anyway, because it is so heavy-weight.
Earlier on, I had tried to get the Zimbra Calendar working with Sunbird, and it did not work. Today I tried again with Thunderbird and the Lightning extension.
It works :-)
-
Install Thunderbird and Lightning
-
Add a new Calendar (Network, iCalendar / ICS)
-
use as location: https://(Server)/zimbra/home/(username)/(Name_of_Calendar)?fmt=ics
(not literally of course. Use your full e-mail adress as username, replace your Server. Probably the name of your Calendar is Calendar) -
Accept the certificate if needed
-
Enter your username and password
That's it. It works. Read and write.
(If you omit zimbra and ?fmt=ics from the location above, it will be read-only!)
Based on this Wiki entry.
Now my only wish is to dispose of an external Calendar altogether and have it in Opera. Guys, why is it so hard to integrate?
Watching Hulu and more
Saturday, November 19th, 2011I have bought a PureVPN subscription for VPN access to the US and many other countries.
Here are some tips and infos for you to get started with them:
-
Important! There's an issue called DNS leakage. This may also hamper your performance. Your local ISPs DNS server are used in order to resolve Domain names. There is a free tool (NetSetMan) to change them. I recommend using Google's Public DNS service, you will also benefit from higher speeds after that.
Use this tool to test for DNS leakage. Look for the name of your provider, or any IP adress in the country you're in.
PureVPN describes how you can set up the tool. -
If you do not receive the login data within 24 hours of your order – as happened with me – you should contact their customer service. They have a live chat facility which can help you. The issue with me was a "high-risk transaction" – probably because I paid via PayPal. I had to send an e-Mail from a non-free mail adress to them to get it activated – they will explain the steps you need to take, once you have contacted the customer service.
-
Hulu works. But not with all servers. If they block the IP ("you are using a Proxy server") try using a different server – you've got a broad choice with PureVPN.
-
Sometimes the connection drops. I have set up their connection using the Windows 7 built-in facilities, and now with their dialer. I find that the dialer is a bit more unstable for the SSTP protocol, but the PPTP protocol seems to work fine.
-
The dialer is useful for easier connection variation (you might want to watch iPlayer for BBC and other channels, too.)
-
I have not been able to set up a VPN connection to PureVPN in a Ubuntu (10.04 LTS 32bit) virtual machine, I tried different configurations and servers. I also tried the official configuration example, no luck.
Some tools and links
-
Check your IP adress location after establishing the VPN connection
-
Hulu – watch US TV serials and more – for free
-
Pandora – listen to "a personal radio station" based on your favourite songs
-
SurfNext – making the Internet a freer place. Internet access everywhere – know how.
Ironie!?!?
Tuesday, November 8th, 2011"Alle Vodafoner können sich freuen – alle Smartphoner mit anderen Verträgen schauen in die Röhre! Vodafone bietet im europäischen Ausland ein „ReisePaket Data“ an, bei dem man innerhalb von sieben Tagen für nur 10 € ganze 25 (!!!) Megabyte versurfen oder vermailen kann. Genial. Bei T-Mobile etwa kosten 100KB satte 0,59 Euro." Quelle: Bestboyz
Das ist einfach lächerlich. 25 Megabyte sind mit einem einzigen YouTube Video weg. Soll ich etwa nur Mails schauen??
Das klingt mir sehr nach dem Kommunismus – wo die Dinge so extrem schwer zu erhalten waren, dass die Leute nach sehr langen Wartezeiten froh waren, endlich ihren Trabi zu erhalten …

