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 pcDuino. In this article, I’ll show you how to install Pyplate on a pcDuino running Lubuntu and Apache.
Prepare your pcDuino
First, make sure your pcDuino can access the internet. Make sure your pcDuino is up to date by typing these commands in a terminal:
$ sudo apt-get update
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:
# apt-get install curl # 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 pcDuino’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.
$sudo rm /usr/lib/cgi-bin/create_password_file.py
See Also
Leave a Reply
You must be logged in to post a comment.