Are you upgrading? If you have a previous installation of phpMyRecipes, please see the UPGRADE.txt file for instructions as to how to correctly do this. ------------------------------------------------------------------------------- QUICK INSTALLATION 1. Download the phpMyRecipes-1.2.0.tar.gz package to a temp directory (like /tmp) on your server. You can get the distribution from: http://php-myrecipes.sourceforge.net/ 2. Unpack the distribution to your webserver document area. For example, if you want the URL to be http://example.com/phpMyRecipes/ and your server document root is /var/www/html (RedHat default), execute the following: cd /var/www/html gzip -dc /tmp/phpMyRecipes-1.2.0.tar.gz | tar -xvf - 3. Change the ownership of the phpMyRecipes directory to the user that the webserver runs as. For example, if your webserver runs as the user "apache", execute the following command: chown -R apache /var/www/html/phpMyRecipes If you're not sure what user this is, don't worry. The install script will tell you in step 5. 4. (Optional) Rename the phpMyRecipes directory, if you want to call it something else. 5. Open the install script in your web browser by going to the URL (if you didn't change the directory name and your webserver is named example.com): http://example.com/phpMyRecipes/install/install.php ------------------------------------------------------------------------------- MANUAL INSTALLATION If you can't use the install script for some reason (for example, you can't change the ownership of the files because you don't have root access), manual installation is not much harder. For these instructions, we'll assume that the phpMyRecipes software is unpacked to the /var/www/html/phpMyRecipes directory. If you web server document root is different, or you changed the name of the phpMyRecipes directory, make sure you substitute in the appropriate places. 1. Start by following steps 1-4 of the quick installation instructions, above. 2. Change to the phpMyRecipes directory, and copy the common-dist.php file to common.php: cd /var/www/html/phpMyRecipes cp common-dist.php common.php 3. Open the common.php file in your favorite editor, and correctly set the configuration variables at the top of the file. Each one is documented as to what it needs to be set to. Save and exit when done. 4. Proceed with the Manual Database Configuration instructions (below). 5. Copy the styles-dist.css file to styles.css: cp styles-dist.css styles.css 6. Make sure the install scripts are inaccessible: chmod -R 0000 /var/www/html/phpMyRecipes/install Once database configuration is complete, you're ready to use phpMyRecipes. ------------------------------------------------------------------------------- MANUAL DATABASE CONFIGURATION If you are not able to use the quick installation script, you will need to configure the database by hand. You will need the 4 database settings that you set in step 3 above (DB_HOST, DB_USER, DB_PASS, and DB_DB). For the instructions below, we assume that you kept the defaults ("localhost", "recipes", "CHANGEME", and "recipes", respectively). 1. Using your preferred method, login to your database server as an administrative user. Specifically, you will need to be able to create databases and users. 2. Create the "recipes" (DB_DB) database: CREATE DATABASE recipes; 3. Create the "recipes" (DB_USER) user, with password 'CHANGEME' (DB_PASS) and grant the appropriate privileges on the database: GRANT ALL ON recipes.* to recipes IDENTIFIED BY 'CHANGEME'; 4. Select the "recipes" database: USE recipes; 5. Execute all of the SQL commands in the sql/mysql file under the phpMyRecipes directory (i.e. /var/www/html/phpMyRecipes/sql/mysql). This will create the database structure and load some basic data 6. Create an account within phpMyRecipes A. Using your web browser, go to your phpMyRecipes site (i.e. if your webserver is example.com, http://example.com/phpMyRecipes/) B. Click the "Login" button, then click the "Register" link. C. Use the form to create an account. Remember the username you created (for this example, we will assume it is "admin"). 7. Go back to the database client and update the database to give user management privileges to the user you just created: UPDATE users SET privs=4096 WHERE username="admin"; 8. Exit the database client The database is now configured for phpMyRecipes. You can use the "admin" account you created to login to phpMyRecipes and grant privileges to additional users.