Changeset 30

Show
Ignore:
Timestamp:
11/26/07 00:03:26 (10 months ago)
Author:
francois
Message:

updated Installation docs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/INSTALL

    r29 r30  
    33Motilee is a regular symfony application. It requires only the files located under its own folder. Installing Motilee is quite straightforward if you already configured a symfony application before. If you don't know symfony, just follow this step-by-step tutorial and you should be done in a matter of minutes. 
    44 
     5== Fast installation == 
     6 
     7Download the motilee tarball from [http://www.motilee.com/motilee.tgz]. Unpack it under your web root. Then browse to: 
     8 
     9{{{ 
     10http://localhost/motilee/frontend_dev.php 
     11}}} 
     12     
     13You can test the application by browsing and searching the forums (populated with test data), creating a new user, adding a new message in a topic or creating a new topic in a forum. Eventually, don't forget to take a look at the administration interface by logging in as admin/admin. 
     14 
    515== Installation requirements == 
    616 
     
    1323== Reminder on symfony deployment == 
    1424 
    15 Motilee doesn't come with a graphical user interface for installation, because you should not let your server change files that are not under the public web root. Only the files located under the `motyle/web/` directory should be directly accessible from the web. 
     25Motilee doesn't come with a graphical user interface for installation, because you should not let your server change files that are not under the public web root. Only the files located under the `motilee/web/` directory should be directly accessible from the web. 
    1626 
    1727This means that an installation of Motilee requires in two steps: 
     
    2131 - When the application runs locally, transfer the files to production, either via (S)FTP, or via the preferred rsync-over-ftp method recommended by symfony. 
    2232 
    23 This is the same as for all symfony applications. If you want to learn more about symfony, and good practices of web applications deployment, refer to the [http://www.symfony-project.com/book/1_0/03-Running-Symfony symfony book]. 
     33This is the same as for all symfony applications. If you want to learn more about symfony, and good practices of web applications deployment, refer to the [http://www.symfony-project.org/book/1_0/03-Running-Symfony symfony book]. 
     34 
     35== Downloading the application == 
     36 
     37Motilee comes in two flavors: 
     38 
     39 - A preconfigured tarball, bundled with a SQLite database populated with test data. Download it at [http://www.motilee.com/motilee.tgz]. This version is completely customizable, ready to run out of the bix, but you may find it difficult to update it. 
     40  
     41 - A checkout from the motilee SVN repository, located at [http://svn.motilee.com/trunk]. This version is easier to upgrade, but requires an extra installation step. Once you have all the files downloaded to a directory, open a terminal, browse to the motilee directory, then build the object model with the symfony command line, and load the test data. If you are not familiar with the symfony commands, you just need to copy the following commands: 
     42 
     43{{{ 
     44$ cd /path/to/motilee 
     45$ php symfony propel-build-all 
     46$ php symfony clear-cache 
     47$ php symfony propel-load-data frontend 
     48}}} 
    2449 
    2550== Web server configuration == 
     
    2752The configuration of the web server may differ between the local server and the production server. Three methods are proposed here, choose the one that best fits your needs and constraints. 
    2853 
    29 For all methods, you need to download the project tarball and unpack it, or do a checkout of the motyle SVN repository ([http://svn.motilee.com/trunk]). You must also copy the sample application configuration file `motyle/apps/frontend/config/app.yml.sample` to `motyle/apps/frontend/config/app.yml`. Customize it as you wish. 
    30  
    3154=== Zero configuration === 
    3255 
    3356This method requires no change in web server or database configuration. It should work out of the box on all systems and is a good way to test the application and see if it fits your needs. However, you should not use this method in production, as it gives access to scripts and data files that should remain hidden to the end user. 
    3457 
    35 The installation is really straightforward: Move the motyle files under the web root folder of your web server. Of course, you can directly unpack the tarball or do the repository checkout there. 
     58The installation is really straightforward: Move the motilee files under the web root folder of your web server. Of course, you can directly unpack the tarball or do the repository checkout there. 
    3659 
    3760You should end up with a file structure similar to: 
     
    4063Apache/ 
    4164  www/ 
    42     motyle/ 
     65    motilee/ 
    4366      apps/ 
    4467      batch/ 
     
    5881}}} 
    5982 
    60 That's all. Now test motyle by browsing to: 
    61  
    62 {{{ 
    63 http://localhost/motyle/web/frontend_dev.php 
     83That's all. Now test motilee by browsing to: 
     84 
     85{{{ 
     86http://localhost/motilee/web/frontend_dev.php 
    6487}}} 
    6588 
    6689=== Custom web root === 
    6790 
    68 A better way to install motyle is to put the content of the motyle/web/ folder under your web root, and the rest under another directory outside of the web root. Let's assume that your host offers you two directories for yous applications: 
     91A better way to install motilee is to put the content of the motilee/web/ folder under your web root, and the rest under another directory outside of the web root. Let's assume that your host offers you two directories for your applications: 
    6992 
    7093{{{ 
     
    96119}}} 
    97120 
    98 Edit both the `index.php` and the `rontend_dev.php` files and change the third line to: 
     121Edit both the `index.php` and the `frontend_dev.php` files and change the third line to: 
    99122 
    100123{{{ 
     
    102125}}} 
    103126 
    104 Then, you need to change the motyle web root configuration by editing the file called `cgi-bin/apps/frontend/config/config.php`. You should ad the following lines at the end of the file: 
     127Then, you need to change the motilee web root configuration by editing the file called `cgi-bin/apps/frontend/config/config.php`. You should ad the following lines at the end of the file: 
    105128 
    106129{{{ 
     
    121144=== Virtual Host === 
    122145 
    123 Create a new virtual host top be able to access the forum application. To do so, open your Apache configuration's `httpd.conf` and add the following lines at the end: 
     146Create a new virtual host to be able to access the forum application. To do so, open your Apache configuration's `httpd.conf` and add the following lines at the end: 
    124147 
    125148{{{ 
    126149<VirtualHost *:80> 
    127   ServerName motyle.mysite.com 
    128   DocumentRoot "/path/to/motyle/web" 
     150  ServerName motilee.mysite.com 
     151  DocumentRoot "/path/to/motilee/web" 
    129152  DirectoryIndex index.php 
    130   <Directory "/path/to/motyle/web" > 
     153  <Directory "/path/to/motilee/web" > 
    131154    AllowOverride All 
    132155    Allow from All 
     
    135158}}} 
    136159 
    137 Replace `motyle.mysite.com` by the URL you want to give to the forum application, and `/path/to/motyle/` by the absolute path to the `motyle` directory in your system. After saving the file, you should restard Apache and check that the installation went fine by browsing to: 
    138  
    139 {{{ 
    140 http://motyle.mysite.com/frontend_dev.php 
     160Replace `motilee.mysite.com` by the URL you want to give to the forum application, and `/path/to/motilee/` by the absolute path to the `motilee` directory in your system. After saving the file, you should restard Apache and check that the installation went fine by browsing to: 
     161 
     162{{{ 
     163http://motilee.mysite.com/frontend_dev.php 
    141164}}} 
    142165 
    143166=== Troubleshooting === 
    144167 
    145 If you can't see the welcome screen, start by clearing the cache. To do so, type the following command from the root of the motyle directory: 
     168If you can't see the welcome screen, start by clearing the cache. To do so, type the following command from the root of the motilee directory: 
    146169 
    147170{{{ 
     
    149172}}} 
    150173 
    151 Try to reach the test page at `http://motyle.mysite.com/default/index`. If the problem persists, switch to the development environment to see explicit error messages by browsing to: 
    152  
    153 {{{ 
    154 http://motyle.mysite.com/frontend_dev.php 
     174Try to reach the test page at `http://motilee.mysite.com/default/index`. If the problem persists, switch to the development environment to see explicit error messages by browsing to: 
     175 
     176{{{ 
     177http://motilee.mysite.com/frontend_dev.php 
    155178}}} 
    156179 
     
    185208}}} 
    186209         
    187 If you still can't manage to setup the application correctly, refer to the [http://www.symfony-project.com/book/1_0/03-Running-Symfony#Troubleshooting symfony documentation] or find help in the [http://www.symfony-project.com/forum/index.php/f/6/ symfony forum]. 
     210If you still can't manage to setup the application correctly, refer to the [http://www.symfony-project.org/book/1_0/03-Running-Symfony#Troubleshooting symfony documentation] or find help in the [http://www.symfony-project.org/forum/index.php/f/6/ symfony forum]. 
    188211 
    189212== Database configuration == 
    190213 
    191 By default, Motilee runs a SQLite database located under `motyle/data/sandbox.db`. If your forum has a relatively low activity or if you don't want to setup a database, you can just keep the configuration as it is and upload the `sandbox.db` with the rest of the files. The application will run smoothly without further configuration. 
    192  
    193 If you want tu use another database vendor, you will need to edit two files located in `motyle/config/`. The first one is `propel.ini`. Symfony uses this file to determine the database connection when called via the Command Lne Interface (CLI). It will help you define a database structure in a list of SQL statements adapted to your database vendor. For instance, if you want to use a MySQL database:  
    194  
    195 {{{ 
    196 // In motyle/config/propel.ini 
     214By default, Motilee runs a SQLite database located under `motilee/data/sandbox.db`. If your forum has a relatively low activity or if you don't want to setup a database, you can just keep the configuration as it is and upload the `sandbox.db` with the rest of the files. The application will run smoothly without further configuration. 
     215 
     216If you want tu use another database vendor, you will need to create the database first, then edit two files located in `motilee/config/`. 
     217 
     218To create your database, use either your database command line or any client interface it comes with. For instance, if you want to use MySQL, you can type: 
     219 
     220{{{ 
     221$ mysqladmin -uroot -p create motilee 
     222}}} 
     223 
     224Change `motilee` to whatever name you want to give to your database. 
     225 
     226The first configuration file to change is `propel.ini`. Symfony uses this file to determine the database connection when called via the Command Lne Interface (CLI). It will help you define a database structure in a list of SQL statements adapted to your database vendor. For instance, if you want to use the MySQL database just created: 
     227 
     228{{{ 
     229// In motilee/config/propel.ini 
    197230// Modify lines 5 to 7 as follows 
    198 propel.database            = mysqlFRETEL 
     231propel.database            = mysql 
    199232propel.database.createUrl  = mysql://login:passwd@localhost/ 
    200 propel.database.url        = mysql://login:passwd@localhost/motyl
     233propel.database.url        = mysql://login:passwd@localhost/motile
    201234}}} 
    202235 
     
    209242}}} 
    210243 
    211 The generated SQL code lies under `motyle/data/sql/`. It consists of several `.sql` files that you can either open and execute one by one (through the database command line or via a PHPMyAdmin interface), or inject all at once to your database by using the symfony command line: 
     244The generated SQL code lies under `motilee/data/sql/`. It consists of several `.sql` files that you can either open and execute one by one (through the database command line or via a PHPMyAdmin interface), or inject all at once to your database by using the symfony command line: 
    212245 
    213246{{{ 
     
    215248}}} 
    216249 
    217 This will create a database named 'motyle' with all the tables necessary to handle the forum topics, posts, views, etc. 
    218  
    219 The second file that must be edited if you don't use SQLite is the `databalses.yml`. Symfony uses this file to determine the database connection at runtime. It must point to the same database DSN as the one defined in the `propel.ini`. 
    220  
    221 {{{ 
    222 // In motyle/config/databases.yml 
     250This will create all the tables necessary to handle the forum topics, posts, views, etc. 
     251 
     252The second file that must be edited if you don't use SQLite is the `databases.yml`. Symfony uses this file to determine the database connection at runtime. It must point to the same database DSN as the one defined in the `propel.ini`. 
     253 
     254{{{ 
     255// In motilee/config/databases.yml 
    223256// Modify lines 11 and 12 as follows 
    224257all: 
     
    227260    param: 
    228261      phptype:  mysql 
    229       database: mysql://login:passwd@localhost/motyl
     262      database: mysql://login:passwd@localhost/motile
    230263}}} 
    231264 
     
    236269}}} 
    237270 
     271For more information on database connection settings, you can refer to the [http://www.symfony-project.org/book/1_0/08-Inside-the-Model-Layer#Database%20Connections symfony model documentation]. 
     272 
    238273== Managing users, forums and categories == 
    239274 
     
    241276 
    242277{{{ 
    243 http://motyle.mysite.com/forumAdmin 
     278http://motilee.mysite.com/forumAdmin 
    244279}}} 
    245280 
     
    248283== Forum configuration == 
    249284 
    250 The application configuration can be modified in the `motyle/apps/frontend/config/app.yml` file. The default configuration is reproduced below: 
     285To start configuring the forum, copy the sample application configuration file `motilee/apps/frontend/config/app.yml.sample` to `motilee/apps/frontend/config/app.yml`. You can then modify this new file at will. The default configuration is reproduced below: 
    251286 
    252287{{{