|
| 1 | +--- |
| 2 | +html_meta: |
| 3 | + "description": "Install Plone 6" |
| 4 | + "property=og:description": "Install Plone 6" |
| 5 | + "property=og:title": "Install Plone 6" |
| 6 | + "keywords": "Plone 6, install, installation, installing, buildout, pip, docker" |
| 7 | +--- |
| 8 | + |
| 9 | +(install-index-label)= |
| 10 | + |
| 11 | +# Install Plone 6 |
| 12 | + |
| 13 | +This section focuses on installing Plone 6 for the developer, tester, or contributor. |
| 14 | + |
| 15 | +For trying out Plone 6, visit our official demonstration site located at: |
| 16 | + |
| 17 | +https://6.demo.plone.org/ |
| 18 | + |
| 19 | +```{todo} |
| 20 | +For deployment of Plone 6, visit TBD. |
| 21 | +``` |
| 22 | + |
| 23 | + |
| 24 | +(install-index-system-requirements-pre-requisites-label)= |
| 25 | + |
| 26 | +## System requirements and pre-requisites |
| 27 | + |
| 28 | +To install Plone 6, you must satisfy system requirements and pre-requisites. |
| 29 | + |
| 30 | +```{todo} |
| 31 | +Add any missing requirements, including disk space. |
| 32 | +``` |
| 33 | + |
| 34 | +- 2GB if using a container image, 4GB RAM if installing manually. |
| 35 | +- Disk space (TBD). |
| 36 | +- Either a UNIX-like operating system—such as Linux, Ubuntu, macOS—or Windows. |
| 37 | + For Windows, it is a good idea to use [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/). |
| 38 | + We strongly recommend using a recent version of your operating system released within the last 3 years. |
| 39 | + Older systems might not be supported. |
| 40 | +- Python 3.7, 3.8, or 3.9. |
| 41 | +- Node.js 14 or 16. |
| 42 | +- For Plone images, a container engine to develop, manage, and run OCI containers. |
| 43 | + |
| 44 | + |
| 45 | +(install-index-choose-installation-method-label)= |
| 46 | + |
| 47 | +## Choose an installation method |
| 48 | + |
| 49 | +Developers may either [use the official Plone 6 images](install-index-image-installation-method-label) or [manually install Plone 6](install-index-manual-installation-method-label). |
| 50 | + |
| 51 | +The Plone 6 images are compliant with the [Open Container Initiative (OCI)](https://opencontainers.org/). |
| 52 | +They should work with any OCI-compliant container engine for developing, managing, and running Plone 6 images. |
| 53 | +Two popular options include [podman](https://podman.io/) and [Docker](https://www.docker.com/products/docker-desktop/). |
| 54 | +The Plone 6 images have all the system requirements, pre-requisites, and Plone 6 itself already installed, except those requirements needed for running the container engine itself. |
| 55 | +This option is the quickest method to install and develop for Plone 6 and its packages. |
| 56 | + |
| 57 | +There may be some cases where using a Plone 6 image is not practical or desired. |
| 58 | +You might want to use an SQL database that is not PostgreSQL, or you might use a deployment workflow that has specific requirements. |
| 59 | +For these situations, Plone 6 may be installed manually. |
| 60 | +This method takes longer. |
| 61 | +It might be a challenge if you bump up against system requirements, or need to resolve conflicts between required packages. |
| 62 | + |
| 63 | + |
| 64 | +(install-index-image-installation-method-label)= |
| 65 | + |
| 66 | +## Image installation method |
| 67 | + |
| 68 | +The following Plone images are available. |
| 69 | + |
| 70 | +- [`plone/plone-backend`](https://github.com/plone/plone-backend) |
| 71 | +- [`plone/plone-frontend`](https://github.com/plone/plone-frontend) (Volto) |
| 72 | +- [`plone/plone-haproxy`](https://github.com/plone/plone-haproxy) |
| 73 | + |
| 74 | +See their README files for installation and configuration instructions. |
| 75 | + |
| 76 | + |
| 77 | +(install-index-manual-installation-method-label)= |
| 78 | + |
| 79 | +## Manual installation method |
| 80 | + |
| 81 | +As an overview, you will perform the following steps in order. |
| 82 | + |
| 83 | +1. Install the Plone backend (which includes the Classic UI) with either [buildout](install-index-install-backend-label) or [pip](install-index-install-backend-pip-label). |
| 84 | +1. Create the Plone Site in a web browser, choosing either the new Volto or the Classic UI for a frontend. |
| 85 | +1. Install the Plone frontend (Volto) with node. |
| 86 | + |
| 87 | + |
| 88 | +(install-index-install-backend-label)= |
| 89 | + |
| 90 | +### Install the Plone backend |
| 91 | + |
| 92 | +You can install the Plone backend with either [buildout](install-index-install-backend-label) or [pip](install-index-install-backend-pip-label). |
| 93 | + |
| 94 | + |
| 95 | +(install-index-install-backend-buildout-label)= |
| 96 | + |
| 97 | +#### Install backend with buildout |
| 98 | + |
| 99 | +Create a new directory to hold your project, make it your current directory, and create a new file inside it called `buildout.cfg`. |
| 100 | +This file will refer to the latest version of Plone, and the `user` value that will be used in the next step to create a Plone site. |
| 101 | +Paste the following configuration information into it. |
| 102 | + |
| 103 | +```ini |
| 104 | +[buildout] |
| 105 | +extends = https://dist.plone.org/release/6.0.0a4/versions.cfg |
| 106 | +parts = instance |
| 107 | + |
| 108 | +[instance] |
| 109 | +recipe = plone.recipe.zope2instance |
| 110 | +eggs = |
| 111 | + Plone |
| 112 | +user = admin:admin |
| 113 | +``` |
| 114 | + |
| 115 | +Install Plone with the following shell commands. |
| 116 | + |
| 117 | +```shell |
| 118 | +# Create a Python virtual environment in the current directory |
| 119 | +python3.9 -m venv . |
| 120 | +# Install the latest Plone 6 requirements with pip |
| 121 | +bin/pip install -r https://dist.plone.org/release/6.0.0a4/requirements.txt |
| 122 | +# Run buildout to install Plone 6 |
| 123 | +bin/buildout |
| 124 | +# Start the Plone instance |
| 125 | +bin/instance fg |
| 126 | +``` |
| 127 | + |
| 128 | + |
| 129 | +(install-index-install-backend-pip-label)= |
| 130 | + |
| 131 | +#### Install backend with pip |
| 132 | + |
| 133 | +Create a new directory to hold your project, make it your current directory, then issue the following commands in a shell session. |
| 134 | + |
| 135 | +```shell |
| 136 | +# Create a Python virtual environment in the current directory |
| 137 | +python3.9 -m venv . |
| 138 | +# Update Python package management tools |
| 139 | +bin/pip install -U pip setuptools wheel |
| 140 | +# Install Plone 6 with constrained requirements with pip |
| 141 | +bin/pip install Plone -c https://dist.plone.org/release/6.0.0a4/constraints.txt |
| 142 | +# Create a Plone 6 site with the given username and password in the current directory |
| 143 | +bin/mkwsgiinstance -u admin:admin -d . |
| 144 | +# Initialize Zope |
| 145 | +bin/runwsgi -v etc/zope.ini |
| 146 | +``` |
| 147 | + |
| 148 | +```{warning} |
| 149 | +You might need to edit `etc/zope.conf` to add a `blobstorage` node with a `blob-dir` entry. |
| 150 | +See [issue 3345](https://github.com/plone/Products.CMFPlone/issues/3345#issuecomment-953700024). |
| 151 | +``` |
| 152 | + |
| 153 | + |
| 154 | +(install-index-create-plone-site-label)= |
| 155 | + |
| 156 | +## Create a Plone site |
| 157 | + |
| 158 | +After you have installed the backend with buildout or pip, open a browser and visit http://localhost:8080/. |
| 159 | + |
| 160 | +Choose either Volto or Classic UI for the frontend. |
| 161 | + |
| 162 | +- For a new Volto frontend, click {guilabel}`Create a new Plone site` to prepare a Plone site and its backend. |
| 163 | + |
| 164 | + ```{note} |
| 165 | + If this button is not available, then you did not install `plone.volto` with buildout or pip. |
| 166 | + ``` |
| 167 | +
|
| 168 | + ```{attention} |
| 169 | + For Volto, make sure the `Path` identifier is `Plone`. |
| 170 | + You can change this, but then you need to change some Volto frontend configuration as well. |
| 171 | + ``` |
| 172 | +
|
| 173 | +- For a Plone Classic UI frontend, click {guilabel}`Create Classic Plone site`. |
| 174 | + |
| 175 | +Submit the form and your backend is ready. |
| 176 | +
|
| 177 | +If you created a Plone site with a Classic UI frontend, then you have completed installation. |
| 178 | +
|
| 179 | +If a created a Plone site with a Volto frontend, continue with the next steps. |
| 180 | +
|
| 181 | +
|
| 182 | +(install-index-volto-frontend-node-label)= |
| 183 | +
|
| 184 | +## Volto frontend with node |
| 185 | +
|
| 186 | +We recommend that you read the chapter {ref}`frontend-getting-started-installing-volto-label` for details. |
| 187 | +
|
| 188 | +
|
| 189 | +(install-index-nvm-node-version-manager-label)= |
| 190 | +
|
| 191 | +### `nvm`, the Node Version Manager |
| 192 | +
|
| 193 | +We recommend that you install [`nvm`, or Node Version Manager](https://github.com/nvm-sh/nvm). |
| 194 | +This makes it possible to switch to any version of [`node` (Node.JS)](https://nodejs.org/en/) and [`npm` (Node Package Manager)](https://www.npmjs.com/) for any project on which you might work. |
| 195 | +
|
| 196 | +- On Linux: `apt-get install nvm` |
| 197 | +- On Mac: `brew install nvm` |
| 198 | +- Or use the installation procedure detailed in the [nvm documentation](https://github.com/nvm-sh/nvm) |
| 199 | +
|
| 200 | +With `nvm` installed, you can use it to install and use a supported version of `node` and `npm` using the following shell commands. |
| 201 | +
|
| 202 | +```shell |
| 203 | +nvm install 16 |
| 204 | +nvm use 16 |
| 205 | +``` |
| 206 | + |
| 207 | + |
| 208 | +(install-index-install-yarn-label)= |
| 209 | + |
| 210 | +## Install Yarn |
| 211 | + |
| 212 | +Volto requires [Yarn Classic](https://classic.yarnpkg.com/lang/en/), a dependency manager for JavaScript code. |
| 213 | +Install Yarn with the following command. |
| 214 | + |
| 215 | +```shell |
| 216 | +npm install --global yarn |
| 217 | +``` |
| 218 | + |
| 219 | + |
| 220 | +(install-index-create-volto-project-label)= |
| 221 | + |
| 222 | +### Create a Volto project |
| 223 | + |
| 224 | +Create a Volto project using the following shell command. |
| 225 | + |
| 226 | +```shell |
| 227 | +npm init yo @plone/volto |
| 228 | +``` |
| 229 | + |
| 230 | +This will take some time ☕️. |
| 231 | +Toward the end of the process, it will ask you for a project name. |
| 232 | +Enter the name of your project, using only lowercase letters. |
| 233 | +It will create a directory with this name. |
| 234 | +Go to that directory and start the frontend with the following command. |
| 235 | + |
| 236 | +```shell |
| 237 | +yarn start |
| 238 | +``` |
| 239 | + |
| 240 | +In your browser, visit [http://localhost:3000](http://localhost:3000/). |
| 241 | + |
| 242 | +Congratulations! |
| 243 | +You have completed the installation of Plone 6 with Volto for its frontend. |
| 244 | +Welcome to Plone 6! |
| 245 | + |
| 246 | + |
| 247 | +(install-index-create-volto-project-label)= |
| 248 | + |
| 249 | +## Additional references |
| 250 | + |
| 251 | +- [Installation instructions from the Mastering Plone 6 training](https://training.plone.org/5/mastering-plone/installation.html) |
| 252 | +- {ref}`frontend-getting-started-installing-volto-label` |
| 253 | +- [Community post](https://community.plone.org/t/our-pip-based-development-workflow-for-plone/14562) on work in progress with [`plone-kickstarter`](https://github.com/bluedynamics/plone-kickstarter) and [`mxdev`](https://github.com/bluedynamics/mxdev). |
0 commit comments