| 1 | |
|---|
| 2 | This README is provided as a quick installation guide for experienced users. |
|---|
| 3 | For more detailed information, see http://dev.phpeace.org/trac/wiki/Installation |
|---|
| 4 | |
|---|
| 5 | ======================= |
|---|
| 6 | REQUIREMENTS |
|---|
| 7 | ======================= |
|---|
| 8 | |
|---|
| 9 | Linux |
|---|
| 10 | Apache >= 2.0 |
|---|
| 11 | PHP 5.2 (compiled with curl, ctype, iconv, mbstring, soap, xsl libraries) |
|---|
| 12 | MySQL 5 |
|---|
| 13 | ImageMagick >= 6.3 |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | ======================= |
|---|
| 17 | SOFTWARE INSTALLATION |
|---|
| 18 | ======================= |
|---|
| 19 | |
|---|
| 20 | Login as root |
|---|
| 21 | |
|---|
| 22 | Create the directory where PhPeace will be installed |
|---|
| 23 | # mkdir /home/htdocs/myphpeace |
|---|
| 24 | |
|---|
| 25 | Uncompress the downloded archive (phpeace.tar.gz) in the directory you just created |
|---|
| 26 | # tar xzf phpeace.tar.gz -C /home/htdocs/myphpeace |
|---|
| 27 | |
|---|
| 28 | Give permissions to the user running PHP (generally the webserver user, apache) |
|---|
| 29 | # chown -R apache:apache /home/htdocs/myphpeace |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | ======================= |
|---|
| 33 | APACHE CONFIGURATION |
|---|
| 34 | ======================= |
|---|
| 35 | |
|---|
| 36 | Set up Apache to work with the two domains you will be using for the public website and for the administration interface. |
|---|
| 37 | Let's suppose you have www.mydomain.org and admin.mydomain.org pointing to your machine. |
|---|
| 38 | You need to create these two virtual hosts |
|---|
| 39 | |
|---|
| 40 | <VirtualHost www.mydomain.org> |
|---|
| 41 | ServerName www.mydomain.org |
|---|
| 42 | DocumentRoot /home/htdocs/myphpeace/pub |
|---|
| 43 | <Directory /home/htdocs/myphpeace/pub> |
|---|
| 44 | Options FollowSymLinks |
|---|
| 45 | AllowOverride All |
|---|
| 46 | </Directory> |
|---|
| 47 | </VirtualHost> |
|---|
| 48 | |
|---|
| 49 | <VirtualHost admin.mydomain.org> |
|---|
| 50 | ServerName admin.mydomain.org |
|---|
| 51 | DocumentRoot /home/htdocs/myphpeace/admin |
|---|
| 52 | <Directory /home/htdocs/myphpeace/admin> |
|---|
| 53 | Options FollowSymLinks |
|---|
| 54 | </Directory> |
|---|
| 55 | </VirtualHost> |
|---|
| 56 | |
|---|
| 57 | Reload Apache configuration |
|---|
| 58 | # /etc/init.d/apache2 reload |
|---|
| 59 | |
|---|
| 60 | ======================= |
|---|
| 61 | PHP CONFIGURATION |
|---|
| 62 | ======================= |
|---|
| 63 | |
|---|
| 64 | Check that the following PHP options are set accordingly in your webserver php.ini |
|---|
| 65 | safe_mode = Off |
|---|
| 66 | memory_limit = 32M |
|---|
| 67 | register_globals = Off |
|---|
| 68 | file_uploads = On |
|---|
| 69 | upload_max_filesize = 10M |
|---|
| 70 | post_max_size = 10M |
|---|
| 71 | |
|---|
| 72 | If you modify any of these settings, restart Apache |
|---|
| 73 | # /etc/init.d/apache2 restart |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | ======================= |
|---|
| 77 | DATABASE CONFIGURATION |
|---|
| 78 | ======================= |
|---|
| 79 | |
|---|
| 80 | Connect to MySql using a user with proper permissions (assuming root) |
|---|
| 81 | # mysql -p |
|---|
| 82 | |
|---|
| 83 | Create the database for PhPeace (let's call it mydatabase) with utf8 as character set |
|---|
| 84 | mysql> CREATE DATABASE mydatabase DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; |
|---|
| 85 | |
|---|
| 86 | Create a user for this database (let's call it myusername with password mypassword) |
|---|
| 87 | mysql> USE mysql; |
|---|
| 88 | mysql> GRANT ALL PRIVILEGES ON mydatabase.* TO 'myusername'@localhost IDENTIFIED BY 'mypassword'; |
|---|
| 89 | mysql> EXIT; |
|---|
| 90 | |
|---|
| 91 | Write the database information (mydatabase,myusername,mypassword) in |
|---|
| 92 | /home/htdocs/myphpeace/custom/config.php |
|---|
| 93 | |
|---|
| 94 | If you wish, read through config.php and customise the other available options |
|---|
| 95 | |
|---|
| 96 | To complete the installation, connect with a browser to |
|---|
| 97 | http://www.mydomain.org/phpeace/install.php |
|---|
| 98 | |
|---|
| 99 | Once finished the installation, remember to register your PhPeace to receive automatic updates |
|---|
| 100 | |
|---|
| 101 | |
|---|
| 102 | ======================= |
|---|
| 103 | SCHEDULER CONFIGURATION |
|---|
| 104 | ======================= |
|---|
| 105 | |
|---|
| 106 | Add this job into your crontab to be executed every 15 minutes |
|---|
| 107 | |
|---|
| 108 | */15 * * * * curl http://admin.mydomain.org/gate/cron.php -fs |
|---|
| 109 | |
|---|
| 110 | and set the scheduler IP in the configuration panel of the administration module |
|---|
| 111 | |
|---|
| 112 | |
|---|
| 113 | ======================= |
|---|
| 114 | VIRTUAL HOST EXAMPLE |
|---|
| 115 | ======================= |
|---|
| 116 | |
|---|
| 117 | If you want to setup a virtual host associated to a topic |
|---|
| 118 | |
|---|
| 119 | <VirtualHost *:80> |
|---|
| 120 | ServerName www.mytopic.org |
|---|
| 121 | DocumentRoot /home/htdocs/myphpeace/pub/mytopic |
|---|
| 122 | Alias /mytopic /home/htdocs/myphpeace/pub/mytopic |
|---|
| 123 | </VirtualHost> |
|---|