Archive

Archive for the ‘Linux’ Category

SSH authentication using key pairs

October 3rd, 2013 No comments

This is more of an aide-mémoire for me than a public guide. If it is helpful for other people then I am happy to make it available. If anyone has any comments or suggestion please contact me.

. . .

This example is for Debian however it should work on most flavours.

  • Log on to the client machine as the user who will be accessing the server
  • Generate a key pair using the following command:
$ ssh-keygen
  • Use the default directory to save the key
  • [optional] To use SSH authentication without entering a password simply hit enter (otherwise enter a pass phrase)
  • The key will be created and stored in the ~/.ssh directory
  • We now need to install the generated key on the server using the following command:
$ ssh-copy-id -i .ssh/id_rsa.pub username@serverip
  • When asked enter the password to log on to server. The key will then be added to the server and confirmation message will be displayed.
  • Finally a bit of housekeeping / security. Protect the SSH keys:
$ chmod go-w ~/
$ chmod 700 ~/.ssh
$ chmod go-rwx ~/.ssh/*

That should be it…

Categories: Debian, Linux, SSH Tags: , ,

Ubuntu Desktop 10.10 ‘libfaac’…

September 16th, 2011 No comments

This is more of an aide-mémoire for me than a public guide. If it is helpful for other people then I am happy to make it available. If anyone has any comments or suggestion please contact me.

. . .

After installing Ubuntu from scratch and if you are trying to use FFMPEG to encode ‘aac’ audio streams you may find you are missing the ‘libfaac’ library. It is simple enough to install using apt-get:

sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get -q update && sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring && sudo apt-get -q update

Then run:

sudo apt-get install ffmpeg libavcodec-extra-52

And you will now have the library available…

Categories: Linux, Ubuntu Tags:

Playing DVDs with Ubuntu Desktop (10.10)…

August 2nd, 2011 No comments

This is more of an aide-mémoire for me than a public guide. If it is helpful for other people then I am happy to make it available. If anyone has any comments or suggestion please contact me.

. . .

After installing Ubuntu Desktop (10.10) you need a few extra packages to read/play DVDs. These packages are provided by: http://www.medibuntu.org/

First thing to do is open up a terminal window and add the new source locations to APT:

$ sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

Then update APT and install the mediabuntu keyring:

$ sudo apt-get update
$ sudo apt-get install medibuntu-keyring
$ sudo apt-get update

Then install the required packages:

$ sudo apt-get install libdvdcss2

(Optionally) Install the w32 codecs to support (wmv, quicktime, realplayer):

$ sudo apt-get install w32codecs

If you haven’t already done so install VLC (the absolute king of media players):

$ sudo apt-get install vlc

If all went well you should now be able to play DVDs…

Categories: Computer Hardware, DVD, Films, Linux, Ubuntu Tags:

Installing debug FlashPlayer for Firefox on Ubuntu 10.10

July 20th, 2011 No comments

This is more of an aide-mémoire for me than a public guide. If it is helpful for other people then I am happy to make it available. If anyone has any comments or suggestion please contact me.

. . .

  • First install the ‘Adobe Flash Player plug-in’, through the ‘Software Centre’ (alternatively it can be done from the command line if you like)…
  • Download the Debug Flash Player:
$ cd ~/Downloads/
$ wget http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_plugin_debug.tar.gz
  • Extract the files:
$ tar -xzvf flashplayer_10_plugin_debug.tar.gz
  • Copy ‘libflashplayer.so’ to the Flex SDK folder:
$ sudo mv libflashplayer.so /opt/flex/runtimes/libflashplayer.debug.so
  • Update alternatives reference:
$ sudo update-alternatives --install /usr/lib/flashplugin-installer/libflashplayer.so firefox-flashplugin /opt/flex/runtimes/libflashplayer.debug.so 60
  • (optional) Check alternatives reference:
$ update-alternatives --display firefox-flashplugin
firefox-flashplugin - auto mode
  link currently points to /opt/flex/runtimes/libflashplayer.debug.so
/opt/flex/runtimes/libflashplayer.debug.so - priority 60
/usr/lib/flashplugin-installer/libflashplayer.so - priority 50
Current 'best' version is '/opt/flex/runtimes/libflashplayer.debug.so'.
  • Restart Firefox and type ‘about:plugins’ into the address bar to check the plug-in is loaded.

Install and configure Adobe Flex SDK on Ubuntu 10.10

July 20th, 2011 No comments

This is more of an aide-mémoire for me than a public guide. If it is helpful for other people then I am happy to make it available. If anyone has any comments or suggestion please contact me.

Requirements

  • The Flex SDK (build 4.5.1.21328 at the time of writing)
  • Java (version 6 at the time of writing)

Installation

  • If it isn’t already installed we need Java. Open up a terminal window and type the following:
$ sudo apt-get install java-package sun-java6-jdk

This may take a few minutes, plus you will have to agree to the license.

  • Download the Flex SDK (see link above) and save it to your Download folder.
$ cd ~/Downloads/
$ wget http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4.5/flex_sdk_4.5.1.21328.zip
  • Create a folder to copy the files to:
$ sudo mkdir /opt/flex
  • Unzip the Flex SDK files:
$ cd ~/Downloads/
$ unzip flex_sdk_4.5.1.21328.zip -d flextmp
  • Copy extracted files to final resting place:
$ sudo mv flextmp/* /opt/flex/
  • Add Flex compiler path to “~/.bashrc”:
$ gedit ~/.bashrc

And add the following to the bottom of the file:

export PATH=/opt/flex/bin:$PATH
  • That should be it. To test just call the compiler (after closing any open terminals):
$ mxmlc -help
Categories: Flex, Linux, Software Development, Ubuntu Tags:

Installing Asterisk on Ubuntu Server 9.04

July 28th, 2009 5 comments

There are numerous sites and install guides out there detailing how to set-up Asterisk on Ubuntu. However most are either overly complicated, going into far too much detail for the purpose of installation, and others or not detailed enough, missing out steps and descriptions.

Here is my attempt at writing a usable guide…

Note: The text in quotes (like this) can be copied directly to the command line.
If there are multiple lines do them one at a time.

1)  System Set-up

I am assuming you have a fresh installation of Ubuntu 9.04 Server, if not you may already have these packages installed.

Ok, the first thing we need to do is get a few packages:

apt-get install subversion make linux-source kernel-package

We then need to get the “linux-kernel-headers” package. This is done in two steps:

apt-get install linux-kernel-headers

This command should return a message something like this:

...
Package linux-kernel-headers is a virtual package provided by:
 linux-libc-dev 2.6.28-13.45
You should explicitly select one to install.
...

So go ahead and install the suggested package:
(Remember to drop the version info ‘2.6.28-13.45’)

apt-get install linux-libc-dev

Next we need to install “linux-headers”. Again this is in two steps:

apt-get install linux-headers

You should get a message back similar to:

...
Package linux-headers is a virtual package provided by:
 linux-headers-2.6.28-13-server 2.6.28-13.45
 linux-headers-2.6.28-13-generic 2.6.28-13.45
 linux-headers-2.6.28-13 2.6.28-13.45
 linux-headers-2.6.28-3-rt 2.6.28-3.12
 linux-ports-headers-2.6.28-6 2.6.28-6.20
 linux-headers-2.6.28-6-386 2.6.28-6.20
 linux-headers-2.6.28-11-server 2.6.28-11.42
 linux-headers-2.6.28-11-generic 2.6.28-11.42
 linux-headers-2.6.28-11 2.6.28-11.42
You should explicitly select one to install.
...

Install the two “server” packages:

apt-get install linux-headers-2.6.28-13-server
apt-get install linux-headers-2.6.28-11-server

We then need to install a few more packages:

apt-get install libconfig-tiny-perl libcupsimage2 libcups2 libmime-lite-perl libemail-date-format-perl libfile-sync-perl libfreetype6 libspandsp1 libtiff-tools libtiff4 libjpeg62 libmime-types-perl libpaper-utils psutils libpaper1 ncurses-dev libncurses-dev libncurses-gst ncurses-term libnewt-dev libnewt-pic libxml2 libxml2-dev libspandsp-dev libspandsp1

2) Install Asterisk

First move to the correct directory:

cd /usr/src/

Now we can check out the source files:

svn co http://svn.digium.com/svn/asterisk/trunk asterisk
svn co http://svn.digium.com/svn/dahdi/linux/trunk dahdi-kernel
svn co http://svn.digium.com/svn/dahdi/tools/trunk dahdi-tools
svn co http://svn.digium.com/svn/libpri/branches/1.4/ libpri

We can then build them, starting with “libpri”:

cd /usr/src/libpri
make clean
make
make install

Then “DAHDI kernel”:

cd /usr/src/dahdi-kernel
make clean
make
make install

Then “DAHDI tools”:

cd /usr/src/dahdi-tools
make clean
./configure
make
make install
make config

And finaly “Asterisk”:

cd /usr/src/asterisk
make clean
 ./configure
 make
 make install
 make config

That should be it, restart the server and away you go. All you have to do next is configure Asterisk (that is for another post)…

Categories: Asterisk, Linux, Ubuntu Tags: