MindTouch Developer Center > Deki > FAQ > Integration > How do I...Install PHP apps on the VM?

How do I...Install PHP apps on the VM?

This guide can be used to install PHP applications like phpMyAdmin and Wordpress on the same VM as your Deki Wiki.

If you're using VMPlayer on Windows, you'll want to install putty , a free SSH client, so you can copy/paste commands. To connect to your VM via putty, you'll need to enable SSH login through VMPlayer first.

General guideline

Installing a PHP application on the VM involves three steps:

  1. Allow a folder to be accessible (tell Deki Wiki to ignore certain folders and not try to process the as pages)
  2. Download the PHP application
  3. Install!

Allowing a folder to be accessible

After you've logged into your VM (either with the VM Player or through SSH), in order to allow a folder to be web-accessible, find your Apache configuration file which contains the Deki Wiki rewrite rules (on the VMs, this file is /etc/apache2/sites-available/dekiwiki). To edit this file, run:
pico /etc/apache2/sites-available/dekiwiki

You'll see a document similar to this one. The section you're interested in is the part that tells Deki Wiki which folders to ignore. Note that at the writing of this document, the relevant section looks like this: (if it looks slightly different, don't worry - we just haven't updated this documentation in a while!)

RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|@gui)/
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} !^/favicon\.ico$
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]

 The first line tells Deki Wiki which folders to ignore. Simply update that first line to add the folders you plan on installing your PHP applications:

RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|@gui|blog)/

In my example, I've also added the blog folder. You can add as many folders here as you'd like.

After you exit out of pico, (Ctrl+X, "Y" for save), restart Apache:
/etc/init.d/apache2 restart

Now try accessing your new folder - it should return an Apache page and not a Deki Wiki page! After doing this, follow the instructions for installation of any PHP app. Easy!

Below is a step-by-step look at how to install WordPress as an example.

Specific installation steps for Wordpress

Here are the step-by-step instructions walking you through a Wordpress installation on the VM to the folder /blog/.

Tell Apache to allow access to /blog/

Edit the rewrite rules:
pico /etc/apache2/sites-available/dekiwiki

Update the line that resembles with a "|blog":

RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|@gui)/

becomes

RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|@gui|blog)/

Restart Apache:
/etc/init.d/httpd restart
or /etc/init.d/apache2 restart

Now, certain versions of Deki Wiki are installed in /var/www/dekiwiki and certain versions are installed in /var/www/deki-hayes; you'll either have one or the other. Whichever one you have go to that folder:
cd /var/www/dekiwiki;
or
cd /var/www/deki-hayes/;

Download the .tar.gz version of Wordpress from their download page:
wget http://wordpress.org/latest.tar.gz

Unzip Wordpress:
tar -xf latest.tar.gz --gzip

WordPress unzips into a wordpress folder, so you'll want to rename it:
mv wordpress blog

Make the blog folder writable for install:
chmod 775 blog

Give ownership of the blog to Apache:
chown -R www-data.www-data blog

Connect to mySQL to install the WP db:
mysql -uroot -ppassword

Once you're connected to the mySQL console, create the mySQL DB:
create database wordpress;

Quit the mySQL console:
exit;

Now, visit http://{your-deki-wiki-url}/blog/ and the Wordpress installation screen should pop-up!

Observe, http://{your-deki-wiki-url}/Blog/ or http://{your-deki-wiki-url}/blog might not work, it is important
that you type in exactly http://{your-deki-wiki-url}/blog/ (with small caps and a slash at the end)
 

    

Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08.2