Monday, 2 March 2009

Permanent ubuntu shares

from http://www.ubuntugeek.com/nfs-server-and-client-configuration-in-ubuntu.html

-------------------------------------------

On all machines:
sudo apt-get install portmap nfs-common nfs-kernel-server

----------------

On the exporting machine(s):
Edit /etc/exports. Specify local folders to export. Eg.

/home/mymachine/data/d4 192.168.1.1/24(rw,async) 213.334.248.237(rw,async)

opens the directories to all local machines, and the address 213.334 etc.

After change:
sudo /etc/init.d/nfs-kernel-server restart
----------------

On the mounting machines: On the fly:

sudo mount server.mydomain.com:/files /files

Possible restart required:

sudo /etc/init.d/portmap restart

sudo /etc/init.d/nfs-common restart

---------------

On the mounting machines: With fstab:

Add lines:
server.mydomain.com:/files /files nfs rsize=8192,wsize=8192,timeo=14,intr


---------------
Firewall ports:
Open 32771, 111 and 2049

sshfs

sudo apt-get install sshfs

Add users to the fuse group:
sudo adduser username fuse (i found this not to be required)

mount the remote file systems:
sshfs loginname@ipaddress:/pathtoremotedir /pathtolocalmountpoint

These are temporary. When the ssh tunnel fails, the access is lost. After a period
of inactivity, the connection is dropped.

[NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_init_stage1.c at line 182

OpenMPI failure (fixed)

$ mpiexec -n 4 fe2.py

[host-desktop1:09127] [NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_init_stage1.c at line 182
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):

orte_rml_base_select failed
--> Returned value -13 instead of ORTE_SUCCESS

--------------------------------------------------------------------------
[host-desktop1:09127] [NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_system_init.c at line 42
[host-desktop1:09127] [NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_init.c at line 52
--------------------------------------------------------------------------
Open RTE was unable to initialize properly. The error occured while
attempting to orte_init(). Returned value -13 instead of ORTE_SUCCESS.
--------------------------------------------------------------------------

Reinstall, from a fresh build.

cd downloads
wget http://www.open-mpi.org/software/ompi/v1.3/downloads/openmpi-1.3.tar.gz
tar xzf openmpi-1.3.tar.gz

Reading the README showed, PATH and LD_LIBRARY_PATH need a specific entry. ompi_info, a program residing in /bin reports the MPI status, but it's location is of more interest.

whereis ompi_info
ompi_info: /usr/bin/ompi_info /usr/share/man/man1/ompi_info.1.gz

So /usr/bin needs to be in PATH, and /usr/lib needs to be in LD_LIBRARY_PATH.

Checking .bashrc showed LD_LIBRARY_PATH was wiped on its instantiation. The first line was changed from

LD_LIBRARY_PATH=blahbah

to

LD_LIBRARY_PATH=blahbah:$LD_LIBRARY_PATH

and things started working again.

Sunday, 1 March 2009

ipython

Ipython's not behaving as expected; this is hardy. I think i installed it
early on, with

sudo apt-get install ipython

on running it, arange doesn't work. I can't install pylab etc. Start again.

$ sudo aptitude install bzr
$ bzr branch lp:ipython

Read the installation instructions and found:

$ sudo easy_install ipython[kernel,security,test]

this bloody failed, too. Try:
$ sudo easy_install ipython

seems ok.


*UPDATE*

This same command, seems to safely update ipython, too! The change from 0.8.1 to 0.9.1 was seamless. Numpy, scipy and my modules import fine. ipcluster didn't work, though: twisted
was required.

$ sudo easy_install twisted

amazing. It worked. Now foolscap is missing.

$ sudo easy_install foolscap

Unbelievable. It worked, and

$ ipcluster -n 4

works, too.

Update, May 2013:


sudo apt-get install ipython-notebook python-matplotlib \ 
python-scipy python-pandas python-sympy python-nose


now works!

Saturday, 28 February 2009

CLI loops, including batch conversion of .xcf to .png

for I in {1..10}; do echo $I; done

for I in 1 2 3 4 5 6 7 8 9 10; do echo $I; done

for I in $(seq 1 10); do echo $I; done

for ((I=1; I <= 10 ; I++)); do echo $I; done


Apply to conversion of all .xcf files in a directory, to .png:

for i in `ls *.xcf`; do xcf2png $i -o $i.png; done

Tuesday, 24 February 2009

Sharing ubuntu directories.

Mostly from http://www.redhat.com/docs/manuals/linux/RHL-7-Manual/ref-guide/s1-sysadmin-nfs.html

and (better)

http://www.ubuntugeek.com/nfs-server-and-client-configuration-in-ubuntu.html


aptitude install nfs yielded:

Couldn't find package "nfs". However, the following
packages contain "nfs" in their name:
libyanfs-java nfsbooted libroxen-tokenfs p3nfs libnfsidmap-dev
fai-nfsroot libfile-nfslock-perl nfs-server unionfs-source funionfs
nfs-kernel-server unionfs-tools nfs-client libnfsidmap2 nfs-user-server
nfsboot nfs-common unfs3 knfs

So, I reckon nfs-server, nfs-client are probably required.

sudo apt-get install nfs-server nfs-client

shows:

Package nfs-server is a virtual package provided by:
nfs-kernel-server 1:1.1.2-2ubuntu2.2
unfs3 0.9.19+dfsg-1
nfs-user-server 2.2beta47-23
You should explicitly select one to install.

So, maybe nfs-kernel-server

sudo apt-get install nfs-kernel-server

Well, /etc/exports now exists; a good sign.

/mnt/sda2 192.168.1.108

is added. /mnt/sda2 is the shared folder. 192.168.1.108 is the machine allowed to connect.

After changes, either stop and start the daemon:

/etc/rc.d/init.d/nfs stop
/etc/rc.d/init.d/nfs start


or restart it:

/etc/rc.d/init.d/nfs restart

These didn't exist. More searching showed:

sudo apt-get install nfs-kernel-server nfs-common portmap

(already there)

sudo dpkg-reconfigure portmap (select no)

Restart portmap:

sudo /etc/init.d/portmap restart

Restart NFS:
sudo /etc/init.d/nfs-kernel-server restart

worked.


===========================

Install the client:

sudo apt-get install portmap nfs-common

===========================

Manual mount:

cd ~
sudo mount 192.168.1.65:/mnt/lin2/projects projects


===========================
Alternative method:
http://fuse.sourceforge.net/sshfs.html

Use ssh! Install fuse, and glib2.0-devel. Download from the link and ./configure; make; sudo make install

Then,

sshfs login@ipaddress:/path mountpoint

wow! Useful, particularly with firewall avoidance.

Sunday, 22 February 2009

Ubuntu DVD playback

/etc/apt/sources.list:

#deb cdrom:[Ubuntu 8.04.2 _Hardy Heron_ - Release amd64 (20090121)]/ hardy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy universe
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu hardy partner
deb-src http://archive.canonical.com/ubuntu hardy partner

deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
deb http://security.ubuntu.com/ubuntu hardy-security universe
deb-src http://security.ubuntu.com/ubuntu hardy-security universe
deb http://security.ubuntu.com/ubuntu hardy-security multiverse
deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse


# from http://ubuntuguide.org/wiki/Ubuntu:Hardy#extrarepositories .....


##--------------------
## UBUNTU REPOSITORIES
## -------------------
deb http://my.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://my.archive.ubuntu.com/ubuntu/ hardy main restricted
deb http://my.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://my.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb http://my.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://my.archive.ubuntu.com/ubuntu/ hardy universe
deb http://my.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://my.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb http://my.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://my.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://my.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://my.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb http://my.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://my.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu hardy partner
deb-src http://archive.canonical.com/ubuntu hardy partner
deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
deb http://security.ubuntu.com/ubuntu hardy-security universe
deb-src http://security.ubuntu.com/ubuntu hardy-security universe
deb http://security.ubuntu.com/ubuntu hardy-security multiverse
deb http://my.archive.ubuntu.com/ubuntu/ hardy-proposed restricted main multiverse universe
deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse
deb http://ppa.launchpad.net/ubuntume.team/ubuntu hardy main # Ubuntu Muslim Edition
deb-src http://ppa.launchpad.net/ubuntume.team/ubuntu hardy main # Ubuntu Muslim Edition
deb http://www.linuxmint.com/repository romeo/
deb http://tskariah.000webhost.com/ubuntu ubuntu main
#deb http://ppa.launchpad.net/kubuntu-members-kde4/ubu...gutsy main
## +++ Backports & Proposed (Ubuntu Unstable) +++
deb http://archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse
## +++ Source Repositories +++
deb-src http://archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
# deb http://ppa.launchpad.net/kubuntu-members-kde4/ubu...hardy main
deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
##Universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
## Multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
## Backports
deb http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
## Canonical Partner Repository
deb http://archive.canonical.com/ubuntu hardy partner
deb-src http://archive.canonical.com/ubuntu hardy partner
deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
deb http://security.ubuntu.com/ubuntu hardy-security universe
deb-src http://security.ubuntu.com/ubuntu hardy-security universe
deb http://security.ubuntu.com/ubuntu hardy-security multiverse
deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse
## PLF REPOSITORY
deb http://packages.medibuntu.org/ gutsy free non-free
deb http://ppa.launchpad.net/reacocard-awn/ubuntu gutsy main
## +++ Medibuntu +++
deb http://packages.medibuntu.org/ hardy free non-free
deb http://packages.medibuntu.org/ feisty free non-free
#deb http://ppa.launchpad.net/kubuntu-members-kde4/ubu...hardy main
deb http://playonlinux.botux.net/ hardy main


Then,

sudo apt-get update

and

sudo apt-get install libdvdcss2
sudo aptitude install xine-ui libxine-extracodecs


or maybe apt-get, that.