Help:Install:Quick Install Joomla

From OpenLiteSpeed
Jump to: navigation, search

After you install OpenLiteSpeed, follow the instructions below to get your Joomla site working.

RPM install

yum install mysql mysql-devel mysql-server libxml2-devel gd-devel gcc gcc-c++ make patch

Build PHP

Build PHP (5.3.24, for example) with additional modules.
Go to the WebAdmin Console > Actions > Compile PHP.
'--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' 
'--enable-sysvsem' '--enable-sysvshm' '--enable-mbstring' '--with-iconv' '--with-mysql' 
Note: '--with-libdir=lib64' is for x86_64 systems.

Set up Joomla on a vhost

(Here we use the default virtual host "Example".)

Go to the WebAdmin Console > Configuration > Virtual Hosts > Example > General > Index Files.

Add "index.php".

Download Joomla

Put Joomla in the the virtual host document root /usr/local/lsws/DEFAULT/html (This puts all the files in the right directory for running Joomla on the virtual host "Example".)
cd /usr/local/lsws/DEFAULT/html/
mkdir joomla
cd joomla
unzip ../

Grant the web server user write permission to create config.php during installation

chown nobody .

Configure PHP for Joomla (for PHP 5.3 and below)

In PHP 5.3 and below, magic quotes are turned on by default. Joomla, however, requires that magic quotes be disabled. To do so, you will have to configure the php.ini file in /usr/local/lsws/lsphp5/lib/
If you don't have a php.ini file in this location, you can just copy the php.ini-production file from /usr/local/lsws/phpbuild/php-5.3.24 to this location and rename it "php.ini".
php.ini-production's setting should be compatible with Joomla. If you want to reconfigure the settings, the important ones for Joomla are:
output_buffering = Off
magic_quotes_gpc = Off

Make a database for Joomla

Even though it's not official Joomla material, a good example can be found on the WordPress site:

Add the following rewrite rule in to your virtual host to make Joomla work

Go to the WebAdmin Console > Virtual Hosts > Example > Rewrite.
Enable Rewrite > Yes.
Rewrite Rules >
Note: These rewrite rules are taken from the Joomla documentation. Any questions about them are probably best directed towards Joomla forums.
## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
## End - Custom redirects

RewriteBase /joomla

## Begin - Joomla! core SEF Section.
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* /joomla/index.php [L]
## End - Joomla! core SEF Section.

Graceful restart

So the changes will take effect (Actions > Graceful Restart).

Run the installation script

Point your browser to http://server_ip:8088/joomla