From: <b_s...@us...> - 2002-08-23 02:46:18
|
Update of /cvsroot/outreach/opt/setup In directory usw-pr-cvs1:/tmp/cvs-serv31356/setup Modified Files: manual.php Log Message: Added help and MIME import directions - the first Wiki contribution, BTW! :) Index: manual.php =================================================================== RCS file: /cvsroot/outreach/opt/setup/manual.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** manual.php 15 Aug 2002 20:42:11 -0000 1.1.1.1 --- manual.php 23 Aug 2002 02:46:14 -0000 1.2 *************** *** 1,186 **** ! <? ! # ! # Manual setup page ! # ! # Bogdan Stancescu <bo...@la...>, November 2001 ! # Revision 1.0 ! ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> ! <HTML> ! <HEAD> ! <TITLE>Outreach Project Tool Setup</TITLE> ! <LINK REL=STYLESHEET TYPE="text/css" HREF="../include/opt_css.php"> ! <? echo $_OPT["head_xtra"]; ?> ! </HEAD> ! <? ! /* ! ! IF YOU CAN SEE THIS IN THE BROWSER UPON SETUP THEN PHP IS ! NOT INSTALLED ON THIS SERVER! OPT WILL NOT WORK WITHOUT PHP! ! ! */ ! ! $inc="../include"; ! $lock="$inc/setup_lock"; ! include("$inc/general.php"); ! include("$inc/gui.php"); ! ! mainBody("../images"); ! make_main_title("Outreach Project Tool Manual Setup","../images"); ! ! if (!@unlink("$lock/lock01")) ! { ! if (!is_file("$lock/lock01")) ! { ! echo("<h4><strong>Failed</strong>: This system has already been set up.<br>You may copy the include directory ! again from the source over the installed one if you can't make out the settings.</h4>"); ! } ! else ! { ! ! echo("<h4><strong>Failed</strong>: Make sure user <i>".exec("whoami")."</i> has read/write rights within all of the ! opt/include directory.</h4>"); ! } ! exit; ! } ! exec("echo \"# OPT installation lock. Delete this file if you have problems installing!\" > $lock/lock01"); ! ?> ! <BODY> ! <h1>Manual OPT Installation</h1> ! <div class="regular" align="center"> ! <form action="./setup2.php" method="POST"> ! <table border="0" cellspacing="1" cellpadding="5" width="90%"> ! ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! Due to security or incompatibility reasons you have chosen to run a manual ! installation for OPT. ! <p>In this context "opt" is the directory you copied the OPT tree to - this ! convention will be used throughout this page with this meaning. ! <p>You may use the <a class="regular" href="./">setup scripts</a> if you find ! this too complicated. ! <p>The detailed instrustions for manual installation are listed below: ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>1. You must set up the <strong>opt/install/OPT_lib.php</strong> file. This file ! contains the main OPT variables. Currently this file should contain several ! lines with variable definitions set to null strings. Please edit the file and ! change those as appropriate. Please note that variable temp_CRM_dir should ! be set to an absolute path system root based (as opposed to document-root based). ! It should be set to a directory the user running Apache must have read/write ! access to. If you don't set this to <strong>/tmp</strong> or <strong>/tmp/OPT</strong> ! please make sure that user has enough permissions throughout the path to read the permissions ! in the respective directory. ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>2. Create the main database structure for the regular and demo databases. ! This is accomplished by running the sql file <strong>opt/setup/opt_init.sql</strong> in ! mySQL. You can do that from the command prompt, by running mysql with the following ! syntax: "<strong>mysql -u<username> [-p<password>] <db_name> < ! opt_init.sql</strong>".<br> ! Obviously, you do that from the opt/setup directory. You should skip the whole " ! <strong>[-p<password>]</strong>" parameter in case you're not using a password. ! for mySQL <i>(NOT RECOMMENDED!)</i><br> ! Do this twice, once with <db_name> set to the main database name and once for ! the demo database. ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>3. You must now set up a user and a company for the first login. Log in mysql ! ("<strong>mysql -u<username> [-p<password>]</strong>"). ! Now issue the following queries with <db_name> set to the regular database name:<br> ! use <db_name><br> ! insert ! into people ! set fname='Demo', lname='Admin', ! uname='admindemo', pwd=md5('admin'), company=1, email='a', ! lastlog='00000000000000', prevlog='00000000000000', status=1, preflang='en', id=1;<br> ! insert ! into people ! set fname='Demo', lname='Regular', ! uname='regdemo', pwd=md5('regular'), company=1, email='b', ! lastlog='00000000000000', prevlog='00000000000000', status=1, preflang='en', id=2;<br> ! insert ! into people ! set fname='Admin', lname='Admin', ! uname='adminuser', pwd=md5('admin'), company=1, email='admin', ! lastlog='00000000000000', prevlog='00000000000000', status=1, preflang='en', id=6;<br> ! insert into companies set shortname='Admin Company', status=1;<br> ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>4. You must now set up the demo users and databases. Log in mysql as above ! but using the demo database name for <db_name>. Run these:<br> ! use <db_name><br> ! insert ! into people ! set fname='Demo', lname='Admin', ! uname='admindemo', pwd=md5('admin'), company=1, email='a', ! lastlog='00000000000000', prevlog='00000000000000', status=1, preflang='en', id=1;<br> ! insert ! into people ! set fname='Demo', lname='Regular', ! uname='regdemo', pwd=md5('regular'), company=1, email='b', ! lastlog='00000000000000', prevlog='00000000000000', status=1, preflang='en', id=2;<br> ! insert into companies set shortname='Admin Company', status=1, id=1;<br> ! insert into companies set shortname='Regular Company', status=1, id=2; ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>5. Now you have to set up <strong>opt/include/phplib/crm_login.ihtml</strong>. Just one variable ! has to be set there, and you have to set it to the document-root absolute path to ! opt. For example, if opt is copied with the default name right in the server document root ! then you should set this to <strong>/opt</strong>. ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>6. You must now set up the newsletter distribution. This is done by triggering execution ! of <strong>opt/newsletter/nl_distribute/</strong> every day at midnight. So you must add a ! crontab entry for this to happen. We recommend any of two classic Linux programs for triggering ! the execution of the respective file: wget or lynx. Try executing them in this order and ! the one returning an error message is the one you'll use (if you don't have any of them ! you must install one - we recommend wget).<br> ! <i>What follows is not actually a good solution for anyone because it removes your current ! entries in crontab, but if you know what this is about then you know how you can preserve your ! current entries in crontab (crontab file). Otherwise you don't have any entries anyway, so it's ! ok. If you want to check if there are any crontab entries log in as root (or su) in a console ! and type <b>crontab -u <? system("whoami"); ?> -l</b> (the last letter is a lower-case "L").</i><br> ! Now you must execute the following from a terminal, replacing ,<strong><URL></strong> ! with the URL to the <strong>opt/newsletter/nl_distribute/</strong> directory. For example, ! if your root URL is "www.myserver.com" and you installed OPT as in the example above ! then <strong><URL></strong>="www.myserver.com/opt/newsletter/nl_distribute/"<br> ! For wget run <strong>echo "1 0 * * * wget -q -O - <URL> > /dev/null 2>/dev/null" ! | crontab -</strong><br> ! For lynx run <strong>echo "1 0 * * * lynx -source <URL> > /dev/null 2>/dev/null" ! | crontab -</strong><br> ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>7. You're done! Now you must remove the <strong>opt/include/setup_lock/lock01</strong> file so ! external users can't "set up" your OPT server again. ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>8. Ok, you're now ready to rumba. Log in using a browser and using the same ! URL as the one for this file, just removing the "setup/manual.html" from the ! end. The usernames and passwords set up for the initial login are: ! <p>adminuser/admin for log in as an adminstrator; ! <p>admindemo/admin for log in as demo administrator user (if enabled in OPT_lib.php) ! <p>regdemo/regular for log in as demo regular user (if enabled in OPT_lib.php) ! </td> ! </tr> ! ! </table> ! </form> ! </div> ! </BODY> ! </HTML> --- 1,169 ---- ! <? ! # ! # Manual setup page ! # ! # Bogdan Stancescu <bo...@la...>, November 2001 ! # Revision 1.0 ! ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> ! <HTML> ! <HEAD> ! <TITLE>Outreach Project Tool Setup</TITLE> ! <LINK REL=STYLESHEET TYPE="text/css" HREF="../include/opt_css.php"> ! <? echo $_OPT["head_xtra"]; ?> ! </HEAD> ! <? ! /* ! ! IF YOU CAN SEE THIS IN THE BROWSER UPON SETUP THEN PHP IS ! NOT INSTALLED ON THIS SERVER! OPT WILL NOT WORK WITHOUT PHP! ! ! */ ! ! $autorun=true; ! include("setup_lib.php"); ! ! ?> ! <BODY> ! <h1>Manual OPT Installation</h1> ! <div class="regular" align="center"> ! <form action="./setup2.php" method="POST"> ! <table border="0" cellspacing="1" cellpadding="5" width="90%"> ! ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! Due to security or incompatibility reasons you have chosen to run a manual ! installation for OPT. ! <p>In this context "opt" is the directory you copied the OPT tree to - this ! convention will be used throughout this page with this meaning. ! <p>You may use the <a class="regular" href="./">setup scripts</a> if you find ! this too complicated. ! <p>The detailed instrustions for manual installation are listed below: ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>1. You must set up the <b>opt/install/OPT_lib.php</b> file. This file ! contains the main OPT variables. Currently this file should contain several ! lines with variable definitions set to null strings. Please edit the file and ! change those as appropriate. Please note that variable $temp_CRM_dir should ! be set to an absolute path system root based (as opposed to document-root based). ! It should be set to a directory the user </i><? echo $apache_user; ?></i> must have read/write ! access to (typically '/tmp' or '/tmp/OPT'). If you don't set it to either, ! please also make sure that user has enough permissions throughout the path to read the permissions ! in the respective directory (yes, this phrase actually makes sense). ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>2. Create the main database structure for the regular and demo databases. ! This is accomplished by running the sql file <b>opt/setup/opt_init.sql</b> in ! MySQL. You can do that from the command prompt, by running mysql with the following ! syntax: "<b>mysql -u<username> [-p<password>] <db_name> < ! opt_init.sql</b>".<br> ! Obviously, you should do that from the opt/setup directory. You should skip the whole " ! <b>[-p<password>]</b>" parameter in case you're not using a password. ! for mySQL <i>(NOT RECOMMENDED!)</i><br> ! Do this twice, once with <db_name> set to the main database name and once for ! the demo database. ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>3. You must now set up a user and a company for the first login. Log in MySQL ! ("<strong>mysql -u<username> [-p<password>]</strong>"). ! Now issue the following queries with <db_name> set to the regular database name:<br> ! use <db_name><br> ! insert into people ! set fname='Demo', lname='Admin', ! uname='admindemo', pwd=md5('admin'), company=1, email='a', ! lastlog='00000000000000', prevlog='00000000000000', status=1, preflang='en', id=1;<br> ! insert into people ! set fname='Demo', lname='Regular', ! uname='regdemo', pwd=md5('regular'), company=1, email='b', ! lastlog='00000000000000', prevlog='00000000000000', status=1, preflang='en', id=2;<br> ! insert into people ! set fname='Admin', lname='Admin', ! uname='adminuser', pwd=md5('admin'), company=1, email='admin', ! lastlog='00000000000000', prevlog='00000000000000', status=1, preflang='en', id=6;<br> ! insert into companies set shortname='Admin Company', status=1;<br> ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>4. You must now set up the demo users and databases. Log in mysql as above ! but using the demo database name for <db_name>. Run these:<br> ! use <db_name><br> ! insert ! into people set fname='Demo', lname='Admin', ! uname='admindemo', pwd=md5('admin'), company=1, email='a', ! lastlog='00000000000000', prevlog='00000000000000', status=1, preflang='en', id=1;<br> ! insert into people ! set fname='Demo', lname='Regular', ! uname='regdemo', pwd=md5('regular'), company=1, email='b', ! lastlog='00000000000000', prevlog='00000000000000', status=1, preflang='en', id=2;<br> ! insert into companies set shortname='Admin Company', status=1, id=1;<br> ! insert into companies set shortname='Regular Company', status=1, id=2; ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>5. The next step is installing the help and the MIME type icons. This is a MySQL operation as ! well - issue the following from the MySQL prompt:<br> ! load data infile <opt>/setup/help.txt into table help;<br> ! load data infile <opt>/setup/admin_help.txt into table admin_help;<br> ! load data infile <opt>/setup/mime_translate.txt into table mime_translate;<br> ! load data infile <opt>/setup/mime_icons.txt into table mime_icons;<br> ! In all the queries above, you must replace <opt> with the path to your opt root, as ! described at the top of this page. ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>6. You must now set up the newsletter distribution. This is done by triggering execution ! of <b>opt/newsletter/nl_distribute/</b> with a cron job. You must therefore add a ! crontab entry for this to happen. We recommend any of two classic Linux programs (also ported to Windows) ! for triggering the execution of the respective file: wget or lynx. Try executing them in this order and ! use the one not returning a command not found error (if you don't have any of them ! you must install one - we recommend wget because it's faster and OPT doesn't need the extra functionality ! provided by lynx).<br> ! ! <i>What follows is not actually a good solution for anyone because it removes your current ! entries in crontab, but if you know what this is about then you know how you can preserve your ! current entries in crontab (crontab file). Otherwise you don't have any entries anyway, so it's ! ok. If you want to check if there are any crontab entries log in as root (or su) in a console ! and type <b>crontab -u <? echo $apache_user; ?> -l</b> (the last letter is a lower-case "L").</i><br> ! ! Now you must execute the following from a terminal, replacing ,<URL> ! with the URL to the <b>opt/newsletter/nl_distribute/</b> directory. For example, ! if your root URL is "www.myserver.com" and you installed OPT as in the example above ! then <URL> would be "www.myserver.com/opt/newsletter/nl_distribute/" ! (quotes shown for clarity - don't include them)<br> ! ! For wget run <b>echo "1 0 * * * wget -q -O - <URL> > /dev/null 2>/dev/null" ! | crontab -</b><br> ! For lynx run <b>echo "1 0 * * * lynx -source <URL> > /dev/null 2>/dev/null" ! | crontab -</b><br> ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>7. You're done! Now you must manually remove the <b>opt/include/setup_lock/lock01</b> file so ! other users can't "set up" your OPT server again. ! </td> ! </tr> ! <tr> ! <td bgcolor="#eeeefc" class="regular"> ! <p>8. Ok, you're now ready to rumba. Log in using a browser and type in the same ! URL as the current one file - just remove the trailing "setup/manual.html". ! The usernames and passwords set up for the initial login are: ! <p>adminuser/admin for adminstrator login; ! <p>admindemo/admin for administrator demo login (if enabled in OPT_lib.php) ! <p>regdemo/regular for regular demo login (if enabled in OPT_lib.php) ! </td> ! </tr> ! ! </table> ! </form> ! </div> ! </BODY> ! </HTML> |