1 Standard installation (webserver, database, cache) on Linux
This examples are only for Debian Linux.
For the operating system, here is list of shell commands for installing a basic LAMP stack:
Apache2: # apt-get install apache2 Activate Apache2 rewrite module: # ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/ # /etc/init.d/apache2 restart (or Nginx:) # apt-get install nginx MySQL: # apt-get install mysql-server mysql-client PHP5 with modules: # apt-get install php5 libapache2-mod-php5 php5-mysql php5-gd APC, MemCached: # apt-get install memcached php5-memcache php5-memcached # apt-get install php-pear # apt-get install php5-dev # apt-get install make # pecl install apc
Note:
- Currently we’ve only tested with PostgreSQL database server. MSSQL and Oracle are not supported yet, but planned.
- Memcached Guide
- Install and start phpfpm as described in this thread
1.1 Information on Load Balancing
Read some more words on load balancing for high performance portals
1.2 Apache 2 webserver settings
This can be different on different installations, so please check the settings of the webserver used by you.
Edit the (usually called) httpd.conf-settings.
On a Debain-system these settings are stored in the file: /etc/apache2/sites-available/www.
- Change the DocumentRoot to
/frontend/www - Change the other settings for directories to the shown below
- Remove Scriptaliases and other stuff
An example of a working-well default (http.conf)-file:
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.<portal>.com DocumentRoot <portal>/frontend/www/ <Directory /> Options -Indexes FollowSymLinks AllowOverride None </Directory> <Directory <portal>/frontend/www/> Options -Indexes FollowSymLinks Multiviews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Nginx If you use Nginx, the following lines can be used to configure you server in /etc/nginx/sites-enabled/default (default is only an example)
Be sure, the ###-marked lines are commented out!
upstream phpfpm { server unix:/var/run/php5-fpm.sock; #avoid sockets for nginx-fpm on Linux, they are good for BSD #server 127.0.0.1:9000; } server { # Listening on port 80 without an IP address is only recommended if you arenot running multiple v-hosts #listen 80; # Bind to the public IP bound to your domain listen 176.9.202.17:80; listen 10.0.1.3:80; # Specify this vhost's domain name server_name web1.lupus.gentics.com; root /var/www/portal_FSCR/frontend/www/; index index.php index.html index.htm; # Specify log locations for current site access_log /var/log/nginx/default-access.log; error_log /var/log/nginx/default-error.log warn; # stats location /nginx_status { stub_status on; access_log off; allow 78.142.159.226; deny all; } # Typically I create a restrictions.conf file that I then include across all of my vhosts #include conf.d/restrictions.conf; # I've included the content of my restrictions.conf in-line for this example # BEGIN restrictions.conf # Disable logging for favicon location = /favicon.ico { log_not_found off; access_log off; } # Disable logging for robots.txt location = /robots.txt { allow all; log_not_found off; access_log off; } # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac). location ~ /\. { deny all; access_log off; log_not_found off; } # END restrictions.conf # Typically I create a yiiframework.conf file that I then include across all of my yii vhosts #include conf.d/yiiframework.conf; # I've included the content of my yiiframework.conf in-line for this example # BEGIN yiiframework.conf # Block access to protected, framework, and nbproject (artifact from Netbeans) location ~ /(protected|framework|nbproject) { deny all; access_log off; log_not_found off; } # Block access to theme-folder views directories location ~ /themes/\w+/views { deny all; access_log off; log_not_found off; } # Attempt the uri, uri+/, then fall back to yii's index.php with args included # Note: old examples use IF statements, which nginx considers evil, this approach is more widely supported location / { try_files $uri $uri/ /index.php?$args; } # END yiiframework.conf # Tell browser to cache image files for 24 hours, do not log missing images # I typically keep this after the yii rules, so that there is no conflict with content served by Yii ### location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { ### expires 24h; ### log_not_found off; ### } # Block for processing PHP files # Specifically matches URIs ending in .php location ~ \.php$ { try_files $uri =404; # Fix for server variables that behave differently under nginx/php-fpm than typically expected fastcgi_split_path_info ^(.+\.php)(/.+)$; # Include the standard fastcgi_params file included with nginx include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_index index.php; # Override the SCRIPT_FILENAME variable set by fastcgi_params fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # Pass to upstream PHP-FPM; This must match whatever you name your upstream connection fastcgi_pass phpfpm; } }
Examples of configurations for Apache2 and Nginx are in scripts/examples/.
1.3 Gentics Content Connector for dynamic content
You need a Gentics Content Connector installed on an application server for requesting dynamic content. Configure the URL to the Gentics Content Connector in your portal configuration, i.e. http://localhost:8080/ccr/
Further information on Gentics Content Connector
We deliver a configuration of our demo server within the code of the portal. Go to scripts/examples/gentics_content_connector_config in your portal, adapt the configs and copy them to the Application server configuration, i.e. /opt/tomcat/conf/gentics/
1. Install Apache Tomcat http://www.ctrip.ufl.edu/tomcat6-debian-lenny-howto
2. Install Gentics Content Connector https://github.com/gtxcontentconnector/contentconnector/wiki
Download URL of Gentics Content Connector
Change the database settings in the properties-files to the correct settings. List of Gentics Content Connector config files in order of priority
- <name of your webapp, for example>ccr.properties – main config file for delivering personalized content
- content.properties – config for delivering binary content via content servlet
- nav.properties – config for navigation
- search.properties – config for search
- indexer.properties – config for search indexer
Other configs, most of them are for search
- ap.properties
- analyzer.properties
- autocompleteanalyzer.properties
- autocomplete.properties
- stopwords.list
- json.properties
- nodecr.properties
- social.properties
- velocity.properties
This is only an EXAMPLE!
(/
Restart the application server.
We suggest to rename the webapp to ccr.war before you deploy it into the application server.
1.4 GenticsImageStore for resizing images dynamically (module of CMS)
Make a symlink from published GenticsImageStore folder of CMS to frontend/www/
To use resized images from GenticsImageStore in your website or portal, link the published GenticsImageStore folder to frontend/www/ in your portal. It depends where the CMS publishes the folder on your system.
Alternatively you can deploy the GenticsImageStore webapp on your tomcat and configure your webserver to rewrite all /GenticsImageStore/* URLs to the webapp. The GenticsImageStore is part of the Gentics Portal.Node Java application, so please ask our sales for further information (sales@gentics.com).
This download only works with product key (as username) and license key (as password). Download URL
2 Download and Installation of Gentics Portal.Node PHP
Create directory, in which you want to store the Gentics Portal.Node PHP-files and move to this directory.
Follow the installation guide
2.1 Clear application cache of yii framework clear cache and assets
# yiic clearcache cache