Ampache
From Gentoo Linux Wiki
Contents |
[edit] Installing
Ideally, you will need to create a LAMP server. You will need to install the following:
- An HTTPD
- PHP/mod_php Note: you need php with the xml use flag enabled.
- MySQL
It is a good idea to add vhosts either to /etc/make.conf or copy www-apps/ampache vhosts into /etc/portage/package.use. You may want to install MPD, as well as some of the associated USE flags.
Finally, emerge www-apps/ampache.
Note: if you emerged ampache with vhosts flag, you need to run
webapp-config -I -h <host> -d ampache ampache <version>
first. To install it in the default host, replace <host> with "localhost".
[edit] Create the database
Connect to mysql as root and create a new database:mysqladmin create ampache --user=root --password
Create a new user, "ampache":
mysql mysql -u root -p mysql>CREATE USER ampache IDENTIFIED BY 'ampache_pass'; mysql> GRANT ALL PRIVILEGES ON ampache.* TO 'ampache';
[edit] Edit the config file
Make sure that the web_path variable is set:
| File: /var/www/localhost/htdocs/ampache/config/ampache.cfg.php.dist |
#################### # Path Vars # #################### # The path to your ampache install # Do not put a trailing / on this path # For example if your site is located at http://localhost # than you do not need to enter anything for the web_path # if it is located at http://localhost/music you need to # set web_path to /music # DEFAULT: "" web_path = "/ampache" |
Now you have to enter you database information:
| File: /var/www/localhost/htdocs/ampache/config/ampache.cfg.php.dist |
############################### # Session and Login Variables # ############################### # Hostname of your Database # DEFAULT: localhost local_host = localhost # Name of your ampache database # DEFAULT: ampache local_db = ampache # Username for your ampache database # DEFAULT: "" local_username = ampache # Password for your ampache database, this can not be blank # this is a 'forced' security precaution, the default value # will not work # DEFAULT: "" local_pass = ampache_pass |
[edit] Test your install
Now just head over to http://localhost/ampache/, and follow the install procedures. All of the configuration should be done already for you, just continue to the last step, creating a user.
