bigbrovar

August 24, 2008

Speed up Amarok with Postgres

Filed under: Ubuntu — Bigbrovar @ 6:47 am

Amarok is argueably the best music player in the world. (ok that is my Opinion) But its really that good and i have yet to come across any music player that comes close .with  Wikipedia lookup and lyrics download  Magnatune integration, allowing no-cost full listening of all the music in their catalog, and DRM-free purchasing. sync  with any music player like your ipod or iphone . You can read more about amarok here http://en.wikipedia.org/wiki/Amarok_(audio)

one of the downside of amarok is that has  your music  library gets bigger amarok gets slowe and unstable.

Startup time take ages. This is because by Default Song collection, which includes specific folders on the filesystem. are stored in an internal SQLite database. The SQLite database struggles with very large music libraries.Thankfully amarok allows you to use an external Database like MySQL and Postgresql. i have tried MySQL before but the speed its gives you is nothing compared to what you get if you use postgresql .ok eneough talk lets get down to business. i am going to describe how i got my amarok to use postgres has database under Ubuntu .

First i installed Postgresql.

sudo aptitude install postgresql

Then we change the default password for postgres user

sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '<*password*>'"

*replace *password* with your password

example

sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '<yourpasswordhere>'"

Now we add a user to the postgres Database

sudo -u postgres createuser -D -A -P username

* username should be your systems user name

example

sudo -u postgres createuser -D -A -P bigbrovar

you would be promted for a password for the user you  just created .

Next we create a database for amarok

sudo -u postgres createdb -O username amarok

* replace username with your systems username. as we did in the last command

example

sudo -u postgres createdb -O bigbrivar amarok

Next we configure amarok to use the postgres database we just setup for it .

Open amarok .then go to  settings/configure amarok /collection

enter settings then using the username/password and amarok database just created. Set hostname to “localhost” and port to “5432“.

so using the examples i gave above

Database = Postgresql

Hostname = localhost

Database = amarok

Username = bigbrovar

Port = 5432

Password = password created for bigbrovar

*note the password should be the password of the user your added to the postgres database and not the Postgresql  password .

Hope it works for you .

1 Comment »

  1. sudo -u postgres createdb -O bigbrivar amarok
    pretty sure thats not what you ment
    its the last bit thats in bold.

    Comment by mynameistux — December 13, 2008 @ 3:12 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: