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:
Once these commands have completed, you need to type these commands to install the Apache web server and SQLite:
Next, you need to install Pyplate itself. This command will download an installation script and run it as root:
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:
Restart Apache with this command:
In a browser on your PC or laptop, go to your Pi's IP address. You should see a sample page like this:
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:
If you have any questions, feel free to post a comment below.