Quantcast




A new version of the software that powers this site is now available for beta testing at Pyplate. Check out the installation instructions, and build your own Raspberry Pi powered site. Now includes seven free themes.

Follow me on Twitter and Google+

Google+







submit to reddit       
       

Install Pyplate on a Raspberry Pi with Apache

Pyplate is the content management system that powers this web site.  It's written in Python, and it's designed to be compact enough to easily run on a Raspberry Pi.  In this article, I'll show you how to install Pyplate on a Raspberry Pi running Raspbian and Apache.  

Prepare your Raspberry Pi

First, make sure your Pi can access the internet.  Make sure your Pi is up to date by typing these commands in a terminal:

sudo apt-get update
sudo apt-get upgrade

Once these commands have completed, you need to type these commands to install the Apache web server and SQLite:

sudo apt-get install apache2 libapache2-mod-wsgi python-libxml2

Install Pyplate

Next, you need to install Pyplate itself.  This command will download an installation script and run it as root:

curl http://www.pyplate.com/install_apache.sh | sudo bash

Note, the default Apache web root directory will be moved to /var/www2 and replaced with a new copy of /var/www

The installation script enables Apache's rewrite module, and downloads the Pyplate code.  Most of the scripts in Pyplate are stored in /var/www/wsgi-scripts, and Pyplate's data is unpacked into /usr/share/pyplate.

The script will generate a temporary password of eight random characters.  Make a note of this so that you can log into the admin area of your new site.  The default username is admin.  You can change the username and password later. 

There are a couple of changes that you need to make to Apache's configuration.  Use these commands to back up the default virtual host file, and replace it with one supplied with Pyplate:

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.backup
sudo cp /usr/share/pyplate/sample_configs/apache2/default /etc/apache2/sites-available/default

Restart Apache with this command:

sudo service apache2 restart

In a browser on your PC or laptop, go to your Pi's IP address.  You should see a sample page like this:

Pyplate sample page

Click on the link for the Dashboard, and log in with the user name and password created by the installation script.  Take a look around the admin area.  You can change the password to something more memorable, and delete the sample page.

Once you've installed Pyplate, it's import to to run this command to delete a script used by the Pyplate installer:

sudo rm /usr/lib/cgi-bin/create_password_file.py

If you have any questions, feel free to post a comment below.

See also:

Pyplate How-To pages
Get your Raspberry Pi web site online


Comments

Comments

comments powered by Disqus