Add Windows OS to install docs (#83)
* Add Windows OS to docs * Fix small typo * Add clarification * Add Windows specific install options * Add Postgres to Windows docs
This commit is contained in:
parent
c1bb0b0de3
commit
1423e02ce4
12 changed files with 156 additions and 9 deletions
|
@ -14,13 +14,15 @@ createdb -O plume plume
|
|||
Before starting Plume, you'll need to create a configuration file, called `.env`.
|
||||
This file should be in the same directory as the one in which you will start Plume (`~/Plume`, if you followed the previous instructions).
|
||||
If you are installing from source, you can use `cp .env.sample .env` to generate it.
|
||||
Here is a sample of what you should put inside.
|
||||
Here is a sample of what you should put inside for **GNU/Linux** and **Mac OS X** systems.
|
||||
|
||||
```bash
|
||||
# The address of the database
|
||||
# (replace USER, PASSWORD, PORT and DATABASE_NAME with your values)
|
||||
#
|
||||
# If you are using SQlite, use the path of the database file (`plume.db` for instance)
|
||||
# If you are using SQlite, use the full path of the database file (`plume.db` for instance)
|
||||
# Windows user's paths are backslashes, change them to forward slashes
|
||||
#DATABASE_URL=/etc/path/to/Plume/plume.db
|
||||
DATABASE_URL=postgres://USER:PASSWORD@IP:PORT/DATABASE_NAME
|
||||
|
||||
# For PostgreSQL: migrations/postgres
|
||||
|
@ -49,12 +51,23 @@ For more information about what you can put in your `.env`,
|
|||
see [the documentation about environment variables](/environment).
|
||||
|
||||
Now we need to run migrations. Migrations are scripts used to update
|
||||
the database. To run the migrations, you can do:
|
||||
the database. To run the migrations, you can do for **GNU/Linux** and **Mac OS X**:
|
||||
|
||||
```bash
|
||||
plm migration run
|
||||
```
|
||||
|
||||
If you are using **Windows** and DATABASE of sqlite, you will need to copy the sqlite3.dll from
|
||||
"C:\ProgramData\chocolatey\lib\SQLite\tools" to where plm.exe and plume.exe were compiled:
|
||||
```
|
||||
copy "C:\ProgramData\chocolatey\lib\SQLite\tools\sqlite3.dll" "C:\Users\%USERNAME%\.cargo\bin\sqlite3.dll"
|
||||
```
|
||||
|
||||
Now you may run the migrations:
|
||||
```
|
||||
plm migration run
|
||||
```
|
||||
|
||||
Migrations should be run after each update. When in doubt, run them.
|
||||
|
||||
You will also need to initialise search index:
|
||||
|
@ -70,6 +83,11 @@ plm instance new
|
|||
plm users new --admin
|
||||
```
|
||||
|
||||
On **Windows**, there might be an error creating the admin user. To get around this, you need to run:
|
||||
```
|
||||
plm users new --admin -n "adminusername" -N "Human Readable Admin Name" -b "Biography of Admin here" -p hackmeplease
|
||||
```
|
||||
|
||||
For more information about these commands, and the arguments you can give them,
|
||||
check out [their documentation](/CLI).
|
||||
|
||||
|
|
|
@ -30,4 +30,7 @@ you:
|
|||
<li><a href="/installation/deps/macosx">
|
||||
Mac OS X
|
||||
</a></li>
|
||||
<li><a href="/installation/deps/windows">
|
||||
Windows
|
||||
</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Dependencies on Debian & Co
|
||||
---
|
||||
|
||||
First, make sure your computer is aware of the latest availabel versions of installable
|
||||
First, make sure your computer is aware of the latest available versions of installable
|
||||
packages. This command, and the other on this page, may require super-user rights, so
|
||||
you may want to prefix them by `sudo`.
|
||||
|
||||
|
|
|
@ -31,10 +31,15 @@ Then run this command to be able to run cargo in the current session:
|
|||
export PATH="$PATH:/home/plume/.cargo/bin:/home/plume/.local/bin:/usr/local/sbin"
|
||||
```
|
||||
|
||||
If installing RustUp on **Windows**, you do not need to create a dedicated user if you do not want to.
|
||||
Building RustUp is a little different, but the prompts you are asked are the same.
|
||||
|
||||
On **Windows**, you'll need, if you don't already have them, to download and
|
||||
install the [Visual C++ 2015 Build Tools](https://www.microsoft.com/en-us/download/details.aspx?id=48159).
|
||||
Then, download the [rustup installer](https://www.rust-lang.org/en-US/install.html)
|
||||
and run it.
|
||||
install the [Visual C++ 2015 Build Tools](https://www.microsoft.com/en-us/download/details.aspx?id=48159). Alternatvely,
|
||||
if you installed [Microsoft Visual Studio 2019](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16), this package is included with it.
|
||||
Then, download the [rustup installer](https://win.rustup.rs/) and run it.
|
||||
After installation, you will need to close your Git Bash window and relaunch in order to see new
|
||||
path variables, or you may restart your PC.
|
||||
|
||||
You can check that everything is correctly installed with `rustc --version` and
|
||||
`cargo --version`.
|
||||
|
|
32
source/installation/deps/windows.html.md
Normal file
32
source/installation/deps/windows.html.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
title: Dependencies on Windows
|
||||
---
|
||||
|
||||
There are several packages that need to be installed before getting started compiling
|
||||
Plume on Windows devices.
|
||||
|
||||
1. Download and install [Git-SCM](https://git-scm.com/downloads)
|
||||
2. Download and install [Microsoft Visual Studio 2019](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16)
|
||||
3.
|
||||
|
||||
a. For SQLite Database:
|
||||
|
||||
Install [Chocalatey](https://chocolatey.org/) using a PowerShell v2+ prompt:
|
||||
|
||||
```powershell
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||
```
|
||||
|
||||
b. For PostgreSQL:
|
||||
|
||||
Download [PostgreSQL Binaries](https://www.enterprisedb.com/download-postgresql-binaries), extract to an easy place (i.e. C:\Extra\pgsql), and add the bin folder to your system path variable.
|
||||
|
||||
4. Download and install [OpenSSL](https://slproweb.com/products/Win32OpenSSL.html) (i.e. C:\Extra\ssl)
|
||||
5. Create new system variable called "OPENSSL_DIR" with a value of `C:\Extra\ssl` (or wherever you installed OpenSSL **NOTE**: this is _not_ to the bin folder, it must be to root to get the bin and lib folders!)
|
||||
6. Download and install [LLVM (libclang)](http://releases.llvm.org/9.0.0/LLVM-9.0.0-win64.exe) (i.e. C:\Extra\LLVM)
|
||||
7. Create new system variable called "LIBCLANG_PATH" with a value of `C:\Extra\LLVM\bin` (or wherever you installed LLVM to)
|
||||
8. Reboot your PC to continue
|
||||
|
||||
Now that these dependencies have been installed, we need to install Rust which has a special installer.
|
||||
|
||||
<a class="action" href="/installation/deps/rust">Let's do it!</a>
|
|
@ -3,12 +3,14 @@ title: Choose your init system
|
|||
---
|
||||
|
||||
The init system is the first program to start when a computer boots. Its role is
|
||||
to start other program automatically and to let you manage them more easily.
|
||||
to start other program automatically and to let you manage them more easily. The
|
||||
recommended option for Windows is Task Scheduler.
|
||||
|
||||
<ul class="choices">
|
||||
<li><a href="/installation/init/systemd">SystemD</a></li>
|
||||
<li><a href="/installation/init/sysvinit">SysVInit</a></li>
|
||||
<li><a href="/installation/init/openrc">OpenRC</a></li>
|
||||
<li><a href="/installation/init/taskscheduler">Task Scheduler</a></li>
|
||||
</ul>
|
||||
|
||||
## How to know which init system I have?
|
||||
|
|
19
source/installation/init/taskscheduler.html.md
Normal file
19
source/installation/init/taskscheduler.html.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
title: Configuring Task Scheduler
|
||||
---
|
||||
|
||||
If you want to start your Plume instance on system startup, you can use Task Scheduler
|
||||
in order to do so. To configure, use the following options when creating a task:
|
||||
|
||||
1. Open up the Task Scheduler app
|
||||
2. On right hand side, choose Create Task
|
||||
3. **General tab** - Name: "Plume"; Description: "Plume: a federated blogging application"; Run whether user is logged on or not; Run with highest privileges; Configure for Windows 10
|
||||
4. **Triggers tab** - Begin the task At startup; Optionally Delay task for 30 seconds; Enabled
|
||||
5. **Actions** - Action: Start a program; Browse to plume.exe (default is C:\Users\%USERNAME%\.cargo\bin\plume.exe); Start in: C:\path\to\.env
|
||||
6. **Conditions** - Uncheck everything
|
||||
7. **Settings** - Allow task to be run on demand; Run task as soon as possible after a scheduled start is missed; If the running task does not end when requested, for it to stop; Do not start a new instance
|
||||
|
||||
If everything works fine, the last step before you can use your Plume instance
|
||||
is to configure a reverse-proxy.
|
||||
|
||||
<a class="action" href="/installation/proxy">Reverse-proxy configuration</a>
|
|
@ -11,6 +11,7 @@ your reverse proxy in this list:
|
|||
<li><a href="/installation/proxy/caddy">Caddy</a></li>
|
||||
<li><a href="/installation/proxy/nginx">Nginx</a></li>
|
||||
<li><a href="/installation/proxy/apache">Apache</a></li>
|
||||
<li><a href="/installation/proxy/iis">IIS</a></li>
|
||||
<li><a href="/installation/proxy/none">No reverse-proxy</a></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -32,6 +32,10 @@ SSLStaplingCache "shmcb:logs/stapling-cache(150000)"
|
|||
# Requires Apache >= 2.4.11
|
||||
SSLSessionTickets Off
|
||||
|
||||
# Disable http/1.0
|
||||
# Requires Apache >= 2.4.17
|
||||
Protocols h2 http/1.1
|
||||
|
||||
SSLCertificateFile /etc/letsencrypt/live/DOMAIN_NAME/cert.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/DOMAIN_NAME/privkey.pem
|
||||
SSLCertificateChainFile /etc/letsencrypt/live/DOMAIN_NAME/chain.pem
|
||||
|
|
24
source/installation/proxy/iis.html.md
Normal file
24
source/installation/proxy/iis.html.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: Configuring Internet Information Services
|
||||
---
|
||||
|
||||
If you want to use Plume for a **subdomain**, follow these instructions.
|
||||
|
||||
1. You need to have installed URL Rewrite
|
||||
2. From the Sites, choose your site, in the middle pane, double click URL Rewrite
|
||||
3. On right hand side, Add Rule, Blank Rule
|
||||
4. Name it Plume with pattern (.*) with Action type Rewrite and Rewrite URL of http://127.0.0.1:7878/{R:1}
|
||||
5. Apply
|
||||
|
||||
~~If you want to use Plume for a **subdirectory**, follow these instructions (experimental).~~
|
||||
|
||||
~~1. Create a Server Farm called Plume, with a server of localhost, and a http port of 7878~~
|
||||
~~2. You then need to install [Application Request Routing](https://www.iis.net/downloads/microsoft/application-request-routing) in IIS~~
|
||||
~~3. After installing double click on your server name, then Applications Request Routing Cache~~
|
||||
~~4. On right hand side, select Server Proxy Settings...~~
|
||||
~~5. Enable the proxy; HTTP version Pass through; under Proxy Type, check Use URL Rewrite to inspect incoming requests; check Enable SSL offloading; and for Reverse proxy use the name of your server farm: Plume~~
|
||||
~~6. Apply (it may ask you to create default URL Rewrite, say yes or ok to the prompt)~~
|
||||
~~7. Then on right hand side, select URL Rewrite...~~
|
||||
~~8. Should be something called either ARR_Plume_loadbalance or ARR_server_proxy: click on it and on right side select Edit...~~
|
||||
~~9. Pattern should be Regular Expression with pattern of `^plume$|^plume/(.*)` where "plume" is the subdirectory you want to use~~
|
||||
~~10. Action type should be Route to Server Farm, Scheme http://, Server farm Plume, Path /{R:1}~~
|
|
@ -3,7 +3,7 @@ title: Installing pre-built binaries
|
|||
---
|
||||
|
||||
This installation method is only available for 64 bits Linux machines. Pre-built binairies
|
||||
for other platforms may come in the future.
|
||||
for other platforms may come in the future. For Windows users, try this [page](https://github.com/iamdoubz/Plume4Windows).
|
||||
|
||||
You will need to have `wget` installed for this method to work.
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ cd Plume
|
|||
Then, you'll need to install Plume and the CLI tools to manage your instance.
|
||||
Run the following commands.
|
||||
|
||||
For **GNU/Linux** and **Mac OS X**:
|
||||
|
||||
```bash
|
||||
# Build the front-end
|
||||
cargo install cargo-web
|
||||
|
@ -21,6 +23,43 @@ cargo web deploy -p plume-front --release
|
|||
# postgres or sqlite depending on what you want to use
|
||||
cargo install --no-default-features --features DATABASE
|
||||
|
||||
# Build plm, the CLI helper, replacing DATABASE again
|
||||
cargo install --no-default-features --features DATABASE --path plume-cli
|
||||
|
||||
```
|
||||
|
||||
For **Windows**, if you are going to use SQLite, launch an additional cmd.exe as admin and do the following:
|
||||
|
||||
```
|
||||
# Install, compile, and convert SQLite using chocolatey
|
||||
|
||||
choco install sqlite
|
||||
cd C:\ProgramData\chocolatey\lib\SQLite\tools
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
|
||||
lib /MACHINE:x64 /def:sqlite3.def /out:sqlite3.lib
|
||||
|
||||
# Copy sqlite3.lib to where you installed RustUp
|
||||
copy C:\ProgramData\chocolatey\lib\SQLite\tools\sqlite3.lib C:\Users\%USERNAME%\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\sqlite3.lib
|
||||
```
|
||||
|
||||
You may close that cmd.exe window and proceed with your regularly scheduled installation. Remember to replace DATABASE
|
||||
with postgres or sqlite depending on what you want to use:
|
||||
|
||||
```
|
||||
# Install diesel_cli
|
||||
cargo +stable install diesel_cli --no-default-features --features DATABASE --version '=1.3.0' --verbose
|
||||
|
||||
# Build the front-end
|
||||
cargo install cargo-web
|
||||
cargo web deploy -p plume-front --release
|
||||
|
||||
# If using SQLite, copy sqlite3.lib from the stable version of RustUp to the nightly that was just installed
|
||||
copy C:\Users\%USERNAME%\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\sqlite3.lib C:\Users\%USERNAME%\.rustup\toolchains\nightly-2020-01-15-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\sqlite3.lib
|
||||
|
||||
# Build the back-end, replacing DATABASE either with
|
||||
# postgres or sqlite depending on what you want to use
|
||||
cargo install --no-default-features --features DATABASE --path .
|
||||
|
||||
# Build plm, the CLI helper, replacing DATABASE again
|
||||
cargo install --no-default-features --features DATABASE --path plume-cli
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue