Monat: November 2010

Debian Ubuntu: Delete Packages which are marked as „rc“

Problem: If you up/downgrade a Debian most of unneeded files are always on your disk Solution: To check: $sudo dpkg -l | more To cleanup: dpkg –list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg –purge If you like run the command twice cause sometimes deps are new taken or install deporphan to: $sudo deborphan | xargs sudo apt-get -y remove –purge If you like run the command twice cause sometimes deps are new taken

Debian Squeeze: Which is current the best Debian for Laptops?

Problem: There is no difference between new and old Laptops, they always need the best Drivers on Linux to operate safe. Solution: For this you should take Sqeeze Debian Version. To get a fast Desktop on a older Laptop like a Thinkpad R50p or T30 you can use LXDE Desktop. /etc/apt/sources.list deb http://ftp2.de.debian.org/debian/ squeeze main non-free contrib deb-src http://ftp2.de.debian.org/debian/ squeeze main non-free contrib deb http://security.debian.org/ squeeze/updates main contrib non-free deb-src http://security.debian.org/ squeeze/updates main contrib non-free for upgrade, or take the LXDE-Debian-testing iso of the Debian Mirrors. To install with a Install netinst – CD do: aptitude install xdm lxde xserver-xorg […]

MySQL : Backup and Restore Database without phpmyadmin (commandline)

Problem: phpmyadmin interfaces are slow and often attacked by script kids, if you can don’t use it! Solution: To backup and restore use command line To Backup a database: $mysqldump -u root -p wordpressdb > /backups/wordpressdb-dump.sql [Enter root password] To restore: $mysql -u root -p wordpressdb < /backups/wordpressdb-dump.sql[Enter root password] Remark: this is not recogized by the ONLINE SYSTEM if users visits you pages to read! There must be no shutdown of the mysql or apache webserver, its a online HOT-Dump. If you like put it into a script and set cron to backup every night. Sample Bash MySQL Script […]

WordPress MySQL: Cleanup old revisions old posts old entrys

Problem: If you use wordpress and edit often your posts a high count of old revisions are backuped inside the mysql database: Solution: Login mysql $mysql -u root -p [Enter root password] at mysql command line select wordpress your database mysql>use wordpressdb; [Enter] System echo=Database changed.. delete old backups of posts mysql>DELETE FROM wp_posts WHERE post_type = "revision"; [Enter] System echo=..Entry affected time.. logout database and revisit pages, if you have made a database backup with mysqldump before and after cleanup you see how much size the database lost (du -h wordpress.sql) often 80% of the size.

Ubuntu Debian: Replace Oracle OpenOffice with Free LibreOffice

Problem: Last weeks most of the free OpenOffice (Oracle owned) workers moves to the new free version LibreOffice http://www.documentfoundation.org Solution: To use free Software do: on 32bit: download files.. cd /tmp wget http://ftp5.gwdg.de/pub/tdf/libreoffice/testing/3.3.0-beta2/deb/x86/LibO_3.3.0_beta2_Linux_x86_install-deb_en-US.tar.gz wget http://ftp5.gwdg.de/pub/tdf/libreoffice/testing/3.3.0-beta2/deb/x86/LibO_3.3.0_beta2_Linux_x86_langpack-deb_de.tar.gz unpack.. tar -xzvf LibO_3.3.0_beta2_Linux_x86_install-deb_en-US.tar.gz tar -xzvf LibO_3.3.0_beta2_Linux_x86_langpack-deb_de.tar.gz go into file to install.. cd DEBS sudo dpkg -i *.deb sudo dpkg -i desktop-integration/*menus*.deb cd /tmp/DE/DEBS sudo dpkg -i *.deb ENJOY THE NEW FREEDOM… on 64bit: download files.. cd /tmp wget http://download.documentfoundation.org/libreoffice/testing/3.3.0-beta2/deb/x86_64/LibO_3.3.0_beta2_Linux_x86-64_install-deb_en-US.tar.gz wget http://download.documentfoundation.org/libreoffice/testing/3.3.0-beta2/deb/x86_64/LibO_3.3.0_beta2_Linux_x86-64_langpack-deb_de.tar.gz unpack files.. tar -xzvf LibO_3.3.0_beta2_Linux_x86_install-deb_en-US.tar.gz tar -xzvf LibO_3.3.0_beta2_Linux_x86_langpack-deb_de.tar.gz go into file to install.. cd DEBS sudo dpkg -i *.deb sudo dpkg -i desktop-integration/*menus*.deb […]