Updated the installation instructions

This commit is contained in:
El RIDO 2016-08-08 14:43:30 +02:00
parent 94691cb788
commit 7447e685ce

View File

@ -1,18 +1,20 @@
# Installation # Installation
## Basic installation
**TL;DR:** Download the **TL;DR:** Download the
[latest release archive](https://github.com/PrivateBin/PrivateBin/releases/latest) [latest release archive](https://github.com/PrivateBin/PrivateBin/releases/latest)
and extract it in your web hosts folder were you want to install your PrivateBin and extract it in your web hosts folder were you want to install your PrivateBin
instance. instance. We try to provide a safe default configuration, but advise you to check
the options and adjust them as you see fit.
## Basic installation
### Requirements ### Requirements
- PHP version 5.3.0 or above - PHP version 5.3 or above
- GD extension - GD extension
- mcrypt extension (recommended) - mcrypt extension (optional, but strongly recommended)
- some disk space or (optional) a database supported by PDO - some disk space or (optional) a database supported by PDO
- ability to create files and folders in the installation directory and the PATH
- A web browser with javascript support - A web browser with javascript support
### Configuration ### Configuration
@ -28,7 +30,7 @@ you set a time limit in seconds. Users may not post more often then this limit
to your PrivateBin installation. to your PrivateBin installation.
More details can be found in the More details can be found in the
[configuration documentation](https://github.com/PrivateBin/PrivateBin/wiki/Configuration). [configuration documentation](../Configuration).
## Advanced installation ## Advanced installation
@ -36,9 +38,9 @@ More details can be found in the
In the index.php you can define a different `PATH`. This is useful to secure your In the index.php you can define a different `PATH`. This is useful to secure your
installation. You can move the configuration, data files, templates and PHP installation. You can move the configuration, data files, templates and PHP
libraries (directories cfg, data, lib, tpl, tmp and tst) outside of your document libraries (directories cfg, data, lib, tpl, tst and vendor) outside of your document
root. This new location must still be accessible to your webserver / PHP process root. This new location must still be accessible to your webserver / PHP process
([open_basedir setting](https://secure.php.net/manual/en/ini.core.php#ini.open-basedir)). ([open_basedir setting](http://php.net/manual/en/ini.core.php#ini.open-basedir)).
> #### PATH Example > #### PATH Example
> Your PrivateBin installation lives in a subfolder called "paste" inside of > Your PrivateBin installation lives in a subfolder called "paste" inside of
@ -51,7 +53,7 @@ root. This new location must still be accessible to your webserver / PHP process
> When setting the path like this: > When setting the path like this:
> define('PATH', '../../secret/privatebin/'); > define('PATH', '../../secret/privatebin/');
> >
> PrivateBin will look for your includes here: > PrivateBin will look for your includes / data here:
> /home/example.com/secret/privatebin > /home/example.com/secret/privatebin
### Web server configuration ### Web server configuration
@ -73,13 +75,13 @@ In the configuration file the `[model]` and `[model_options]` sections let you
configure your favourite way of storing the pastes and discussions on your configure your favourite way of storing the pastes and discussions on your
server. server.
`privatebin_data` is the default model, which stores everything in files in the `Filesystem` is the default model, which stores everything in files in the
data folder. This is the recommended setup for most sites. data folder. This is the recommended setup for most sites.
Under high load, in distributed setups or if you are not allowed to store files Under high load, in distributed setups or if you are not allowed to store files
locally, you might want to switch to the `privatebin_db` model. This lets you locally, you might want to switch to the `Database` model. This lets you
store your data in a database. Basically all databases that are supported by store your data in a database. Basically all databases that are supported by
[PDO](https://secure.php.net/manual/en/book.pdo.php) may be used. Automatic table [PDO](http://php.net/manual/en/book.pdo.php) may be used. Automatic table
creation is provided for `pdo_ibm`, `pdo_informix`, `pdo_mssql`, `pdo_mysql`, creation is provided for `pdo_ibm`, `pdo_informix`, `pdo_mssql`, `pdo_mysql`,
`pdo_oci`, `pdo_pgsql` and `pdo_sqlite`. You may want to provide a table prefix, `pdo_oci`, `pdo_pgsql` and `pdo_sqlite`. You may want to provide a table prefix,
if you have to share the PrivateBin database with another application or you want if you have to share the PrivateBin database with another application or you want
@ -88,11 +90,13 @@ to use a prefix for
The table prefix option is called `tbl`. The table prefix option is called `tbl`.
> #### Note > #### Note
> The "privatebin_db" model has only been tested with SQLite and MySQL, although > The `Database` model has only been tested with SQLite, MySQL and PostgreSQL,
it would not be recommended to use SQLite in a production environment. If you > although it would not be recommended to use SQLite in a production environment.
gain any experience running PrivateBin on other RDBMS, please let us know. > If you gain any experience running PrivateBin on other RDBMS, please let us
> know.
For reference or if you want to create the table schema for yourself: For reference or if you want to create the table schema for yourself (replace
`prefix_` with your own table prefix):
CREATE TABLE prefix_paste ( CREATE TABLE prefix_paste (
dataid CHAR(16) NOT NULL, dataid CHAR(16) NOT NULL,