Archive for the 'Linux' Category

Installation of OwnCloud on Debian

Well most people use Dropbox or iCloud to sync their data. It works very good but I don’t like the idea to have my data stored on some other server. I like to have more control and this is the main reason why I give OwnCloud a shot.

Installation
I installed it on debian and the setup instructions from the homepage did not work for me. When I tried to install it I got following message:
E: Unable to locate package php-xml
E: Unable to locate package php-mbstring
E: Unable to locate package php5-zip

This solution worked for me:
#apt-get update
#apt-get upgrade

#apt-get install apache2 php5 php5-json php5-gd php5-sqlite curl libcurl3 libcurl3-dev php5-curl php5-common php-xml-parser
#apt-get install sqlite

Important: Of course replace the links whit the newest ones on the homepage: http://owncloud.org/

#wget http://download.owncloud.org/releases/owncloud-4.0.4.tar.bz2
#tar -xjf owncloud-4.0.4.tar.bz2
#cp -r owncloud /var/www
#chown -R www-data:www-data /var/www

#service apache2 restart

Point your browser to it and login with:
admin admin

After those steps I installed the client on my Windows PC and recognized that it didn’t sync. The problem was that the time on the client and and on the server was not the same. So make sure it is!

No Comments »

admin on June 29th 2012 in Internet, IT, Linux

HOw to use md5sum

It creates a 128 bit checksum which is unique. So if two files are not identical they won’t have the same md5 checksum. You can use it to check if the file which you have download has not been manipulated or is corrupted.

Output of one file:
# md5sum sample.txt
d41d8cd98f00b204e9800998ecf8427e  sample.txt

Output of multiple files:
# md5sum *.txt
5aa6788f9355e26bd8aef7303dda97fe  sample2.txt
d41d8cd98f00b204e9800998ecf8427e  sample.txt

You can create your own md5 file and verify it afterwards:
# md5sum sample.txt > verify.md5
# md5sum –c verify.md5

No Comments »

admin on June 29th 2012 in IT, Linux

Upgrade Problem with nagios from lenny to Squeeze in debian

Because lenny is no longer supported I had to upgrade our nagios monitor server from lenny to squeeze. After the upgrade the check_snmp commands timed out. After some research I found out because of a licensing issues snmpd with the mibs are no longer installed by default.

1. Edit Source List
First I had to change the /etc/apt/source.list and add “contrib non-free”.

It should look similar to this:
deb http://ftp.ch.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.ch.debian.org/debian/ squeeze main contrib non-free

2. Install SNMPD with the MIB List
#apt-get install snmpd
#apt-get install snmp-mibs-downloader

3. Download Mibs
#/usr/bin/download-mibs

4. Restart SNMPD
I’m not sure if this step is necessary. I actually even restarted the whole server.
#/etc/init.d/snmpd restart

No Comments »

admin on April 26th 2012 in IT, Linux

sendEmail from Bash over GMail

The syntax is following:
sendEmail -v –f $EMAIL_FROM -s smtp.gmail.com:587 -xu p$USERNAME –xp $PASSWORD –t $EMAIL_TO -o tls=yes –u $SUBJECT –m $MESSAGE

But after I tried it I got following message:
ERROR => No TLS support!  SendEmail can’t load required libraries. (try installing Net::SSLeay and IO::Socket::SSL

This fixed the problem:
apt-get install libio-socket-ssl-perl libnet-ssleay-perl

No Comments »

admin on February 10th 2012 in Linux

Color LInux Prompt

vi ~/.bashrc

To color it red change PS1 to:
export PS1=’\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] ‘

After that you need to save it and reload it with:
source ~/.bashrc

No Comments »

admin on February 8th 2012 in IT, Linux

Treesize in Linux Command Console

I love the program treesize on windows and I was looking for a script to do the same on linux.

Thanks to Andrew who made this neat script:

No Comments »

admin on January 31st 2012 in Linux

Using nmap to check if multiple hosts are up

nmap -sP 192.168.1.0-255

No Comments »

admin on December 31st 2011 in IT, Linux

HOw to stay connected to a Windows Network Share even after a reboot in Linux

You just need to edit  the /etc/fstab and following line:
//$ShareName  /mnt/$FolderName    cifs      username=$username,password=$password    0    0

To reload the files system:
mount -a

No Comments »

admin on November 18th 2011 in IT, Linux

How to find out if linux is 32 bit or 64 bit

Run the following command in your console:

# uname –a

32-bit

  • i386/i686

64-bit

  • x86_64

No Comments »

admin on May 20th 2011 in IT, Linux

Rename Host Name Linux

Just edit the name in these two files:
# vi /etc/hostname
# vi /etc/hosts

After that restart the server:
# shutdown –r now

You could also just restart the network. But this was the lazy and easier way;-)

No Comments »

admin on January 25th 2011 in IT, Linux




Check out new movies online website. Download and buy movies now.