Difference between revisions of "Projects/kde.org/Staging Setup"

Jump to: navigation, search
(Setup of the Apache vHost for the Staging)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{note|This projects page has been moved to [[http://community.kde.org/KDE.org/Staging_Setup|community.kde.org]]. Please don't edit on techbase anymore.}}
 +
 +
 
__TOC__
 
__TOC__
  
Line 4: Line 7:
  
 
On the machine you use for this setup, you need to have installed a
 
On the machine you use for this setup, you need to have installed a
Linux/*BSD with a working Apache (1 or 2) with mod_php4. You will need at least the PHP4 modules pcre (for Perl compatible regular expressions) and xml (for the UTF-8 encoding). PHP5 is recommended.
+
Linux/*BSD with a working Apache (1 or 2) with mod_php4. You will need at least the PHP4 modules pcre (for Perl compatible regular expressions) and xml (for the UTF-8 encoding). You will need PHP to be built with mysqli support. PHP5 is recommended.
  
 
==Getting the needed module from SVN==
 
==Getting the needed module from SVN==
Line 46: Line 49:
 
    
 
    
 
       php_value safe_mode On
 
       php_value safe_mode On
       php_value include_path ".:<path_to_www>/media/includes"
+
       php_value include_path ".:<path to www>/media:<path_to_www>/media/includes"
 
        
 
        
 
       # enable .php, add .html here, for developer.kde.org
 
       # enable .php, add .html here, for developer.kde.org
Line 52: Line 55:
 
   </VirtualHost>
 
   </VirtualHost>
  
Note: Capacity doesn't work fine in subdirs of your documentroot, so it is recommended to setup a vHost for every kde site you intent to checkout.
+
{{note|Capacity doesn't work fine in subdirs of your documentroot, so it is recommended to setup a vHost for every kde site you intent to checkout. Alternatively, you may wish to add a symlink if your Capacity's media folder is elsewhere.}}
 +
 
 +
==Creating the database structure==
 +
 
 +
KDE.org uses MySQL to store database info. You will be required to first create a new database, and create a db_auth.inc file in Capacity's media/includes. Use the db_auth.inc.default as an example.
 +
 
 +
Then you should run the following SQL to get yourself an empty database structure: http://websvn.kde.org/*checkout*/trunk/www/sql/www-kde-org-tables.sql
 +
 
 +
To populate the database, you should run media/update_community_cronjob.php from Capacity.
  
 
==Using the Staging==
 
==Using the Staging==
Line 61: Line 72:
 
they are on their own domain, in their own vhost.
 
they are on their own domain, in their own vhost.
  
www.kde.org is now available under:
+
If you checked out www.kde.org (/trunk/www/sites/www) it is now available under:
   http://127.0.0.1:8080/sites/www
+
   http://127.0.0.1:8080/
  
pim.kde.org is now available under:
+
{{note|You may wish to reduce PHP's recommended error reporting level for developing websites, as the site does have a lot of E_STRICT bugs}}
  http://127.0.0.1:8080/areas/pim
+

Latest revision as of 23:36, 19 December 2010

noframe
 
Note
This projects page has been moved to [[1]]. Please don't edit on techbase anymore.


Contents


[edit] Needed Software

On the machine you use for this setup, you need to have installed a Linux/*BSD with a working Apache (1 or 2) with mod_php4. You will need at least the PHP4 modules pcre (for Perl compatible regular expressions) and xml (for the UTF-8 encoding). You will need PHP to be built with mysqli support. PHP5 is recommended.

[edit] Getting the needed module from SVN

You need to checkout the appropriate www module from our SVN, it's located in /trunk/www, most of the sites using Capacity are in /trunk/www/sites. The www module will be the documentroot of your apache, therefor keep care that the apache process can read this dir.

To make use of Capacity you also need to checkout /trunk/www/media, which keeps its sources.

[edit] Setup of the Apache vHost for the Staging

You need to setup a vHost for the staging, here an example to have some vHost for your localhost running on port 8080.

 # listen on this port, too (mostly in file "listen.conf")
 Listen 8080
 
 # staging vhost in a conf file
 <VirtualHost 127.0.0.1:8080>
     # set documentroot + 404 handler
     DocumentRoot <path_to_www>
     ErrorDocument 404 /media/404.php
     # depending on the default you might need to allow
     # access to the dir, so disable the following:
     #<Directory "<path_to_www>">
     #    Order allow,deny
     #    Allow from all
     #</Directory>
     # you might want to catch the logs in separate files:
     #ErrorLog /var/log/apache2/kde.org-error_log
     #CustomLog /var/log/apache2/kde.org-access_log combined
     # php part
     php_value short_open_tag Off
     php_value register_globals No
     php_value allow_url_fopen Off
     php_value disable_functions system,exec,passthru,proc_open,shell_exec,popen,symlink
 
     php_value safe_mode On
     php_value include_path ".:<path to www>/media:<path_to_www>/media/includes"
     
     # enable .php, add .html here, for developer.kde.org
     AddType application/x-httpd-php .php
 </VirtualHost>
noframe
 
Note
Capacity doesn't work fine in subdirs of your documentroot, so it is recommended to setup a vHost for every kde site you intent to checkout. Alternatively, you may wish to add a symlink if your Capacity's media folder is elsewhere.

[edit] Creating the database structure

KDE.org uses MySQL to store database info. You will be required to first create a new database, and create a db_auth.inc file in Capacity's media/includes. Use the db_auth.inc.default as an example.

Then you should run the following SQL to get yourself an empty database structure: http://websvn.kde.org/*checkout*/trunk/www/sql/www-kde-org-tables.sql

To populate the database, you should run media/update_community_cronjob.php from Capacity.

[edit] Using the Staging

After restarting your Apache, you should have a running staging area on http://127.0.0.1:8080. You can now simply access and test all *.kde.org sites within this vhost. They all will behave like they are on their own domain, in their own vhost.

If you checked out www.kde.org (/trunk/www/sites/www) it is now available under:

 http://127.0.0.1:8080/
noframe
 
Note
You may wish to reduce PHP's recommended error reporting level for developing websites, as the site does have a lot of E_STRICT bugs

This page was last modified on 19 December 2010, at 23:36. This page has been accessed 9,775 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal