Prerequires: ============ Server: * a working installation of mysql (3.23 or newer) or postgresql * vorbis-tools * id3-py (http://id3-py.sourceforge.net/) (Called python-id3 in debian) * libmad (http://www.underbit.com/products/mad/) * python * Python bindings for libmad, pymad. (http://spacepants.org/src/pymad/) * Python bindings for ogg/vorbis (http://www.vorbis.com/download_unix.psp) * Python bindings for mysql (1.1.8 or later if you use mysql 4.1) or * Python bindings for postgresql, psycopg is what is used. Command line client: * Python Webclient: * Webserver, i.e. Apache, with php-support * php xmlrpc-lib * php mysql bindings GTK2-client: * Python * Python bindings for Glade2, Gtk2 If you are using mysql: ======================= Install db Change the file /etc/mysql/my.cfg in debian, and /etc/my.cnf in redhat in the [mysqld] section to: # Read the manual if you want to enable InnoDB! innodb_data_home_dir = /var/lib/mysql/ innodb_data_file_path = ibdata1:10M:autoextend innodb_log_group_home_dir = /var/lib/mysql/ innodb_log_arch_dir = /var/lib/mysql/ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high set-variable = innodb_buffer_pool_size=16M set-variable = innodb_additional_mem_pool_size=2M # Set .._log_file_size to 25 % of buffer pool size set-variable = innodb_log_file_size=5M set-variable = innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 set-variable = innodb_lock_wait_timeout=50 If you want to know more aboute innodb; read section 7.5 in the MySql manual. Remove the skip-innodb line, if it exists. restart mysql: > /etc/init.d/mysqld restart MySQL is now configured to handle a mjuk database. We shall now create a user and a database for mjuk. Run: > mysql -uroot -ppassword mysql CREATE DATABASE mjuk CHARACTER SET 'ucs2' COLLATE 'ucs2_swedish_ci'; GRANT ALL PRIVILEGES ON mjuk.* TO mjuk@localhost IDENTIFIED BY 'some_pass'; quit; If you want to be able to access the mjuk acount in the db from any host and not only localhost, use the following line instead: GRANT ALL PRIVILEGES ON mjuk.* TO mjuk@'%' IDENTIFIED BY 'some_pass'; > mysql -umjuk -psome_pass mjuk source database/mjukdb.mysql (use mjukdb.mysql41 uf you use MySQL 4.1 and want to use ucs2 instead of latin1 as characterset. this is not needed on MySQL 5.0) source database/data.sql quit; If you are using postgresql: ============================ As a database admin: Create a dbuser for mjuk (Password, encrypted and can't create new databases or users): > createuser -P -E -D -A mjuk Create a database for mjuk (Set mjuk as owner): > createdb -O mjuk mjuk Create the tables in the DB, it will print a bunch of errors about missing tables and some notices about the creation of tables, ignore these: > psql -U mjuk mjuk < mjukdb.pgsql Create some users along the lines of data.sql, use htpasswd to create the encrypted password, then import the data. > psql -U mjuk mjuk < data.sql Importing your music collection into the database: ================================================== Edit the file mjuk.conf so your password and path etc is correct. Copy the file to /etc/mjuk You can also give the import directory as parameters to mjuk-importer run: mjuk-importer #to start: cd src/server python server.py #in another terminal: cd src/clients/commandline ./client.sh A test user 'other' has been created. It has 'other' as password.