Linux Mint 9 (Isadora) – Installing Ubuntu One

Installing Ubuntu One to sync files, contacts and Tomboy Notes is quite straight-forward in Linux Mint 9 (which is built on Ubuntu) but there are a couple of caveats.

You can install Ubuntu One by simply typing this into the Terminal:

sudo apt-get update
sudo apt-get install ubuntuone-client-gnome

The problem however appears when you try to install the plugin (Bindwood) to sync Firefox bookmarks in the Ubuntu One application. Not only does it not work – it also messes up an entry in your /etc/apt/sources.list. This means that you will get an error when you run update manager (and you will have an icon in the taskbar that reminds you of this all the time).

To avoid this problem you can install the Bindwood plugin manually as follows:

sudo apt-get install xul-ext-bindwood

If you need to correct your /etc/apt/sources.list this can be done as follows, In the Terminal type:

sudo gedit /etc/apt/sources.list

Look for the deb http://packages.linuxmint.com/ isadora main upstream import universe entry and remove “universe” from the end of it so that it looks like this:

deb http://packages.linuxmint.com/ isadora main upstream import

Save the file and close the file editor and then update your repositories again:

sudo apt-get update

Source: bugs.launchpad.net

Ubuntu 10.4 Lucid – Configuration of apt-cacher-ng Mobile Clients

In a previous post I configured Ubuntu Server as an apt proxy using apt-cahcher-ng, but had only configured my servers to use the proxy.

There are various ways of configuring mobile clients to enable and disable their apt proxy configuration. I chose to create a couple of bash scripts and a couple of launchers so that I could easily enable and disable my laptops’ connection to the proxy.

In my home directory I created the following files – enableproxy.sh, disableproxy.sh and 02proxy.

enableproxy.sh

#!/bin/bash
sudo cp 02proxy /etc/apt/apt.conf.d/02proxy

disableproxy.sh

#!/bin/bash
sudo rm /etc/apt/apt.conf.d/02proxy

02proxy

Acquire::http { Proxy "http://server-ip:3142"; };

The next step is to create a launcher for enableproxy.sh and disableproxy.sh.

Right click the desktop and then click Create Launcher. Click the Type drop-down menu and select Application in Terminal. Enter a Name for the Launcher. Click the Browse button and select enableproxy.sh. Click OK.

Repeat this process and create a Launcher for disableproxy.sh.

This manual process allows me to keep my proxy configured 99% of the time and be able to quickly disable it when my laptop is away from home.

Ubuntu Server – Installing apt-cacher-ng as an APT proxy for downloading software packages

If you have several Ubuntu machines downloading packages over the internet you can use apt-cacher-ng as a proxy to cache these packages locally. This will save bandwidth and increase the speed with which machines get packages (once they have been cached). To set this up I will install  apt-cacher-ng on Ubuntu Server  and then configure my Ubuntu desktop machines to use  apt-cacher-ng as a proxy.

Having set a static IP address on my server installation I installed apt-cacher-ng as follows:

sudo apt-get update
sudo apt-get install apt-cacher-ng

Install nano and edit the apt-cacher-ng configuration file acng.conf:

sudo apt-get install nano
sudo nano /etc/apt-cacher-ng/acng.conf

I made the following change to acng.conf:

BindAddress: 0.0.0.0

Note that acng.conf defines the cache directory as var/cache/apt-cacher-ng/_import – we will need to create this folder later on.

Restart apt-cacher-ng:

sudo /etc/init.d/apt-cacher-ng restart

Next we can move on to the setup of client machines – this requires configuring the server as a proxy and can be accomplished with the following command:

echo 'Acquire::http { Proxy "http://<server-ip>:3142"; };' | sudo tee
/etc/apt/apt.conf.d/02proxy

Make sure that you replace <server-ip> with the static IP address of your apt-cacher-ng server.

Now that the basic setup is complete there are a few additional steps to perform – the first of which is to import any packages that the server has downloaded into the apt-cacher-ng cache.

On the server create the _import directory for the apt-cacher-ng cache:

sudo mkdir /var/cache/apt-cacher-ng/_import

Copy packages from /var/cache/apt/archives to /var/cache/apt-cacher-ng/_import:

cd /var/cache/apt/archives
sudo cp *.* /var/cache/apt-cacher-ng/_import

Give apt-cacher-ng ownership of the /var/cache/apt-cacher-ng/ and /var/cache/apt-cacher-ng/_import directories:

sudo chown -R apt-cacher-ng /var/cache/apt-cacher-ng
/var/cache/apt-cacher-ng/_import

From here we can complete our configuration using the apt-cacher-ng web based dashboard. Open a browser with the following URL:

http://<server-ip&gt;:3142/acng-report.html

Make sure that you replace <server-ip> with the static IP address of your apt-cacher-ng server:

Apt-cacher-ng dashboard

On the apt-cacher-ng dashboard scroll down and click the Import button:

Apt-cacher-ng import

Once the import is complete you can test that everything is working by downloading the same package from multiple clients. Using the Count Data button at the top of the apt-cacher-ng dashboard you will be able to monitor the transfer statistics:

apt-cacher-ng statistics

Update:

For configuration of mobile proxy clients such as laptops see: http://pricklytech.wordpress.com/2011/03/22/ubuntu-10-4-lucid-configuration-of-apt-cacher-ng-mobile-clients/

Sources:

acidborg

Ubuntu forum

Ubuntugeek