Install Plone with Nginx on a Debian 8 VPS

plonelogoIn this article we will cover the steps needed for installing Plone CMS with Nginx on a Debian 8 VPS.

Plone is a free and popular open source content management system based on the Python programming language. It is built on top of the Zope application server and shares many similarities with WordPress.

Plone is positioned as an “Enterprise CMS” and it is very easy and flexible to use. Using Plone you can design, create and manage content rich websites. Plone is commonly used for intranets and as a groupware collaboration tool or a document publishing system.

High-profile public sector Plone users include the U.S. Federal Bureau of Investigation, Brazilian Government, United Nations, City of Bern (Switzerland), etc…

Please check Plone’s official documentation for more information.

Let’s start.

Login to your Linux VPS via SSH

# ssh root@server_ip

You can check whether you have the proper version of Debian installed on our server with the below command:

# lsb_release -a

Which should give you the underneath output:

Distributor ID: Debian
Description: Debian GNU/Linux 8.2 (jessie)
Release: 8.2
Codename: jessie

UPDATE THE SYSTEM

Make sure your server is fully up to date using:

# apt-get update && apt-get upgrade -y

Then, install some much needed dependencies and programs:

# apt-get install sudo build-essential libssl-dev libxml2-dev libxslt1-dev libbz2-dev zlib1g-dev python-setuptools python-dev

Also, it is desirable to use system packages for common libraries because the installer will use its own. Therefore execute the following command:

# apt-get install libjpeg62-turbo-dev libreadline-gplv2-dev python-imaging

INSTALL PLONE

Enter the /opt directory where you will download the latest Plone version which was 5.0 when this tutorial was written.

# cd /opt

# wget --no-check-certificate https://launchpadlibrarian.net/219047975/Plone-5.0-UnifiedInstaller.tgz

Unpack the downloaded archive:

# tar -xvzf Plone-5.0-UnifiedInstaller.tgz

Enter the unpacked directory:

# cd Plone-5.0-UnifiedInstaller

Before installing Plone, you may want to check the options that are available for the installation. Enter the below command to check them:

# ./install.sh --help

Once you ready to proceed with the installation, run the ‘install.sh’ script to install Plone. Please note that the sudo utility is required for a server-mode install, so use sudo to run the install script:

# sudo ./install.sh standalone

Once the installation is completed you should get the following output:

#####################################################################

######################  Installation Complete  ######################

Plone successfully installed at /opt/plone
See /opt/plone/zinstance/README.html
for startup instructions.

Use the account information below to log into the Zope Management Interface
The account has full 'Manager' privileges.

  Username: admin
  Password: 6NaLOcpsNExj

This account is created when the object database is initialized. If you change
the password later (which you should!), you'll need to use the new password.

Use this account only to create Plone sites and initial users. Do not use it
for routine login or maintenance.- If you need help, ask in IRC channel #plone on irc.freenode.net. - The live support channel also exists at http://plone.org/chat - You can also ask for help on https://community.plone.org - Submit feedback and report errors at https://github.com/plone/Products.CMFPlone/issues (For install problems, https://github.com/plone/Installers-UnifiedInstaller/issues)

The password, of course will be different than the one written above. If you somehow missed and didn’t save the admin pass, you can check it from the /opt/plone/zinstance/adminPassword.txt file.

INSTALL NGINX

Next you need to install the Nginx web server and setup a configuration file so you can run Plone by visiting your domain.

Install, start and enable Nginx to start on boot with the three below commands:

# apt-get install nginx

# systemctl start nginx

# systemctl enable nginx

Now, open a new Nginx configuration file.

# nano /etc/nginx/sites-available/plone

Paste the following:

 upstream plone {
    server 127.0.0.1:8080;
}

server {
    listen      80;
    server_name your_domain;

    access_log  /var/log/nginx/plone.access.log;
    error_log   /var/log/nginx/plone.error.log;

    proxy_buffers 16 64k;
    proxy_buffer_size 128k;
}

location / {
        proxy_pass  http://plone;
        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
        proxy_redirect off;

        proxy_set_header    Host            $host;
        proxy_set_header    X-Real-IP       $remote_addr;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header    X-Forwarded-Proto https;
    }

}

Do not forget to replace your_domain with your actual domain.

Enable the new configuration by creating a sym link:

# ln -s /etc/nginx/sites-available/plone /etc/nginx/sites-enabled/

Test the Nginx configuration:

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer
NVME 2 VPS

Now just $43 .99
/mo

GET YOUR VPS
# service nginx configtest

If everything is OK, you will get:

[ ok ] Testing nginx configuration:.

Restart Nginx:

# service nginx reload

Last thing you need to do is to start Plone. To do so, please run the below command:

# sudo -u plone_daemon /opt/plone/zinstance/bin/plonectl start

You should now open your favorite browser and navigate to your_domain. You will be welcomed with the page as shown in the picture below.

plone

 

Congratulations. If you followed our steps closely, you have successfully installed Plone with Nginx on your Debian 8 VPS.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services in which case you can simply ask our expert Linux admins to install Plone for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Comment