Ubuntu 13.10 Saucy Salamander – Dropbox issues on GUI panel indicator. LXDE and Unity

Dropbox

Dropbox logo

I have had some problem on trying to let work the dropbox application under Ubuntu 13.10 after I performed a dist upgrade from 13.04, so after spending some times in searching a method to let it work again I am reporting what I have tryed to do.

Continue reading

Opening ports using iptables

Screenshot Firestarter: Das Logfile von iptabl...

Image via Wikipedia

To open a port by using iptables you can use the iptables command, assume for example that you want to open port 25, you have to issue on the shell the following command

iptables -I INPUT -p tcp –dport 25 -j ACCEPT

where -I instruct to not add the rulle after the deny all rule avoiding to not be checked by iptables. At the end you have to save your changes with

service iptables save

and restart the service with

service iptables restart

However you can also edit directly the configuration file that in CentOS is in /etc/sysconfig/iptables

How to mount LVM partition on Ubuntu

Creating the main partition for ubuntu

Image via Wikipedia

Mounting is an easy process to do, provided the filesystem type you are using is supported. What happen when you have an LVM formatted disk, and you need to mount it because the disk cannot be booted and a hell lot of valuable data kept inside?? Do not worry, because the solution is here…….

1. Get a live cd, for example, Ubuntu. For this article, I use Ubuntu 6.06 (I cannot find any latest version of ubuntu at my place)

2. Boot using the live cd. Search for these tools: lvm2. If the cd do not have it, install it.
# apt-get install lvm2

3. To make sure the harddisk is recognised, you can use fdisk
# fdisk -lu

4. Once installed, run pvscan to scan all disks for physical volume. this to make sure your LVM harddisk is detected by Ubuntu
# pvscan
PV /dev/sda2 VG VolGroup00 lvm2 [74.41 GB / 32.00 MB free]
Total: 1 [74.41 GB] / in use: 1 [74.41 GB] / in no VG: 0 [0 ]

5. After that run vgscan to scan disks for volume groups.
# vgscan
Reading all physical volumes. This may take a while…
Found volume group “VolGroup00” using metadata type lvm2

6. Activate all volume groups available.
# vgchange -a y
2 logical volume(s) in volume group “VolGroup00” now active

7. Run lvscan to scan all disks for logical volume. You can see partitions inside the hard disk now active.
# lvscan
ACTIVE ‘/dev/VolGroup00/LogVol00’ [72.44 GB] inherit
ACTIVE ‘/dev/VolGroup00/LogVol01’ [1.94 GB] inherit

8. Mount the partition to any directory you want, usually to /mnt
# mount /dev/VolGroup00/LogVol00 /mnt

9. You can access the partition in the /mnt directory and can backup your data

Note

This post is a copy of http://linuxwave.blogspot.com/2007/11/mounting-lvm-disk-using-ubuntu-livecd.html. This is a valuable info, so to avoid to not be able to reach the site in the future I have copied it instead to just link it. If the author feels that its copyright are beeing violated can ask me to remove the post.

Database Replication with Slony-I

Linux Journal logo

Image via Wikipedia

Whether you need multiple instances of your database for high availability, backup or for a no-downtime migration to a new version, this versatile tool will keep all of them in sync.

Here follows a useful article found on Linux Journal about setting a Replication with Slony-I.

http://www.linuxjournal.com/article/7834?page=0,0

Delete Files Older Than X Days on Linux

Tux, the Linux penguin

Image via Wikipedia

The find utility on linux allows you to pass in a bunch of interesting arguments, including one to execute another command on each file. We’ll use this in order to figure out what files are older than a certain number of days, and then use the rm command to delete them.

Command Syntax

find /path/to/files* -mtime +5 -exec rm {} \;

Note that there are spaces between rm, {}, and \;

Explanation

  • The first argument is the path to the files. This can be a path, a directory, or a wildcard as in the example above. I would recommend using the full path, and make sure that you run the command without the exec rm to make sure you are getting the right results.
  • The second argument, -mtime, is used to specify the number of days old that the file is. If you enter +5, it will find files older than 5 days.
  • The third argument, -exec, allows you to pass in a command such as rm. The {} \; at the end is required to end the command.

This should work on Ubuntu, Suse, Redhat, or pretty much any version of linux.

Installing Java on CentOS 5.5

Trying to use the standard java distribution from Oracle (….Sun was acquired from Oracle…) could be a little confusing so I just link another blog were you find described the adopted solution for CentOS 5.2 but that is applyable also to CentOS 5.5.

http://chrisschuld.com/2008/10/installing-sun-java-on-centos-5-2/

CentOS 5.5 How to export X11 Display

It was a messy to try to export the display to a remote host. Typically it is just matter to use command like xauth <hostname> and set the DISPLAY environment variable properly or better to  use ssh forwarding. On Putty and TeraTerm we need just to enable a check instead from a linux shell you can use:

ssh -X -l username hostname

where the -X will perform the magic…check also for the -Y option)…However this on CentOS 5.5 doesn’t work!!!.
This is caused by a bug (http://bugs.centos.org/view.php?id=2391). So to avoid you to spend time finding this bug simply you just need to install the xorg-x11-xauth package.
So to be simple type on the shell:

yum install xorg-x11-xauth