Changeset 30
- Timestamp:
- 11/26/07 00:03:26 (10 months ago)
- Files:
-
- trunk/INSTALL (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/INSTALL
r29 r30 3 3 Motilee 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. 4 4 5 == Fast installation == 6 7 Download the motilee tarball from [http://www.motilee.com/motilee.tgz]. Unpack it under your web root. Then browse to: 8 9 {{{ 10 http://localhost/motilee/frontend_dev.php 11 }}} 12 13 You 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 5 15 == Installation requirements == 6 16 … … 13 23 == Reminder on symfony deployment == 14 24 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 `mot yle/web/` directory should be directly accessible from the web.25 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 `motilee/web/` directory should be directly accessible from the web. 16 26 17 27 This means that an installation of Motilee requires in two steps: … … 21 31 - 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. 22 32 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]. 33 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.org/book/1_0/03-Running-Symfony symfony book]. 34 35 == Downloading the application == 36 37 Motilee 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 }}} 24 49 25 50 == Web server configuration == … … 27 52 The 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. 28 53 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 31 54 === Zero configuration === 32 55 33 56 This 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. 34 57 35 The installation is really straightforward: Move the mot yle files under the web root folder of your web server. Of course, you can directly unpack the tarball or do the repository checkout there.58 The 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. 36 59 37 60 You should end up with a file structure similar to: … … 40 63 Apache/ 41 64 www/ 42 mot yle/65 motilee/ 43 66 apps/ 44 67 batch/ … … 58 81 }}} 59 82 60 That's all. Now test mot yle by browsing to:61 62 {{{ 63 http://localhost/mot yle/web/frontend_dev.php83 That's all. Now test motilee by browsing to: 84 85 {{{ 86 http://localhost/motilee/web/frontend_dev.php 64 87 }}} 65 88 66 89 === Custom web root === 67 90 68 A better way to install mot yle 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 yousapplications:91 A 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: 69 92 70 93 {{{ … … 96 119 }}} 97 120 98 Edit both the `index.php` and the ` rontend_dev.php` files and change the third line to:121 Edit both the `index.php` and the `frontend_dev.php` files and change the third line to: 99 122 100 123 {{{ … … 102 125 }}} 103 126 104 Then, you need to change the mot yle 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:127 Then, 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: 105 128 106 129 {{{ … … 121 144 === Virtual Host === 122 145 123 Create a new virtual host to pbe able to access the forum application. To do so, open your Apache configuration's `httpd.conf` and add the following lines at the end:146 Create 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: 124 147 125 148 {{{ 126 149 <VirtualHost *:80> 127 ServerName mot yle.mysite.com128 DocumentRoot "/path/to/mot yle/web"150 ServerName motilee.mysite.com 151 DocumentRoot "/path/to/motilee/web" 129 152 DirectoryIndex index.php 130 <Directory "/path/to/mot yle/web" >153 <Directory "/path/to/motilee/web" > 131 154 AllowOverride All 132 155 Allow from All … … 135 158 }}} 136 159 137 Replace `mot yle.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://mot yle.mysite.com/frontend_dev.php160 Replace `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 {{{ 163 http://motilee.mysite.com/frontend_dev.php 141 164 }}} 142 165 143 166 === Troubleshooting === 144 167 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 mot yle directory:168 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 motilee directory: 146 169 147 170 {{{ … … 149 172 }}} 150 173 151 Try to reach the test page at `http://mot yle.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://mot yle.mysite.com/frontend_dev.php174 Try 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 {{{ 177 http://motilee.mysite.com/frontend_dev.php 155 178 }}} 156 179 … … 185 208 }}} 186 209 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].210 If 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]. 188 211 189 212 == Database configuration == 190 213 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 214 By 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 216 If you want tu use another database vendor, you will need to create the database first, then edit two files located in `motilee/config/`. 217 218 To 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 224 Change `motilee` to whatever name you want to give to your database. 225 226 The 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 197 230 // Modify lines 5 to 7 as follows 198 propel.database = mysql FRETEL231 propel.database = mysql 199 232 propel.database.createUrl = mysql://login:passwd@localhost/ 200 propel.database.url = mysql://login:passwd@localhost/mot yle233 propel.database.url = mysql://login:passwd@localhost/motilee 201 234 }}} 202 235 … … 209 242 }}} 210 243 211 The generated SQL code lies under `mot yle/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:244 The 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: 212 245 213 246 {{{ … … 215 248 }}} 216 249 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 `databa lses.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 mot yle/config/databases.yml250 This will create all the tables necessary to handle the forum topics, posts, views, etc. 251 252 The 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 223 256 // Modify lines 11 and 12 as follows 224 257 all: … … 227 260 param: 228 261 phptype: mysql 229 database: mysql://login:passwd@localhost/mot yle262 database: mysql://login:passwd@localhost/motilee 230 263 }}} 231 264 … … 236 269 }}} 237 270 271 For 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 238 273 == Managing users, forums and categories == 239 274 … … 241 276 242 277 {{{ 243 http://mot yle.mysite.com/forumAdmin278 http://motilee.mysite.com/forumAdmin 244 279 }}} 245 280 … … 248 283 == Forum configuration == 249 284 250 T he application configuration can be modified in the `motyle/apps/frontend/config/app.yml` file. The default configuration is reproduced below:285 To 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: 251 286 252 287 {{{
