Changes between Version 26 and Version 27 of GetStartedWithTheCode


Ignore:
Timestamp:
Nov 23, 2007 11:12:02 AM (10 years ago)
Author:
quitelost
Comment:

Removing "old style". And other things

Legend:

Unmodified
Added
Removed
Modified
  • GetStartedWithTheCode

    v26 v27  
    11[[PageOutline]] 
    2 == Developers who offer to help with: == 
     2== Developers offering help == 
    33Micha (lupochen): CSS-structure (including YAML-Framework), simple questions about PT 
    4 == Developers who need help with: == 
     4== Developers needing help == 
    55 
    66== Step by step instruction  == 
     
    1414 *[http://www.bevolunteer.org/forum/index.php?topic=819.0 getting started with the TB code] 
    1515 
    16 == New style == 
     16== Installation == 
    1717''Coordinated by guaka'' 
    1818 
    1919We want to make it a lot easier to get started. 
    2020 
     21 
     22=== Mac OS X, GNU/Linux, other Unices === 
     23 * Check out the latest version from the Subversion repository. See: [wiki:Download]. 
     24 * For further instructions, please refer to [https://public:@www.bewelcome.org/svn/hcvol/trunk/INSTALL hcvol/trunk/INSTALL] in the repository. 
     25 
    2126=== Windows === 
    22  
    23 See 
    24 [[TicketQuery(description~=GetStartedWithTheCode)]] 
    2527 
    2628We're working on a one-file installer, that includes WAMP. You will be able to just unzip the file, launch a batch file, and off you go. It will come with read-only access to the repository, but you can send patches to developers with write access or request write access. 
     
    2830 1. Download the file https://www.bewelcome.org/svn/develstuff/trunk/wamp/bw-rox_wamp.zip  
    2931 
    30  2. unzip it in C:\wamp (It has to be exactly this path, unless you want to twiddle with the Apache configuration.) 
     32 2. Unzip this file in C:\wamp (It has to be exactly this path, unless you want to twiddle with the Apache configuration.) 
    3133  * Maybe someone can add what exactly needs to be changed, if you want a different path? 
    3234 
    3335 3. edit C:\wamp\wampmanager.ini 
    3436  * Find the section named [Menu.Left] 
    35   * In this section, there are some filesystem paths that are supposed ot point to your browser. You need to check if they are correct, and modify them if necessary. Otherwise, some menu items in wamp tray menu will not work. ("Could not execute menu item") 
     37  * In this section, there are some file system paths that are supposed to point to your browser. You need to check if they are correct, and modify them if necessary. Otherwise, some items in the menu of WAMP in the system tray will not work ("Could not execute menu item"). 
    3638 
    37  4. run any *.bat files, until you see the wamp icon in the tray menu, saying "both services running". 
     39 4. Run any *.bat files, until you see the WAMP icon in the system tray, saying "both services running". 
    3840  There are four of them that look promising: 
    3941  * C:\wamp\install_mysql_service.bat 
     
    4143  * C:\wamp\install_services_auto.bat 
    4244  * C:\wamp\launch_wampserver.bat 
    43   Anyways, guaka (and lemonhead as well) can get the wamp tray icon. 
     45  Anyways, guaka (and lemonhead as well) can get the WAMP tray icon. 
    4446 
    45  5. Left-click on the wamp icon, and try "phpMyAdmin" and "localhost" in the menu 
     47 5. Left-click on the WAMP icon, and try "phpMyAdmin" and "localhost" in the menu. 
    4648 
    47  6. rename htdocs/config.inc.php.example to config.inc.php and modify the configuration settings       
     49 6. Rename htdocs/config.inc.php.example to config.inc.php and modify the configuration settings       
    4850  (FUTURE: ''This should be done for you in the .zip file.'') 
    4951 
    5052Someone needs to explain point 6 please !!! I don't find any "htdocs" folder with this file. -- lemonhead 
    5153 
    52  7. How do I get the database running? This should be a part of these instructions!! 
     54 7. How do I get the database running? This should be a part of these instructions! 
    5355 
    5456 
     
    7274 
    7375 
    74 === Mac OS X, GNU/Linux, other Unices === 
    75  * Get the latest from subversion. 
    76  * Please refer to INSTALL. 
    77  
    78 ---- 
    79  
    80 == Current, old style: Steps to take == 
    81 === Install Apache, PHP, MySQL === 
    82  
    83  * Apache is webserver software, which can turn your local machine into a web server. 
    84  * PHP means both a programming language, and the interpreter engine used to run any code in this language. With php, you can dynamically create a new webpage on the server, and then send it as html to the browser. 
    85  * MySQL is a database server. The central concepts are databases and users. A database consists of tables. And a user can have different read/write permissions on different databases. Usually when you install a new software on the server (like a blog, or a wiki, or whatever) you will have to create one new database, and one new user, and connect them. You can do all of this with phpMyAdmin. MySQL users are not the same as the users who will finally use your software!!! (for instance, one mediawiki can have thousands of registered web users, but need only one mysql user! 
    86  * phpMyAdmin is a tool to manage your MySQL databases, included in WAMP. You can create new databases directly from the main page. To create a new user or manage access rights, you need to click "privileges". 
    87  
    88 You need to have all three installed, to run BeWelcome on your own machine. Fortunately there are convenient ways to get all 3 at once. 
    89  * Do NOT use XAMPP on Windows - you end up with strange problems and nobody can help. (And on GNU/Linux you need root access to use XAMPP, in which case you better properly install the stuff.) 
    90  * Try '''[http://www.wampserver.com WAMPSERVER]''' on Windows before digging deeper or asking questions. Additional steps needed for WAMP: 
    91   *enable gd lib in <tt>php\php.ini</tt> in the directory where wamp was installed (just remove the ";" comment symbol): 
    92  extension=php_gd2.dll 
    93  * '''[http://www.easyphp.org easyPHP]''' is also a good option. You'll need to: 
    94   * download at least v2.0beta 
    95   * set <tt>DocumentRoot</tt> in <tt>easyPHP/conf_files/http.conf</tt> to the htdocs directory of your repository 
    96   * don't forget to update the Directory directive some lines below to the same path! 
    97   * alter <tt>conf_files/php.ini</tt> and set  
    98  short_open_tag = on 
    99   * restart Apache afterwards 
    100   * create a DB and fill the tables with phpMyAdmin, accessible via <tt>http://localhost/home</tt> 
    101  
    102 === Install Subversion, Get the Code === 
    103  * Check out some information about Subversion (short name "svn"). 
    104  * Get username and password for svn access, probably from Hannu. 
    105  * Get a subversion client (e.g. [http://tortoisesvn.tigris.org/ Tortoise], [http://rapidsvn.tigris.org/ RapidSVN] or use the original command line tool). 
    106  * Get the source code at https://www.bewelcome.org/svn/hcvol/trunk/ 
    107  
    108 === command line tool === 
    109 On GNU/Linux, MacOS X and Cygwin you'll probably want to use the commandline tool: 
    110  * <tt>mkdir bewelcome && cd bewelcome </tt> 
    111  * <tt>svn checkout https://www.bewelcome.org/svn/hcvol/trunk/ .</tt> 
    112  
    113 === Set up the Database === 
    114  
    115  1. Download the test-database dump from https://www.bewelcome.org/svn/develstuff/trunk/testdb/  
    116  1. Create a new database, e.g. <tt>mtb</tt> 
    117  
    118 # Close Skype, if you have it running (Skype is known for taking over the ports Apache would use otherwise, Apache ports can can be set in apache config files but a quick workaround is to shut down Skype while you start up WAMP - you can restart Skype after that) 
    119 # Go to [http://localhost/phpmyadmin/ http://localhost/phpmyadmin/] 
    120 # On the right side of the screen, you should see "Create new database" 
    121  
    122 | 
    123 Please explain more!!! I'm using WAMP5 on WinXP, and it says "All services running - server offline". Kasper said I should launch phpMyAdmin from the leftclick menu on WAMP tray icon, which sends my browser to http://localhost/phpmyadmin/, an address that is not found!! 
    124  
    125 What needs explanation: 
    126 * How do I "create a new db" ? Is this a command in WAMP, or what? 
    127 * What are the steps to do this (do I need some services to run before that can happen, etc). 
    128  
    129 -- User:Lemon-head|lemon-head 02:10, 13 September 2007 (CEST) 
    130  
    131  1. [http://dev.mysql.com/doc/refman/5.0/en/adding-users.html Create a new user], e.g. <tt>mtb</tt> 
    132  1. Add geographical data to the database by importing the files <tt>geonames_admincodes.sql.bz2</tt> and <tt>geonames_cache.sql.bz2</tt> from the folder <tt>/maintenance/mysql/</tt> of your svn repository into the database. This step is necessary to be able to create new profiles and users with your local website. 
    133  <small>Note 1: This step might cause problems, if you use phpMyAdmin: Older versions of phpMyAdmin couldn't import large files; if you run a new version, check upload_max_filesize and post_max_size in your php.ini file; furthermore, if you want to import bz2 files with phpMyAdmin uncompressed, php modules [bzip2] might be missing to do so. With files large as these, it is always a much better idea to use the mysql command line utility instead of phpMyAdmin. (e.g. <tt>bzcat geonames_admincodes.sql.bz2 | mysql mtb -u mtb -p</tt>)</small> 
    134  <small>Note 2: If you haven't made the svn checkout, download the files from <tt>https://www.bewelcome.org/svn/hcvol/trunk/maintenance/mysql</tt>.</small> (attention, this directory doesn't exist in the repository anymore, following paragraph might be the correct one? [[User:Narnua|Anu]] 20:50, 23 August 2007 (CEST)) 
    135  
    136  
    137 ==== phpMyAdmin ==== 
    138  * set it up (e.g. within phpMyAdmin create a new database and import the files from this directory) and an account for it (or if you use WAMP, you can just use root and an empty password). 
    139  
    140 ==== command-line ==== 
    141 {{{ 
    142 svn checkout https://www.bewelcome.org/svn/develstuff/trunk/testdb/ 
    143 cd testdb 
    144 $ mysql -u username -p 
    145 mysql> CREATE DATABASE mtb 
    146 mysql> Ctrl-D 
    147 $ gzip -d hcvoltest.sql.gz 
    148 $ mysql -u username -p mtb < hcvoltest.sql 
    149 }}} 
    150  
    151 === Provide and Edit Configuration Files === 
    152 In the following replace [repository] with the folder that contains your svn repository. 
    153 Configure: 
    154  * Set DocumentRoot in wamp/Apache2/conf/httpd.conf to the htdocs directory of your repository. 
    155  * On Unices you can try to <tt>cp setup/apache2/sites-enabled/001-bewelcome /etc/apache2/sites-enabled/</tt> 
    156  * Don't forget to update the Directory directive some lines below to the same path. 
    157  * Copy [repository]/htdocs/.htaccess.example to [repository]/htdocs/.htaccess . 
    158  * Be sure RewriteBase in [repository]/htdocs/.htaccess points to "/" (without quotationmarks) or whereever you want to run your BeWelcome site from. Eg. if /htdocs is not your webserver root, but a subdirectory of it, RewriteBase should point to "/htdocs/". 
    159  * Copy [repository]/htdocs/bw/lib/config.php.dist to [repository]/htdocs/bw/lib/config.php. 
    160  * Edit [repository]/htdocs/bw/lib/config.php. Modify the following variables. (These are relevant eg. when you experiment with the signup process.) 
    161  ** $_SYSHCVOL['EmailDomainName'] should point to your prefered host, which is probably "localhost". 
    162  ** $_SYSHCVOL['MailToNotifyWhenNewMemberSignup'] should point to your prefered e-mail address, which is something like "myusername@localhost". 
    163  * Copy [repository]/inc/config.inc.php.example to [repository]/inc/config.inc.php . 
    164  * Edit [repository]/inc/config.inc.php. Modify at least the following variables: 
    165  ** $db['dsn']  
    166  ** $db['user']  
    167  ** $db['password']  
    168  ** $env['baseuri']  
    169  : Example with wamp standard installation, using the root account: 
    170  
    171 {{{   
    172   // database dsn 
    173   $db['dsn']  = 'mysql:host=localhost;dbname=bewelcome'; 
    174   // username 
    175   $db['user']     = 'root'; 
    176   // password 
    177   $db['password'] = ''; 
    178   . 
    179   . 
    180   $env['baseuri']       = 'http://localhost/[repository]/htdocs/'; 
    181 }}} 
    182  
    183 === Run BeWelcome === 
    184 Now you should be able to make a request to the start page of BW and see the appropriate page in your browser. The login should be working. For login and testing purposes you can use one of the existing users (username/password): 
    185  
    186 It's probably easiest to make all passwords into "password", i.e. in MySQL you can do  
    187 {{{ 
    188  UPDATE  members SET password = PASSWORD("password") 
    189  :::<small>''This should be done for the test database that is given to developers.''</small> 
    190 }}} 
    191  * admin/password : full rights 
    192  * accepter/password : can accept your newly created member 
    193  * username/password : several usernames (such as hkroger, jeanyves) with different sets of rights. In case of problems please read the list of problems carefully (??). If this doesn't help, please contact one of the active programmers. 
    194  
    195 === Problems === 
    196 See [[#Troubleshooting]] 
    197  
    19876== See also == 
    19977 * [[BW development environment]] 
     
    20987 
    21088 
    211 ==Troubleshooting== 
     89===Troubleshooting=== 
    21290 
    21391Some common issues and solutions...