This guide can be used to install PHP applications like phpMyAdmin and Wordpress on the same VM as a MindTouch site.
If using VMPlayer on Windows, installing putty , a free SSH client, is suggested to facilitate copy/paste commands. To connect to a VM via putty, enable SSH login through VMPlayer first.
Installing a PHP application on the VM involves three steps:
After logging into the 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 MindTouch rewrite rules (on the VMs, this file is /etc/apache2/sites-available/dekiwiki). To edit this file, run:
pico /etc/apache2/sites-available/dekiwiki
A document similar to this one will be present. The section of interest is the part that tells MindTouch 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 - the documentation just hasn't been updated!)
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 MindTouch which folders to ignore. Simply update that first line to add the folders where to install the PHP applications:
RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|@gui|blog)/
In this example, the blog folder was also added. As many folders as desired can be added here.
After exiting out of pico, (Ctrl+X, "Y" for save), restart Apache:
/etc/init.d/apache2 restart
Now try accessing the new folder - it should return an Apache page and not a MindTouch 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.
Here are the step-by-step instructions walking through a Wordpress installation on the VM to the folder /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; either one or the other will exist. Whichever one exists have to 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 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 connected to the mySQL console, create the mySQL DB:
create database wordpress;
Quit the mySQL console:
exit;
Now, visit http://{mindtouch-url}/blog/ and the Wordpress installation screen should pop-up!
Observe, http://{mindtouch-url}/Blog/ or http://{mindtouch-url}/blog might not work, it is important
that it is typed in exactly http://{mindtouch-url}/blog/ (with lowercase letters and a slash at the end).
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by