Installing SiteSupra  Installing and Configuring Software Components

Installing and Configuring Software Components

  1. Install Apache with mod_rewrite module if you plan to hide index.php file name from URL address (please see virtual host configuration below).
  2. Install MySQL.
  3. Install PHP as an Apache module and not as CGI.
  4. Enable zlib library for PHP.
  5. Install Zend Optimizer.

Virtual Host Configuration

The below virtual host configuration has mod_rewrite rules added to hide index.php file name from URL address. Do not forget to set hideIndex parameter in .htsupra configuration file to 1. If you cannot use mod_rewrite then set hideIndex to 0.

<VirtualHost *>
    DocumentRoot /www/yourwebsite
    ServerName www.yourcompany.com
    AddType application/x-httpd-php .php
    DirectoryIndex index.php
    RewriteEngine on
    RewriteRule (.*)/(/.*)  $1$2 [N,NS]
    RewriteRule ^(.*/)\.ht(.*) - [F,NS]
    RewriteRule ^/index.php/(.*)  /$1 [NS]
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -f
    RewriteRule ^ - [L,NS]
    RewriteRule ^/([^/]*) - [NS,E=SUFILE:/$1]
    RewriteCond %{DOCUMENT_ROOT}%{ENV:SUFILE} -f
    RewriteRule ^ - [L,NS]
    RewriteRule ^(.*)$ /index.php$1 [L,NS]
</VirtualHost>
Greg Tobjasz, gtobjasz at craigmichaelsinc dot com | 27.11.2006 23:11
How do i do it in MS Windows
James Tidman, supra at tidmanfamily dot com | 20.03.2006 17:03
Here is a bash script to help set up the database privileges:

export USERNAME='mysql_username'
export PASSWORD='mysql_password'
export DATABASE=mysql_database_name

cat > set_privileges.sql <<EOF
GRANT USAGE ON $DATABASE.* TO $USERNAME@'localhost' IDENTIFIED BY $PASSWORD;

GRANT SELECT ON $DATABASE.* TO $USERNAME@'localhost';
GRANT INSERT ON $DATABASE.* TO $USERNAME@'localhost';
GRANT UPDATE ON $DATABASE.* TO $USERNAME@'localhost';
GRANT DELETE ON $DATABASE.* TO $USERNAME@'localhost';
GRANT CREATE ON $DATABASE.* TO $USERNAME@'localhost';
GRANT DROP ON $DATABASE.* TO $USERNAME@'localhost';
GRANT INDEX ON $DATABASE.* TO $USERNAME@'localhost';
GRANT ALTER ON $DATABASE.* TO $USERNAME@'localhost';
GRANT LOCK TABLES ON $DATABASE.* TO $USERNAME@'localhost';
EOF

# Login to MySQL as root
mysql -uroot -p

mysql> source set_privileges.sql
Please login to add comments.