Photo Collection - Installation Instructions For copyright notice and disclaimers, refer to the README file. For existing users, please read the UPGRADE files first. ------------ Notice: This program is far from being finished, and the database structure as well as the way pictures are stored might change any time. Please do not keep your only copy of your pictures in here. You've been warned! ------------ Please make sure you have everything listed in the requirements section of the README file installed and working properly. I won't explain how to install them individually here. Please refer to their respective installation instructions. ----- 1. Create the database ----- In a user other than the web server's user, load the mysql database definition file: mysqladmin create photo mysql -p photo < photo_database.sql This should ask you for a password and do everything automatically. ----- 2. Grant the web server some rights ----- Launch the mysql interactive query tool (mysql @localhost; GRANT SELECT, UPDATE ON cats TO @localhost; In case you don't know much about security in MySQL, here's a crash course: it doesn't use your UNIX /etc/passwd uid and password. It has its own list of users with its own list of passwords. So here's my recommendation: create a user for yourself with the same uid as your UNIX uid, and don't set any password. Restrict its access to localhost, so that way only you will access it. Then create a user, as outlined above, for the web server. Also, don't set any password, because httpd has restricted rights (it can only change data, not add, in the pics table). Unless you're on a shared system, you should be fine. Hopefully, in the future, I'll have better instructions. ----- 3. Copy the web files ----- Copy all the files in the web directory to somewhere in your web server's document directory. If for example Apache is in /usr/local/apache, then the typical location for the documents is in /usr/local/apache/htdocs. Create a directory there, say photo, and copy the contents of the web directory in there, including the pics directory. ----- 4. Configuration ----- In the web directory (that you've just moved somewhere else) is a file called config.inc. Edit it with your favorite text editor and change the values correspondingly. Each value should be clearly explained. You can also configure some default values in photo.pl, the console client. Refer to the top of the file for more instructions. ----- 5. Use the console client ----- The photo.pl should be ready for use. Check its first line to make sure it points correctly to your perl, and also check the configuration section, although it should be fine. Call the client with ./photo.pl -c and you should see an empty list of categories. You can create a new main category with ./photo.pl -C "your category name" Now check the number listed after the creation (the id of the new category), and do something like this, with your own image files: ./photo.pl -p -i your_file(s) And you should be ready to go! ----- 6. Test the web interface ----- Point your web browser to http://// If you don't know your host name, just try localhost, and use the directory you created under the web server document directory. For example: http://localhost/photo/ It should be working! ----- 7. Secure the installation ----- All updates made on the web interface are POST actions, and so you can use this in the web server configuration to limit the right of updating pictures' names to a few users. Read your web server documentation for more info. Also, to avoid having someone read your configuration (including the password), move the config.inc to somewhere outside of the web server's document root (for example to the configuration directory of apache, eg. /usr/local/apache/conf), and create a small replacement config.inc in the web directory that points to the other one: --------------- If something went wrong somewhere, please contact me at mbsat@andrew.cmu.edu with as much detailed information as you can give me, and we'll try to get you working quickly enough. Please, however, don't ask me how to install PerlMagick or something like that...