Direkt zum Hauptbereich

Posts

Posts mit dem Label "Linux" werden angezeigt.

TripleBoot: XP, Windows 7 and Manjaro Linux

Well, well, well, dear reader, so you are reading this and possibly planning to do this yourself, right? Let me tell you my story: The hardware: IBM thinkcentre M50, even with 3,5 inch floppy Pentium 4 512 RAM DDR1 333 Mhz (to be 4 GB next week) 270 GB HDD My wife uses windows occasionally for work, and some software of mine is better used on a real machine rather than as virtual machine. Both licenses for XP pro and win7 ultimate cost me about 32 EUR. After several attempts to achieve the triple boot I just discovered the lack of software to fix the MBR or GRUB bootloader. In the end I did this manually with a manjaro live CD. Anyway, the right order is XP pro, then win7 and the manjaro linux for M$ is just using ONE bootloader and XP cant insert itself into win7, but the other way around easily. In the end you will geht a boot sequence like this: pick "Windows 7" in GRUB2 and then pick "Windows 7" or "Previous version..." in M$ Bootl...

Server protection with mail notice if root logs in

Lately I have a lot of attacks on my server. Most of them are based in asia, e.g. China or Korea, but also some from servers in Europe like Ukraine or Sweden. The attacks are done by brute forcing my ssh login, which is quite safe to be honest, but this is not stopping people from trying. Firstly I have configured fail2ban to mail me in case of attacks. The attacking IP is blocked for a year. There was some doubt though, so I put a line in my root bash script which is mailing me any login as root, with a whois query as well: echo "ALERT - Shell Access on:' `date` '\n\n' `who` '\n\n' `whois $(who | cut -d'(' -f2 | cut -d')' -f1)`" | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" root@localhost Dont forget to edit you /etc/aliases and run newaliases or put another mail address in the command.

Der Windows XP GAU

Nachdem ich die ersten beiden Bücher von Patrick Lee (Portal-Trilogie), habe ich nun Marc Elsbergs "Blackout", welches ich bisher sehr interessant finde. Die Ideen aus dem Buch sind relativ aktuell und nicht neu, aber dennoch wunderschön realitätsnah, weil mit vielen Beispielen und Referenzen. Und dann kam auf einmal die Nachricht, dass selbst Bankautomaten mit Windows XP arbeiten, welches ich zwar schon mal gesehen hatte (weil Blue-Screen zu sehen war), aber wieder vergessen hatte. Die Nachrichten hatten präsentiert, dass die Banken bisher noch keine Strategie haben, das System der Geldautomaten zu erneuern, da enorme Summen fliessen werden, damit Bill noch mehr Kabel in seinem Haus verlegen kann. Die Ausrede war, dass die Geldautomaten ja nicht mit dem Internet verbunden seien, daher drohe keine Gefahr - wers glaubt! Laut "Just for fun", der Linus Torvalds Autobiographie, sind die Lizenzgebühren weniger der Grund, warum Firmen zu Linux wechseln, sondern ...

Windows XP ist tot! - Alternativen

Diese Tage stellte Microsoft den Support von Windows XP ein, was schlussendlich bedeutet, dass Nutzer keine Ansprüche mehr stellen können in Richtung Aktualität, Sicherheit und Kompatibilität. Ich hatte ja schon öfter über Linux geschrieben, und ja, ich nutze es täglich, ebenso meine Frau. Und wir sind beide sehr zufrieden damit. Auf unseren Rechnern (Dell Inspiron 1300 und Lenovo E525) läuft jeweils Manjaro -Linux - jeweils sehr schnell. Da wir beide weder Spieler sind, noch Adobe Photoshop brauchen (nutzen GIMP) oder auch WORD nutzen müssen (->OpenOffice), ist die kostenlose und freie Alternative Linux perfekt für uns. Für mich spielen auch noch andere Gründe eine Rolle, wo an erster Stelle Freiheit steht, gefolgt von "Spass an der Sache"; aber allgemein ist es auch die Legalität bzw. Einfachheit Software zu bekommen. Welches Linux man/frau später nimmt, ist völlig egal, denn alle Versionen haben einen Paketmanager, mit welchem schnell mit einem Mausklick Softw...

Stream your media to your DLNA device e.g. tv with miniDLNA on a linux machine

Recently we bought a Sony Bravia LED TV with the possibility to receive streams. It can read DLNA, which is not much, so dont fall for the certificate. DLNA means it can read MPEG-I/II and some other normal stuff. Luckily the Sony Bravia can read mkv and x256 and some other codecs. And this is something the sells people and adverbs dont tell you, so be warned not to trust the DLNA-Certificate too much, the device has to decode the media in the end. Anyway i set up miniDLNA on my laptop and now I am able to stream my media to the television. Although the process did not go that well. The problem was miniDLNA was breaking down all the time. And checking it by reading the logs etc revealed permission issues. I had to start miniDLNA as the user my files belonged to. BUT I did not use the user setting in the minidlna.conf instead I just started the daemon as the user. I could have done this with a startup script, but there were some issues with the network being set up at the sam...

Ripping a CD on linux via the command line - which even works for "funny" CDs

Recently I installed a car radio with a USB slot, so I wanted to take some of my music to the car. Since I have about 500< CDs you see the need for storing them as mp3s I hope. And by law I am allowed to do so, but some companies make it difficult to do so. Normally I ripped with k3b, but the settings always disappear, and I switched to KAudioCreator (grip etc did not work), but even there its funny sometimes. These three commands will rip any CD: show CD content: sudo cdparanoia -vsQ  rip to the harddrive (mkdir first!): sudo cdparanoia -B convert to mp3: for f in *.wav; do lame --vbr-new -V 3  "$f" "${f%.wav}.mp3"; done now I used KTagEditor for processing the id3 tag manually But I will try the tool "ripit" for now, it looks promissing. PS: actually, you should use ripit (on linux) because it uses cdparanioa as well as lame with CDDB queries. One command, some YES to CDDB choices and the cd is ripped.

Almost perfect mail server: postfix - dovecot - postgresql -- with virtual mail boxes and SSL

Its a long time ago I had enough time to set up my mail server, so I will summarize my steps, or better: my problems: [on debian 7] install postfix install postfixadmin install postgresql make them work together as they all should use virtual users install dovecot and make it the default SSL handler for postfix, main.cf master.cf etc. Well, this is bull because its of no help to anyone, the devil resides in the details: postfixadmin sets up the database postfix should use queries for to look for mails in the database, so virtual_mailboxes etc have to be set up dovecot should be the MDA for the MTA postfix dovecot and postfixadmin should use a simple and same encryption, because both look into the database; is this step is done (and it took me a while, CRAM-MD5?) you can set up mailboxes via the web interface postfixadmin

Putting phpPgAdmin behind SSL virtualhost and securing it a bit more

This could be a huge post, but I am cutting it short: configure pg_hba.conf right, e.g. set host stuff to password md5 try to connect to your database locally to test it, e.g. psql -U user "psql -U user dbname -W" and type in the password install phppgadmin, e.g. on debian I could not find a /etc/phppgadmin/apache.conf but a /etc/apache2/conf.d/phppgadmin your apache2 should be able to serve SSL, otherwise look a my post from yesterday: SSL virtualhost after you setup a SSH connection through rsa keys and always redirect to it in order to serve multiple site using SSL you should change to *:443 instead of _default_ also you have to tell /etc/apache2/ports.conf to use NameVirtualhost when listening on 443; otherwise apache will tell you about conflicting virtualhosts. apache2: now its time to copy the content of conf.d/phppgadmin into a sites-available file and dont forget to delete the alias line and adjust names and folders. From now on I followed these steps: Step...

etherpad on debian 7 with apache and postgresql

I followed these steps: How to Install Etherpad Lite on Debian Wheezy Basicly: install packages for compiling etc get nodejs set up database get etherpad set it up on localhost create init script for to run as service create user and change folder permissions dry run it with that user create virtual host that forwards the local service And changed/added this at the end: a2ensite domain.tld a2enmod proxy a2enmod proxy_http /etc/init.d/apache2 restart

ssh remote rsa key login (without password)

After changing my system to manjaro I had to recover some settings, and sadly had to do some things again, e.g. my ssh login via rsa keys. After doing it manually I saw this 3 step answer on some message board: ssh-keygen Press Enter key till you get the prompt ssh-copy-id -i root@ip_address (It will once ask for the password of the host system) ssh root@ip_address Now you should be able to login without any password One thing I had to change: chmod 700 .ssh on the remote machine, and then it worked like a charme.

Rolling release? Manjaro it is!

Two posts ago I wrote about my disappointing experiences with manjaro, but after testing a beta version I am all in and love it! First: not just the graphic card was initialized correctly but also font rendering. And after getting into grips with yaourt (the arch linux user repos app) I will always go for manjaro again. It is just not simple enough for beginners with linux hence you have to install codecs by hand, meaning knowing their names. So my vote goes to mint for beginners, but for me it is perfect.

the rolling release adventure: manjaro, sabayon und back to fedora

First of all, once a while I enjoy digging deep into a linux version. So I decided to use the free time before my wedding to burry my head in linux and the command line. Recently I found a site about the best distros 2013 so far and read about the upcoming rolling releases of manjaro and sabayon. A rolling release is something nice and after being stuck with kdenlive in an old version with no functional support for slow motion I considered it to be something nice always ahead with updates. Well, both manjaro and sabayon worked fine as a live cd, but installed they turned into hell. AND THE WINNER IS: fucking ATI! I will never buy a laptop with ATI again - it just sucks. Manjaro is very young and talked about as a light arch linux, but it was everything but light, and the wiki or help pages were very thin, same goes for community support: read the wiki.... do more reading.. blablabla. Sabayon is a gentle approach of bringing gentoo to the masses, and it was nice to try...

Grey Tit in slow motion with AviDemux and OpenShot

Yesterday our new camcorder arrived, mainly bought for our wedding and "broadcasting" some stuff to either my father and Jenny's family. The quality is great and definitely better than with my NIKON P300 and I think the main part of the camcorder is the processor and the ability to save large numerbs of megabytes to the flash card. Here my first attempt (pardon my pronounciation): At dusk I used my tripod to film our Grey Tit nesting box outside my grandfather gave us. The first attempt was ok but then I tried it a bit nearer and got some nice shots. Slow motion with linux was trickier than I thought: cut the big 2 GB file with avidemux (qt) in pieces joint them again with avidemux [very fast] then tried kdenlive, but slow motion is broken [fedora 17 though] did it with openshot by the property dialog had to adjust the length again with the "resize tool" then rendered it not for youtube, but as mp4 in HD 720p 30 fps The camcorder is fun...

PostgreSQL

I like to go with the newest trends since I am not really held back by any production site. So I had a look around and decided to install a new database system. The first thing you might want to consider is the growing hype of NoSQL db's like mongodb, couchdb etc. But after reading this I changed my mind: you-got-nosql-in-my-postgres-using-hstore-in-rails Having done this several times before with no gain of a working db server I looked around for a decent tutorial providing me with just the right steps: install-postgresql-on-fedora-centos-red-hat-rhel There I even had the howto for my CentOS-Server after deploying with postgresql. MySQL is in the minds of people, and it deserved a spot in the light for its availability and easyness, but with the NoSQL-movement and the availability of postgresql on the web it might be good to have had a look. And since I dont really come in contact with the db but just with the ORM there is no harm done ;) PS: there is even a nic...

rails rollback with capsitrano deployment and git

Hello geeks! When programming rails I was very releaved having git at my site. And lately I was forced to deal with git sooner than expected Normaly I end deploying with this command, and of course before that I checked my local installation: cap deploy This time I had some trouble with my asset pipeline in production mode. Mainly because of the integration of russfrisch's html5 boilerplate. It took me a while to realize my mistake with rescuing my remote installation, because I was fixing my local system with this command: git log # look for hash git reset --hard *hash* # insert you hash where to go back to cap deploy # new deployment of old version Well, this did not work.......................... I forgot the fact my remote git system is used by capistrano to deploy, so I had to set that bare repository back too: git push --force origin *hash*:master # insert the same hash, see 'git log' ...

gedit as editor of my choice

Right now I am very satisfied with the puristic editor gedit. Although it is a GNOME application (I use KDE) and with it there come all the libraries, but since I have them installed anyway, it is awesome! I just discovered the snippets, and all the amazing plugins, and after installing Gmate it is more awesome again. Give it a shot, before jumping to something big and bloated. PS: gmate can get you into trouble when not using root/sudo. Also adjust the internal terminal colors: How to change background color of gedit embedded terminal

ruby on rails deployment with capistrano and git

Hello everybody! I mentioned it before me trying ruby on rails. The language is pretty fast forward with its meaning. And I am already in love with the rails framework, although not having worked with it full time, not even semi-professional. The internet is full with howtos and tutorials, but sometimes the hard thing is to seperate them, and finding you own "truths", some are: Deploying Rails 3 Apps with Git, Capistrano and Passenger Deploying the application remotely using Capistrano life saving second post: rails 3.1 assets:precompile deployment I ran into serveral problems like: no pictures remotely -> precompile locally! make sure EVERY gem is noted in Gemfile rake failed almost everytime, and blaimed permission rules ... [until 5 hours of my live were gone] This is my approach to easily developing webapps: [do not just copy and paste, I dont post all the code; and in retroperspect I should have read into it more deep too to save time] For ...

mailman virtualhost settings

I found this nice page explaining mailman as subdomain: My Mailman Virtual Hosting List Setups But I found this to be too redundant compared to the default settings already been done by the installings process of mailman with postfix. And there were even some people working with HTML-Header-Redirects in subfolders for their virtualhost. I just did this in /etc/httpd/conf/httpd.conf <VirtualHost *:80> ServerName lists.mysite.com ServerAlias lists.mysite.com RewriteEngine on RewriteRule ^/mailman[/]+$ http://lists.mysite.com/mailman/listinfo [L,R] RewriteRule ^/$ http://lists.mysite.com/mailman/listinfo [L,R] </VirtualHost> Of course there were the RedirectMatch for /mailman/ in place; as well as the changes for the hosts in mm_cfg.py and postfix/main.cf like the link above shows. Mailman had to be initialised again, but then it worked all fine. Before going to smash something though, test your mailserver with: mail %TO_ADDRESS% ...

apache virtualhosts subdomains

In this post I will show how to configure several virtual hosts on a linux machine, that will function as subdomains with their own DocumentRoots. Goal: access your site via blog.mysite.com access a different site via test.mysite.com allow different app to be accessable via mysite.com/app1 First you will have to redirect any traffic to a virtual host on port 80: NameVirtualHost *:80 From now on every 'html' traffic is redirected to your following settings; and have in mind that you former DocumentRoot is overridden. (the last caused me some troube/time) Now set up some subdomains: <VirtualHost *:80> ServerName blog.mysite.com ServerAdmin webmaster@mysite.com DocumentRoot /var/www/html/blog <Directory /var/www/html/blog> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost>  <VirtualHost *:80> Server...