]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - doc/md/Installation.md
9f645a67307bb142c31ee9e02adf9e0becba0401
[github/shaarli/Shaarli.git] / doc / md / Installation.md
1 # Installation
2
3 Once your server is [configured](Server-configuration.md), install Shaarli:
4
5 ## From release ZIP
6
7 To install Shaarli, simply place the files from the latest [release .zip archive](https://github.com/shaarli/Shaarli/releases) under your webserver's document root (directly at the document root, or in a subdirectory). Download the **shaarli-vX.X.X-full** archive to include dependencies.
8
9 ```bash
10 wget https://github.com/shaarli/Shaarli/releases/download/v0.11.1/shaarli-v0.11.1-full.zip
11 unzip shaarli-v0.11.1-full.zip
12 sudo rsync -avP Shaarli/ /var/www/shaarli.mydomain.org/
13 ```
14
15 ## From sources
16
17 These components are required to build Shaarli:
18
19 - [Composer](dev/Development.md#install-composer) to manage third-party [PHP dependencies](dev/Development#third-party-libraries).
20 - [yarn](https://yarnpkg.com/lang/en/docs/install/) to build frontend dependencies.
21 - [python3-virtualenv](https://pypi.python.org/pypi/virtualenv) to build local HTML documentation.
22
23 Clone the repository, either pointing to:
24
25 - any [tagged release](https://github.com/shaarli/Shaarli/releases)
26 - `latest`: the latest tagged release
27 - `master`: development branch
28
29 ```bash
30 # clone the branch/tag of your choice
31 $ git clone -b latest https://github.com/shaarli/Shaarli.git /home/me/Shaarli
32 # OR download/extract the tar.gz/zip: wget https://github.com/shaarli/Shaarli/archive/latest.tar.gz...
33
34 # enter the directory
35 $ cd /home/me/Shaarli
36 # install 3rd-party PHP dependencies
37 $ composer install --no-dev --prefer-dist
38 # build frontend static assets
39 $ make build_frontend
40 # build translations
41 $ make translate
42 # build HTML documentation
43 $ make htmldoc
44 # copy the resulting shaarli directory under your webserver's document root
45 $ rsync -avP /home/me/Shaarli/ /var/www/shaarli.mydomain.org/
46 ```
47
48 ## Set file permissions
49
50 Regardless of the installation method, appropriate [file permissions](dev/Development.md#directory-structure) must be set:
51
52 ```bash
53 # by default, deny access to everything to the web server
54 sudo chown -R root:www-data /var/www/shaarli.mydomain.org
55 sudo chmod -R u=rwX /var/www/shaarli.mydomain.org
56 # allow read-only access to these files/directories
57 sudo chmod -R g+rX /var/www/shaarli.mydomain.org/{index.php,application/,plugins/,inc/}
58 # allow read/write access to these directories
59 sudo chmod -R g+rwX /var/www/shaarli.mydomain.org/{cache/,data/,pagecache/,tmp/}
60 ```
61
62
63 ## Using Docker
64
65 [See the documentation](Docker.md)
66
67
68
69 ## Finish Installation
70
71 Once Shaarli is downloaded and files have been placed at the correct location, open this location your web browser.
72
73 Enter basic settings for your Shaarli installation, and it's ready to use!
74
75 ![](images/07-installation.jpg)
76
77 Congratulations! Your Shaarli is now available at `https://shaarli.mydomain.org`.
78
79 You can further [configure Shaarli](Shaarli-configuration.md), setup [Plugins](Plugins.md) or [additional software](Community-and-related-software.md).
80
81
82 ## Upgrading Shaarli
83
84 See [Upgrade and Migration](Upgrade-and-migration)