image_alt_text

11

Jun/10

Linksys SPA3102 And FreePBX On Ubuntu 10.04

Friday, June 11th, 2010

Overview

I wanted to setup a Private Branch eXchange(PBX) system using Asterisk server at home. As I already had a traditional land line (PSTN or POTS line) I needed something to bridge the computer to the land line. My idea of having a PBX at was to route as many calls over VOIP which tends to be cheaper like Skype and still use a traditional landline for emergencies as well as just having a landline number.

History

Originally I started writing a post on how to get a PBX with a web interface going on Ubuntu 8.04. However once I had it all installed it wasn’t working 100%. I had issues with permissions and FreePBX had problems with the operation panel. Fast forward 2-3 years and I’m back doing it again but this time on the next LTS release and 7 minor release later from FreePBX.

Ubuntu 10.04 LTS

Asterisk

Asterisk is a free and open source software for PBX. It’s what you see in companies to manage and route all their phones calls. Asterisk is a PBX engine which has several front end engines and even a distribution specially for PBX box called Trixbox. If you just want a headless PBX then installing Asterix will suffice however I was not technically skilled enough to create all configuration files from scratch and also a nice front end will go a long way for the Wife Acceptance Factor (WAF). This is where FreePBX comes in.

FreePBX

FreePBX is GUI interface wrapper for Asterisk. Ubuntu has a FreePBX package in it’s repository. FreePBX uses a web front end so it can be accessed anywhere and makes administration a lot easier. It uses modules to extend the functionally like add-ons in Firefox. These include group pickup to Parking Lots.

With FreePBX this sorts out the software side of my PBX.

Linksys SPA3102

This an Analogue Telephone Adaptor(ATA) which is used to convert a land line to a digital network and a traditional land line phone to the network too. The hardware has been around for a long time and it does work with Asterisk. The SPA(Sipura)3102 can be used as a standalone PBX box too but in my case it will be used to forward incoming and outgoing calls.

The SPA3102 also has a web interface but it can also be used to act as a router at the same time. The web interface is very basic and not very user friendly but has a lot of options making it very customizable and configurable.

Asterisk And FreePBX Install

Switch to root user before installing sudo su.

Install MySQL sudo apt-get install mysql-server
When prompted for password enter one.

Install MySQL modules, PHP, kernel headers for compiling code, apt-get install build-essential linux-headers-`uname -r` openssh-server bison flex apache2 php5 php5-curl php5-cli php5-mysql php-pear php-db php5-gd curl sox libncurses5-dev libssl-dev libmysqlclient15-dev mpg123 libxml2-dev

Go to /usr/src cd /usr/src/
and download the Asterisk source files

xargs wget << SOURCES

http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.2.1+2.2.1.tar.gz

http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.10.2.tar.gz

http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.2.6.tar.gz

http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.2.0.tar.gz

SOURCES

Un-tar(zip) all the source files in /usr/src/ tar xvf dahdi-linux-complete-2.2.1+2.2.1.tar.gz
tar xvf libpri-1.4.10.2.tar.gz
tar xvf asterisk-1.6.2.6.tar.gz
tar xvf asterisk-addons-1.6.2.0.tar.gz

Compile Asterisk in the following order:
cd dahdi-linux-complete-2.2.1+2.2.1
make all && make install && make config
cd ../libpri-1.4.10.2
make && make install
cd ../asterisk-1.6.2.6
./configure
make && make install
make samples
cd ../asterisk-addons-1.6.2.0
./configure
make && make install
make samples
Download and extract extra sounds cd /var/lib/astersik/sounds
wget -O - http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-gsm-current.tar.gz | tar xvfz -

Create an Asterisk user account on the Linux box adduser asterisk --disabled-password --no-create-home --gecos "asterisk PBX user"
adduser www-data asterisk

Make a backup of the Asterisk configuration file cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig

Change the Asterisk config to run as a correct user sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf

Create the Asterisk service script which will start and stop the Asterisk demon:

cat > /etc/init.d/asterisk <<-END_STARTUP
#!/bin/bash
### BEGIN INIT INFO
# Provides: asterisk
# Required-Start: \$network \$syslog
# Required-Stop: \$network \$syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Asterisk daemon.
# Description: This script handles start/stop states of asterisk.
### END INIT INFO

set -e
set -a
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="Asterisk"
NAME=amportal
DAEMON=/usr/sbin/\$NAME

test -x \$DAEMON || exit 0

d_start() {
amportal start
}

d_stop() {
amportal stop
}

d_reload() {
amportal restart
}

case "\$1" in

start)
echo -n "Starting \$DESC: \$NAME"
d_start
echo "."
;;

stop)
echo -n "Stopping \$DESC: \$NAME"
d_stop
echo "."
;;

restart|force-reload)
echo -n "Restarting \$DESC: \$NAME"
d_stop
sleep 10
d_start
echo "."
;;

*)

echo "Usage: \$SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;

esac

exit 0
END_STARTUP

Ensure the permissions of the demon script is correct chmod 755 /etc/init.d/asterisk

Make Asterisk start up when the computer starts update-rc.d asterisk defaults 90 10

Download and extract FreePBX
cd /usr/src/
wget -O - http://mirror.freepbx.org/freepbx-2.7.0.tar.gz | tar xvfz -
cd freepbx-2.7.0/

Copy the Amportal configuration cp amportal.conf /etc/

Set environment variables for the current session. These variables will store the password for MySQL access so that the script can be 100% automated. One is the admin password and the other is the Asterisk database user password. These variables should clear once the terminal session ends but it is advised to remove them from the bash history in ~/.bash_history
export MYSQL_ROOT_PW=abcd
export ASTERISK_DB_PW=wxyz

Run the database scripts:
mysqladmin -u root -p${MYSQL_ROOT_PW} create asterisk
mysqladmin -u root -p${MYSQL_ROOT_PW} create asteriskcdrdb
mysql -u root -p${MYSQL_ROOT_PW} asterisk < SQL/newinstall.sql
mysql -u root -p${MYSQL_ROOT_PW} asteriskcdrdb < SQL/cdr_mysql_table.sql

mysql -u root -p${MYSQL_ROOT_PW} <<-END_PRIVS
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY "${ASTERISK_DB_PW}";
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY "${ASTERISK_DB_PW}";
flush privileges;
END_PRIVS

Edit the amportal configuration file with the database username and password
sed -i "s/# \(AMPDBUSER=.*\)/\1/" /etc/amportal.conf
sed -i "s/# \(AMPDBPASS=\).*/\1${ASTERISK_DB_PW}/" /etc/amportal.conf
sed -i "s@\(AMPWEBROOT=\).*@\1/var/www/@" /etc/amportal.conf
sed -i "s@\(FOPWEBROOT=\).*@\1/var/www/panel@" /etc/amportal.conf
sed -i "s@\(FOPWEBADDRESS=\).*@PUTIPADDRESS@" /etc/amportal.conf

Change the max PHP file upload size to 120mb in Apache
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php5/apache2/php.ini

Change the files and directories so that Asterisk has access to them
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /var/www/

Remove line ending from the Asterisk configuration file.
sed -i '1 s/\(\[directories\]\).*/\1/' /etc/asterisk/asterisk.conf

Start Asterisk
./start_asterisk start

Install FreePBX
./install_amp

Restart Apache server
/etc/init.d/apache2 restart

Create a symlink to the "Music On Hold"(MOH) files
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3

Start FreePBX
amportal start

Asterisk / PBX Terminology

Before I go into configuring the PBX itself it is worth knowing the terminology behind the technology.

  • Extension - Can be considered as an internal phone number. Each extension can be associated with a user and the user and the user can "roam" from phone to phone keeping their phone number.
  • Feature Codes - Special phone numbers which can put an extension to do not disturb (DND) so that no phone calls will get through to accessing voicemail.
  • Trunk - Provides services to the PBX such as land line or to allow calls to another PBX.
  • Routes - The path a call may go. Routes consists of inbound, calls coming in and outbound, calls leaving the system routes.
  • Dial Rules - Rules defined in ASCII characters which govern routes e.g Only free phone numbers are allowed to take the land line route. All other numbers should go out to a VOIP provider.
  • Channels - Number of simultaneous calls a trunk can handle

Configure FreePBX

First thing to do is set up extensions. Extensions are independent to any available routes as by default Asterisk treats any number dialled as an internal number. Below are steps to create 2 extensions. One number will eventually be assigned to the phone attached to the Linksys SPA3102 and the other for another hard/softphone.

  1. Go to Setup > Basic > Extensions menu item.
  2. Ensure "Generic SIP Device" is selected in the Devices drop down box.
  3. Enter the following details:
    1. User Extension - Phone number of extension E.G 1000
    2. Display Name - Friendly name
    3. Voicemail & Directory Status - Enable this if you want the user to have voicemail facilities
    4. Secret - Leave blank for now but this is the password for the extension.
  4. Submit the changes.
  5. Click on the new extension listed on the right hand side of the Extensions page. This will edit the extension
  6. Under Device Options section change the Mailbox by removing the @device suffix and just leave the extension number in the field.
  7. Submit the changes again.
  8. Repeat the steps above again to create a second extension, changing the extension number, display name and the mailbox setting E.G 1001
  9. Apply the changes to make it take effect.

At this point I would download a SIP softphone such as X-Lite on two computers and test out the 2 extensions created. Using the X-Lite or other softphones is beyond this article.

For Dialling out of the Sipura 3102 a Trunk is needed as well as configuring the outbound route.

  1. Go to Setup > Basic > Trunks in FreePBX
  2. Click on the Add SIP Trunk
  3. Fill in the following fields:
    1. Trunk Description - A friendly name for the trunk. This can be anything
    2. Outbound Caller ID - Full telephone number of the landline including area code.
    3. CID Options - Any
    4. Maximum Channels - 1
    5. Dial Rules - Leave blank
    6. Outbound Dial Prefix - Leave blank
    7. Trunk Name - A memorable name which will be used in the Sipura configuration
    8. Peer Details:

      canreinvite=no
      context=from-pstn
      host=[host]
      nat=no
      port=5061
      type=friend
      qualify=yes
      dtmfmode=rfc2833

      Change [host] to the IP address of computer hosting Asterisk / FreePBX and [username] to username to be used by Sipura

    9. Leave the remaining fields blank.
  4. Submit Changes.
  5. Go to Setup > Basic > Outbound Routes
  6. Click on 0 9_outside (or create a new one)
  7. Change the settings to as follows:
    1. All fields should be blank or left as default up to Dial Patterns.
    2. Dial Patterns - 9|.
    3. Trunk Sequence - Select the Trunk created above.
  8. Submit changes.
  9. Apply the changes.

The above setting outbound route requires a 9 to be dialled followed by the number to be dialled. The dial pattern can be changed later.

Create a new inbound route for the landline to Asterisk via SPA3102:

  1. Go to Setup > Inbound Call Control > Inbound Routes
  2. Change the following settings:
    1. Description - A meaningful name for the inbound route
    2. DID Number - Enter the landline telephone number including the area code.
    3. Set Destination - Set where the landline call should go to. This can be voicemail or an extension
  3. Submit changes.
  4. Apply Settings

It is worth mentioning here that there is a module in FreePBX called Ring Group which would allow a group of extensions to be named as a destination. This means anyone in the group will have their phone ring when someone rings the landline.

As a recommended step check if a password has been set on the admin web page. Clear out the browser's cookies and cache. Go to the Freepbx page and click on the FreePBX Administration link it should prompt for a password. If not edit the default admin account or add a new account under Setup > Basic > Administration

Notice there is a warning under "General Settings". This means the authentication has not been turned on. Submit the changes and apply them once completed. Go to the Freepbx box and edit the file /etc/amportal.conf Look for the line AUTHTYPE=none and change it from none to database.

Setting Up SPA3102

Out of the box the ATA is configured to act as a router and has the web interface disabled on the WAN port. I will be putting SPA3102 into an existing network so I need to enable the WAN port and turn off the DHCP. The WAN port needs to be enabled so that it can connect to the local network instead of the box expecting a modem and turning off DHCP will stop two devices assigning an IP to the computers on the network.

Plug a telephone into phone socket of the SPA3102 and the power in the power socket. Pick up the phone and dial ***** (5 asterisks) and then 7932 and then 1. Hang up or press #.

Now plug the network cable into the Internet port of the SPA3102 NOT THE ETHERNET PORT. Point your browser to the IP address of the SPA3102. To find out what the IP is you should be able to check on your router or dial ***** (5 asterisks) > 110 on your phone.

Just like a router, a webpage with settings and status of the device should appear. Use the screenshots below and set all the settings below:

The settings are for UK and I have change the tones in the Voice > Regional settings. Others such as the daylight savings are aligned to the UK time zone.

The following needs to be configured according to the environment.
Voice > Line 1 > Proxy and Registration

  • Proxy - IP address of the Linux box which will host the Asterisk and FreePBX software.

Voice > Line 1 > Subscriber Information

  • User ID - Extension set in FreePBX
  • Password - Leave blank initially for easier debugging but it should match the secret settings in the extensions

Voice > PSTN Line > Proxy and Registration

  • Proxy - IP address of the Linux box which will host the Asterisk and FreePBX software.

Voice > PSTN Line > Dial Plans

  • Dial Plan 2 - S0(<:xxxxxxxxxx>) where x is the phone number of your land land including the area code e.g 01323123456

Asterisk
Trixbox
FreePBX
Installing Asterisk and FreePBX on a vmware instance of Ubuntu 10.04 (Lucid) alpha3

8

Feb/10

MediaTomb DLNA To Playstation 3

Monday, February 8th, 2010

Overview

I found the Video plugin for MythTV 0.21 to be inadequate for streaming to the Sony Playstation 3. It didn’t update fast enough when you dropped a video into the UPnP directory and also there was no external way of telling it to refresh it’s list of files without starting up Myth Frontend.

MediaTomb

MediaTomb is a UPnP server which can run as a standalone or as a daemon. It uses an XML configuration file for it’s settings (pretty neat stuff) and is pretty small in size. The software comes with it’s own web server so you don’t have to install a full apache install to get to the control panel and it uses SQLite by default so no big database backend to be installed.

Install & Configure MediaTomb

Install MediaTomb and ffmeg thumbnailer
sudo apt-get install mediatomb ffmpegthumbnailer
That’s it for the install!

edit the file config file in /etc/mediatomb/config.xml and change the following settings:

Enable PS3 support change this:

<protocolInfo extend=”no”/><!– For PS3 support change to “yes” –>

to

<protocolInfo extend=”yes”/><!– For PS3 support change to “yes” –>

and also

<!– <map from=”avi” to=”video/divx”/> –>

to

<map from=”avi” to=”video/divx”/>

Add the line
<pc-directory upnp-hide="yes"/>
below
<webroot>/usr/share/mediatomb/web</webroot>
so that it looks like this
<webroot>/usr/share/mediatomb/web</webroot>
<pc-directory upnp-hide="yes"/>

This hides the full directory path from the Playstation so it can only view the directories added and not the full system.

Add the following to enable thumbnail previews. I have found this does not work 100% of the time.

Enable transcoding
<transcoding enabled="no">
to
<transcoding enabled="yes">

Add the following transcode mappings under <mimetype-profile-mappings> tag:

<transcode mimetype=”video/divx” using=”video-thumbnail”/>
<transcode mimetype=”video/mpeg” using=”video-thumbnail”/>
<transcode mimetype=”video/mp4″ using=”video-thumbnail”/>
<transcode mimetype=”video/x-ms-wmv” using=”video-thumbnail”/>

Add the following settings between the <profiles></profiles> elements. Not the parent is plural and each profile is singular.

<profile name=”video-thumbnail” enabled=”yes” type=”external”>
<mimetype>image/jpeg</mimetype>
<accept-url>yes</accept-url>
<thumbnail>yes</thumbnail>
<resolution>128×128</resolution>
<agent command=”/usr/bin/ffmpegthumbnailer” arguments=”-i %in -o %out -s 128″/>
<buffer size=”524288″ chunk-size=”512″ fill-size=”1024″/>
</profile>

Restart MediaTomb service sudo /etc/init.d/mediatomb restart If it fails to restart then double check the config file for errors.

Go to the machine in a web browser on port 49152 e.g http://localhost:49152

On this web page configures the directories available over UPnP. The Database section shows what directories are visible / registered to MediaTomb and Filesystem shows the computer directories that can be added for DLNA / UPnP visibility. When a directory is added MediaTomb scans the directory and register them so they show up on the Playstation. These can include music, videos and pictures.

In the top right hand corner there is a plus “+” with two arrows around it. Clicking on it loads a new page in the main window, replacing the file lists in the directory. This is the page for setting how often it scans for changes.

Go to the Playstation, turn it on and go to the relevant category e.g photo in the menu. There should be a MediaTomb server in the list. If it does not appear go towards the top and scan for more media servers to look for MediaTomb.

Summary

The software is pretty self contained but I would have liked the option to use Apache and MySQL because those are already installed on my system.

MediaTomb does the job for now and whilst I cannot get the thumbnails to work on all the media it still does a brillant job of streaming the media to the Playstation. Unfortunately it’s not integrated into MythTV so records will still have to be done via MythTV but this is not a problem because all recorded TV shows are registered in the database.

A problem I did encounter was that I added multiple directories but reguardless of where they reside on the computer, all videos appear in one directory on the Playstation. I’m not sure if this is a bug or how it’s suppose to work.

[HOWTO]:Stream DivX/XviD to a PS3 with firmware 2.10 using MediaTomb and Ubuntu 7

22

Jul/09

Ubuntu Music Streaming Server – Ampache

Wednesday, July 22nd, 2009

Overview

I wanted a music server for personal use so that I can access my music collection remotely or locally. A web front end with the ability to stream to various players would be key. It had to run on my Ubuntu system.

I do not / this article does not condone the use for piracy in any way.

GNUMP3d

GNUMP3d is a GNU music server. It is in the Ubuntu 8.04 repository and includes it’s own light weight server (good and bad points to this method). It’s all self contained so it does not require Apache or a database installed to run it.

The web front end is very basic with only text on the web page but has the ability to record statistics. Being a basic music server it does not support album art but it does have a lot of themes built in. All settings are changed in the config file but cannot be changed using the web front end. This means starting up SSH to even change a small setting like your chosen theme.

It runs on any system which has perl installed. The problem I had with this set up was the lack of user authentication. It had a “weak” and basic method of using a .password file which can be placed in the root of the music directory but this support was removed in the new version because it was “weak”. I do not want my server to be publicly accessible (that’s just asking for trouble). I went ahead and removed it.

Ampache

Ampache has more weight to it than GNUMP3d. It requires a web server, PHP and MySQL (Not tried it with any other database). It supports tags and album art, There is also an option for lyrics but I have yet to see this in action.

The music server has many options including different playlist formats:

  • M3U
  • M3U Simple
  • PLS
  • ASX
  • RAM
  • XSPF
  • And also different streaming formats like shoutcast as well as different playback methods. The best part about Ampache is the built in flash player. Just like the BBC Radio player it opens a new window with the player and controls.

    The web front end allows you to create and modify playlists, upload, download, and find duplicate music files. Ampache has built in access control level (ACL) which is basic but it works.

    There are only 2 themes included and last.fm plugin. The non default theme is “pretty” but I find the font to be too small and there is no way of changing it. It has statistics and recently played songs which are bonus features.

    Pre-Requisite To Ampache

    Install Apache and MySQL if not already done so:
    sudo apt-get install apache mysql
    When prompted, enter the root password.

    Ensure Apache is up and running by typing http://localhost in a web browser. A message saying “It works!” should appear.

    Optional:
    Install MySQL Administrator to easily maintain the MySQL database:
    sudo apt-get install mysql-admin

    The following steps are beyond the scope of this how to:
    Connect to the database using your root account (using MySQL Admin).

    Create a username and password for Ampache as well as a schema. For remained of this post I will user the username=Ampache and password=password using the database schema Ampache.

    Ensure the Ampache database user has all privileges to the Ampache schema.

    Install Ampache

    Download the latest Ampache from Ampache.org/”>http://Ampache.org/ In my case it was 3.5.1
    wget http://Ampache.org/downloads/Ampache-3.5.1.tar.gz

    Extract the compressed files:
    tar -xzvf Ampache-3.5.1.tar.gz

    Move (and rename) the directory Ampache-3.5.1 to the web directory (by default in /var/www). Depending on where you want to access Ampache will depend on where you move the directory. Do ONE of the following:

    For Ampache to appear in the “root” directory e.g http://www.dannytsang.co.uk move all the files in Ampache-3.5.1 to /var/www:
    cd Ampache-3.5.1
    sudo mv * /var/www

    For Ampache to appear in the sub directory e.g http://www.dannytsang.co.uk/Ampache move all the files in Ampache-3.5.1 to /var/www:
    sudo mv Ampache-3.5.1 /var/www/Ampache

    Ensure you have got your Ampache files in the place you want to access them. I had to re-install it because I kept the directory as Ampache-3.5.1 which made it http://www.dannytsang.co.uk/Ampache-3.5.1/
    To re-install I have to remove the file /etc/apache/config.d/Ampache and go back to the beginning to copying the file.

    Next step is to ensure the file permissions are set correctly. For method one:
    sudo chmod -R 774 /var/www

    For method two:
    sudo chmod -R 774 /var/www/Ampache
    sudo chown -R root:www-data /var/www/Ampache

    Head over to http://localhost or http://www.localhost/Ampache and follow the on screen instructions to install Ampache.

    Post Install

    Everything else can be configured from the web interface with the exception of the music directory. Where ever you want to add music to Ampache, you have to make sure it has at least xx4 (read) file permission otherwise the Apache / Ampache will not be able to see the file. If you want to allow Ampache to manage files e.g upload new music files to your library you will need to give it write access too. The best way to deal with this is to add www-data to your username group. Either way I do not recommend allowing write access for security reasons.

    Review

    Ampache Login Page

    I intend on using the server whilst I’m not at home e.g abroad or at work. I can listen to all my collection without carrying it around with me and now my iPhone has more juice. I only use my iPhone to listen to music when I’m not in the office or listen to podcasts.

    The reason why I won’t use it for podcasts is because it doesn’t have speed playback and no bookmarking feature which allows you to resume from where you left off.

    Flash Player

    The Flash player was usable. It showed a dark grey buffering bar and a light grey bar for the currently playing track. A good visual of how much has been downloaded from the stream. All the tracks for the current play list is shown along with the album art cover (nice touch).

    WMP Player

    M3U streaming to Windows Media Player (WMP) worked very well. It too showed the album art and this method I could use the media keys on the computer.

    Both players had reasonably good quality but the flash player lacked settings to adjust the buffer rate. The problem with both methods was the buffering. Not only did it need to buffer for each track but it had to re-buffer if a song has already played – something common to streaming media except for QuickTime.

    WMP did lack the track titles until it got to the track itself. All it shows is index in the play list for the track if it hadn’t gotten to it yet.

    I suffered a lot of pauses from the flash player because it had to buffer a lot through random moments through the day. However, WMP also had it’s buffering problems too but I could set the buffer limits to cope. When this happens I had to turn to the player to see what was going on, distracting me from work.

    Ampache Track List

    Playlists can be a powerful tool but in this case it’s pretty simply use. There is a current playlist which you add you tracks to. You can save this list determinately as one playlist which adds a date time stamp and your username. You cannot rename it to something more useful. The current playlist can be formed of multiple store playlists as well as adhoc tracks.

    Ampache supports tags and track ratings. Ratings can be changed online too. It includes the usual filtering and sort of tracks by artists and albums as well as search.

    Adding libraries are fairly easy. You give it a directory path and it will index the given path. Libraries may exist locally or remotely. Options to update, clean, etc will automate management of songs.

    Ampache ACL

    Working with Ampache User Access Control Level (ACL) was easy but may be too simple for power users. It has a drop down of all available groups for a given feature. The bad part is it assumes that any group above the selected group also has access to that feature. I believe it does not allow you to add new groups either.

    Summary

    Ampache is a good but media server. As always the user interface could be tweaked and a lot more plugins and features can be added e.g HTML 5 player, uPNP but that’s like asking for the world. The set up was very easily to do and does all the basics I want.

    GNUMP3d Website

    Ampache Website

    28

    Dec/08

    Enabling Remote Access To MySQL

    Sunday, December 28th, 2008

    I recently set up a virtual machine with Linux running on it to test stuff out. I ran into the issue which I have solved many times when I had installed my server at home which has a LAMP set up. By default MySQL restricts access to the database to only root (because this is the only account that have been created) and on the local machine access only.

    First edit the MySQL configuration file. On Fedora this is located at:
    /etc/my.cnf
    and comment out or delete this line:

    bind-address 127.0.0.1

    to

    #bind-address 127.0.0.1

    Save the file and edit the permissions in mysql
    mysql -u root -p
    A password prompt for root should appear. Once logged into MySQL execute this command:
    GRANT ALL PRIVILEGES ON *.* TO ''@'%' IDENTIFIED BY 'password'

    where:

    • GRANT ALL PRIVILEGES ON – Gives full access to…
    • *.* – All tables. May be replaced with database or schema name
    • ‘root’ – user to grant permission to. May be replaced with other user names
    • ‘%’ – Any host wildcard. Can be replaced with domain or IP address to allow user to connect from
    • ‘password’ – The password for the user. May had different passwords for different domain / location of connection e.g localhost can have one password and 192.168.0.1 may have another

    Restart MySQL:
    sudo /etc/init.d/mysql restart