Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1090 Add Quick Start to admin guide and change config to Deployment … #1091

Merged
merged 3 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/cards/ojs3/developer-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Guides to host and deploy OJS, write themes and plugins, and contribute new feat

---

- [Administrator's Guide](/admin-guide/)
- [Administrator's Guide](/admin-guide/en/)
- [How to Upgrade](/dev/upgrade-guide/en/)
- [Main Documentation](/dev/documentation/en/)
- [Theming Guide](/pkp-theming-guide/)
Expand Down
8 changes: 4 additions & 4 deletions _includes/cards/omp3/developer-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Guides to host and deploy OJS, write themes and plugins, and contribute new feat

---

- [Administrator's Guide](/admin-guide/)
- [How to Upgrade](/dev/upgrade-guide/)
- [Main Documentation](/dev/documentation/)
- [Administrator's Guide](/admin-guide/en/)
- [How to Upgrade](/dev/upgrade-guide/en/)
- [Main Documentation](/dev/documentation/en/)
- [Theming Guide](/pkp-theming-guide/)
- [Plugin Guide](/dev/plugin-guide/)
- [Plugin Guide](/dev/plugin-guide/en/)
- ... and [more](/dev/)
8 changes: 4 additions & 4 deletions _includes/cards/ops3/developer-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Guides to host and deploy OJS, write themes and plugins, and contribute new feat

---

- [Administrator's Guide](/admin-guide/)
- [How to Upgrade](/dev/upgrade-guide/)
- [Main Documentation](/dev/documentation/)
- [Administrator's Guide](/admin-guide/en/)
- [How to Upgrade](/dev/upgrade-guide/en/)
- [Main Documentation](/dev/documentation/en/)
- [Theming Guide](/pkp-theming-guide/)
- [Plugin Guide](/dev/plugin-guide/)
- [Plugin Guide](/dev/plugin-guide/en/)
- ... and [more](/dev/)
23 changes: 12 additions & 11 deletions admin-guide/en/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Table of contents

* [Getting Started](./)
* [Requirements](./requirements)
* [Download](./download)
* [Configure](./configure)
* [Install](./install)
* [Advanced Configuration](./advanced)
* [Email](./advanced-email)
* [Jobs](./advanced-jobs)
* [Users](./advanced-users)
* [Multi-tenant](./advanced-multi-tenant)
* [Sandbox](./advanced-sandbox)
* [Introduction](./)
* [Getting Started](./getting-started)
* [Requirements](./getting-started#system-requirements)
* [Download](./getting-started#download)
* [Install](./getting-started#install)
* [Deployment](./deploy)
* [Configuration](./deploy#configure)
* [Email](./deploy-email)
* [Jobs](./deploy-jobs)
* [Users](./deploy-users)
* [Multi-tenant](./deploy-multi-tenant)
* [Sandbox](./deploy-sandbox)
* [Import/Export](data-import-and-export)
* [REST API](data-import-and-export#rest-api)
* [Native XML](data-import-and-export#native-xml)
Expand Down
16 changes: 0 additions & 16 deletions admin-guide/en/advanced.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version: 3.4
> Most hosting services will provide a configured email server. If you are unsure, contact your hosting provider to learn what they are able to offer.
{:.notice}

This section describes the requirements for a properly configured email server and discusses some of the configuration options for sending email with OJS, OMP and OPS. If you know what you're doing, you may prefer to follow the quick setup instructions in our [configuration guide](/admin-guide/en/configure#email-server).
This section describes the requirements for a properly configured email server and discusses some of the configuration options for sending email with OJS, OMP and OPS. If you know what you're doing, you may prefer to follow the quick setup instructions in our [configuration guide](/admin-guide/en/deploy#email-server).

## SPF

Expand All @@ -37,7 +37,7 @@ The application uses these settings to reconfigure the `FROM` and `REPLY-TO` hea

## Sendmail vs SMTP vs PHPMailer

Most hosting services will provide the details the application should use to connect to a SMTP server for sending email. If you have those, follow the instructions in the [configuration guide](/admin-guide/en/configure#email-server).
Most hosting services will provide the details the application should use to connect to a SMTP server for sending email. If you have those, follow the instructions in the [configuration guide](/admin-guide/en/deploy#email-server).

If not, the server will probably be configured to send email through the `sendmail` application. In such cases, set the `default` sender to `sendmail` in the `config.inc.php`:

Expand Down Expand Up @@ -108,4 +108,4 @@ If you run your own email server, you can ask for help in our [community forum](

---

Next, learn about how to improve performance with the [job runner](./advanced-jobs).
Next, learn about how to improve performance with the [job runner](./deploy-jobs).
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ Jobs should never be run while the site is under maintenance, for example during

---

Learn more about handling [user accounts](./advanced-users).
Learn more about handling [user accounts](./deploy-users).
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ Then add a privacy statement by logging in as an administrator and going to **Ad

---

Learn how to prevent unwanted emails, deposits and other tasks from being run in a [sandboxed test installation](./advanced-sandbox).
Learn how to prevent unwanted emails, deposits and other tasks from being run in a [sandboxed test installation](./deploy-sandbox).
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ job_runner = Off

Depending on how you configured your server to run jobs, you may need to take additional steps.

If you are using **workers** to [process jobs](./advanced-jobs#workers), kill those processes. You may need to disable [Supervisor](./advanced-jobs#workers) or any process monitor that will restart the workers.
If you are using **workers** to [process jobs](./deploy-jobs#workers), kill those processes. You may need to disable [Supervisor](./deploy-jobs#workers) or any process monitor that will restart the workers.

If you are using a **cron job** to run the following command, delete that cron job.

```
php lib/pkp/tools/jobs.php run
```

Disabling jobs will stop some functionality from running. For example, the search index will not be rebuilt when submissions are published or unpublished. Jobs will pile up without being processed. Read how to [monitor jobs](./advanced-jobs#how-to-monitor-jobs).
Disabling jobs will stop some functionality from running. For example, the search index will not be rebuilt when submissions are published or unpublished. Jobs will pile up without being processed. Read how to [monitor jobs](./deploy-jobs#how-to-monitor-jobs).

## Anonymize user emails

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ Learn how to import or export data about user accounts in the [Import/Export](./

---

The next section describes best practices for running lots of independent journals, presses or preprint servers from one [multi-tenant install](./advanced-multi-tenant).
The next section describes best practices for running lots of independent journals, presses or preprint servers from one [multi-tenant install](./deploy-multi-tenant).
75 changes: 36 additions & 39 deletions admin-guide/en/configure.md → admin-guide/en/deploy.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
---
title: Configure - Admin Guide - PKP Developer Docs
description: A guide to the configuration settings for Open Journal Systems (OJS), Open Monograph Press (OPS) or Open Preprint Systems (OPS).
title: Deployment Guide for OJS, OMP and OPS - Admin Guide - PKP Developer Docs
description: How to configure OJS, OMP and OPS and safely deploy these applications in a production environment.
book: admin-guide
version: 3.4
---

# Configure
# Deployment

The configuration file is where you will connect the application to a database, email server and domain. There are dozens of configuration settings to customize your install. This guide will only cover the most important.
> Read the [Getting Started](./getting-started) guide first to learn how to download and install the software.
{:.notice}

Edit the configuration file on your server.
In a production environment, the software needs to be configured to send email, keep uploaded files private, and run regularly scheduled tasks. This guide describes the most important configuration steps that need to be taken before running a live, public instance of the software.

```bash
# Don't want to use vim?
# Use any text editor you prefer
## What you need to know

vim <web-root>/config.inc.php
```
In order to run this software securely, you will need to understand how to do the following:

- Upload and edit files on your web server
- Modify file permissions on your web server
- Configure a cron job on your web server
- Manage file storage and memory limits on your web server
- Configure a SSL certificate for your domain

If you are unfamiliar with some of these topics, you may be able to learn by following tutorials on the web. However, if you do not know how to deploy applications to a web server, we recommend that you find technical support for your project. This may be available through your research institution, a library publishing service, or a paid service provider like PKP's [Publishing Services](https://pkp.sfu.ca/hosting).

## Configuration

> The steps below describe how to use the command line to modify the files from a release package on a Linux web server. If you are not sure how to do this, or you run in a different environment, you may need to adapt the instructions to your server environment. We recommend speaking to your web hosting provider if you are not sure.
{:.notice}

The configuration file is found in the root directory of the application. For example, if you installed the software to the directory `/var/www`, the configuration file would be located at `/var/www/config.inc.php`.

Some of the settings in this file, like the database connection, are set during the installation process (see [Getting Started](./getting-started)). However, you will need to edit the file directly to configure other settings.

Find the `base_url` setting in the file and change it to the web address of your install.
Open the config file, find the `base_url` setting and change it to the web address of your install.

```
base_url = "<url>"
Expand All @@ -30,25 +45,15 @@ Add this domain to your `allowed_hosts` list.
allowed_hosts = '["<url>"]'
```

Set your database credentials.

```
driver = mysqli
host = localhost
username = <username>
password = <password>
name = <database-name>
```

Two secret keys need to be set in order to safely encrypt secure tokens on your server. You can use the following command to generate a random key.
Two secret keys need to be set in order to safely encrypt secure tokens on your server. You can use the following command to generate a random key in most Linux and Mac environments.

```bash
openssl rand -base64 32
```

Use the string created by this command to set the `salt` and `api_key_secret` values in `config.inc.php`. Each config setting should have a different value.

(We have not provided an example, because copy-pasting the example could compromise your site's security.)
(We have not provided an example, because copying the example could compromise your site's security.)

Set the `require_validation` in order to require new users to validate their email addresses before using a new account.

Expand All @@ -62,7 +67,7 @@ Every installation needs to have a secure files directory to ensure that private

The directory must be outside of the web root. This is the root directory that someone accesses when they visit your domain name. For example, if you installed the application to `/var/www`, the files directory should not be in `/var/www`.

Create the directory and change the permissions to allow the web server to write files and directories to it. Then edit the `config.inc.php` with the absolute path to the `files_dir`.
Check the `files_dir` setting in the `config.inc.php` file. If it is within the web root, create a directory outside of the web root and modify the configuration file to point to this directory.

```
files_dir = <path>
Expand All @@ -72,7 +77,7 @@ files_dir = <path>

Most email will be blocked by spam filters unless you use a SMTP server with correctly configured [SPF](https://en.wikipedia.org/wiki/Sender_Policy_Framework) and [DMARC](https://en.wikipedia.org/wiki/DMARC) records.

> Not sure what to do here? Learn more about how to [configure an email server](./advanced-email).
> Not sure what to do here? Learn more about how to [configure an email server](./deploy-email).
{:.notice}

Turn SMTP on:
Expand Down Expand Up @@ -101,7 +106,7 @@ force_default_envelope_sender = On
force_dmarc_compliant_from = On
```

Learn more about the [envelope sender](./advanced-email#dmarc).
Learn more about the [envelope sender](./deploy-email#dmarc).

## User Validation

Expand All @@ -114,9 +119,7 @@ validation_timeout = 14

## SSL / HTTPS

Every site should encrypt it's web traffic using a SSL certificate. This will make your site run from `https://` instead of `http://`.

If you don't have a SSL certificate, you should [get one](./securing-your-system#sslencryption).
Every site should encrypt it's web traffic using a SSL certificate. This will make your site run from `https://` instead of `http://`. If you don't have a SSL certificate, you should [get one](./securing-your-system#sslencryption).

Edit the `config.inc.php` file to force URLs to use SSL:

Expand All @@ -138,11 +141,11 @@ If you are unable to configure this cron job, you must enable the Acron plugin a

No configuration is required to enable the built-in job runner. This is useful for test installations and small sites. However, in production we recommend using a worker daemon or cron job to process jobs.

Learn more about how to configure the [job runner](./advanced-jobs).
Learn more about how to configure the [job runner](./deploy-jobs).

## Pretty URLs

Enable URL rewriting on your server in order to change ugly URLs like `?journal=publicknowledge&page=article&op=view` into user-friendly URLs like `/publicknowledge/articles/view/1`.
Enable URL rewriting on your server in order to drop the `index.php` from URLs. For example, instead of `https://example.org/index.php/publicknowledge`, the URL will be `https://example.org/publicknowledge`.

The following is an example `.htaccess` file that can be used to enable `mod_rewrite` for Apache servers. This file should be placed in the web root.

Expand All @@ -156,13 +159,7 @@ The following is an example `.htaccess` file that can be used to enable `mod_rew
</IfModule>
```

Then edit the `config.inc.php` file to turn off `disable_path_info`.

```
disable_path_info = Off
```

And turn on `restful_urls`.
Then edit the `config.inc.php` file to turn on `restful_urls`.

```
restful_urls = On
Expand All @@ -174,4 +171,4 @@ The configuration file includes settings to control the default date formats, ma

---

Once you have configured everything, you are ready to [run the install](./install).
You've now configured all of the critical application functions. Next, you can learn how to conifigure your [email server](./deploy-email) to reliably deliver email.
2 changes: 1 addition & 1 deletion admin-guide/en/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ Change the file permissions of the following files and directories to allow them

---

Next, set database credentials and other [configuration settings](./configure).
Next, set database credentials and other [configuration settings](./deploy).
86 changes: 86 additions & 0 deletions admin-guide/en/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
title: Getting Started with OJS, OMP or OPS - Admin Guide - PKP Developer Docs
description: A quick-start guide to install OJS, OMP or OPS in a test environment.
book: admin-guide
version: 3.4
---

# Getting Started

This is a quick-start guide to install and run OJS, OMP or OPS in a local test environment. Use this guide to try out the software on your own or to install it to a private, test environment. Before hosting the installation on a public server, you should read the [Deployment](./deploy) guide to learn how to safely configure the application.

## System Requirements

Your server — or your local development environment — must meet the following requirements in order to run the 3.4 release of OJS, OMP or OPS.

- [PHP 8.0+](http://www.php.net/) with php-mbstring, php-xml, and php-intl enabled
- [MySQL 4.1+](http://www.mysql.com/), [MariaDB 4.1+](https://mariadb.org/) or [PostgreSQL 9.5+](http://www.postgresql.org/)
- Linux, or one of the following: BSD, Solaris, Mac OS X, Windows

> **Older Versions**: Check the README.md file located in the download package of the version you want to install.

## Download

Download the latest stable release package (`.tar.gz`) from the PKP website.

- [Open Journal Systems](https://pkp.sfu.ca/software/ojs/download) (OJS)
- [Open Monograph Press](https://pkp.sfu.ca/software/omp/download) (OMP)
- [Open Preprint Systems](https://pkp.sfu.ca/software/ops/download) (OPS)

Use the `tar` command, or any archive software on your system, to unpack the `.tar.gz` file to a local directory. For example, if you downloaded the OJS 3.4.0 release package, you can use the following command to unpack the file.

```
tar -xvf ojs-3.4.0.tar.gz
```

This will create a directory for the software at `ojs-3.4.0`. Create another directory for file uploads.

```
mkdir ojs-files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a warning that this needs to be outside the web root. (I know these are tryout instructions, but it's a very common mistake people make.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These instructions are set up to do that automatically. The tar command creates a directory ojs-3.4.0, then the mkdir command creates a directory beside it. The last command has them launch the web server from the ojs direcettory, so it will be separate unless someone has deliberately not followed the instructions.

Do you still want me to add a warning here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes -- anyplace we mention the files directory in the context of creating or moving it, we should warn people not to put it someplace web-accessible. This remains the leading cause of security problems.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, does this look alright? 0b7fd3f

```

Start PHP's built-in server from the release package's root directory.

```
cd ojs-3.4.0
php -S localhost:8000
```

## Install

Open your browser and navigate to the installation page at the following URL.

```
http://localhost:8000
```

You should see an installation screen like the one below.


![Screenshot of the installation screen of OJS](./assets/install-start.png)

Complete the form to finish the installation, using the file uploads directory that you created. It may take a minute to install. You should see the following success screen when it is finished.

![Screenshot of the install complete screen of OJS](./assets/install-complete.png)

Once you have finished the install, login with the administrator account you set up to access the admin area. Depending on whether you installed OJS, OMP or OPS, you will be taken to a screen where you can create your first journal, press or preprint server.

- In OJS, click the **Add Journal** button.
- In OMP, click the **Add Press** button.
- In OPS, click the **Add Server** button.

Once you have created your first journal, press, or preprint server, you will be taken to it's Settings Wizard.

![Screenshot of the settings wizard screen for a new journal](./assets/settings-wizard.png)

Click the **Users** tab to create a new user for the Journal Manager, Press Manager, or Server Manager who will be responsible for managing the journal, press or preprint server.

And you're done! You've successfully installed the software and created a manager user account. Login as the manager to explore the software as it will appear to the managing user of the journal, press or preprint server. This is usually a managing editor, an editor-in-chief, or a publishing assistant responsible for the day-to-day running of the journal. Or you can stay logged in as the administrator to see all of the features available to you as an admin.

To explore the software further, click the small icon at the top to switch to your new journal, press or preprint server.

![Screenshot of the journal switcher in OJS](./assets/settings-wizard-context-switcher.png)

---

Congratulations! The software is now installed and you can begin testing it out. In a real environment, you will need to ensure your install is configured correctly and secured properly. Learn how to [deploy the software](./deploy).
Loading