====== Installing RePoSyD on Windows ====== - Install Node.js and YARN. - Install the RePoSyD Command Line Interface (CLI) from the RePoSyD registry. - Use the RePoSyD CLI to install the RePoSyD services on your computer. -Run RePoSyD as a Service or from the Command Line. ===== Node.js ====== ==== Step 1: Download Node.js installer ==== Open your favorite web browser, navigate to [[https://nodejs.org/download/release/v16.20.1]] and download the Installer for the 64-bit version of Node.js ([[https://nodejs.org/download/release/v16.20.1/node-v16.20.1-x64.msi]]). Alternative you can use the ZIP-version ([[https://nodejs.org/download/release/v16.20.1/node-v16.20.1-win-x64.zip|node-v16.20.1-win-x64.zip]]) for the installation. ==== Step 2: Installing Node.js ==== Once the download is completed, open the installer to start the installation. {{ :manual:installation:node_installer_01.png?400 |}} Click on until you reach the step "Tools for Native Modules". Click on the checkbox to enable the installation of additional build tools. {{ :manual:installation:node_installer_02.png?400 |Step "Tools for Native Modules}} **Automatically install necessary tools** The installation of RePoSyD will fail, if this option is not activated! ==== Step 3: Verify the installation ==== After completion of the installer, open a command prompt (or PowerShell) and enter the following: C:\> node -v The system should display the Node.js version installed on your system. C:\> node -v v16.20.1 ===== YARN (Package Manager) ===== ==== Step 1: Installing YARN as a global Node.js package ==== Open a command prompt (or PowerShell), and enter the following: C:\> npm install -g yarn Installing YARN behind a Proxy Server If RePoSyD is installed in a corporate environment, you may need to configure NPM to provide authentication for the proxy server. Open a command shell and enter the following commands to configure NPM to use an HTTP and/or HTTPS proxy. $ npm config set proxy http://username:password@host:port $ npm config set https-proxy http://username:password@host:port Or add the settings directly to your ~/.npmrc file: proxy=http://username:password@host:port https-proxy=http://username:password@host:port ==== Step 2: Verify the install ==== After completion of the installer, enter the following: C:\> yarn -v The system should display the YARN version installed on your system. C:\> yarn -v v1.22.19 ===== RePoSyD CLI (Command Line Interface) ===== ==== Step 1: Installing as a global Node.js package ==== Open a command prompt (or PowerShell), and enter the following: C:\> yarn config set registry https://pkg.reposyd.de/registry yarn config v1.22.19 success Set "registry" to "https://pkg.reposyd.de/registry". Done in 0.04s. C:\> yarn global add @reposyd/cli yarn global v1.22.19 [1/4] Resolving packages... ... [4/4] Building fresh packages... success Installed "@reposyd/cli@1.5.1" with binaries: - reposyd Done in 42.99s. The installation of @reposyd\cli as a global package may fail, if you are using nvm to manage your Node.js versions. In this case use npm for the installation. $ npm config set registry https://pkg.reposyd.de/registry $ npm i -g @reposyd/cli Installing @reposyd/cli behind a Proxy Server If RePoSyD is installed in a corporate environment, you may need to configure YARN to provide authentication for the proxy server. Open a command shell and enter the following commands to configure NPM to use an HTTP and/or HTTPS proxy. $ yarn config set proxy http://username:password@host:port $ yarn config set https-proxy http://username:password@host:port Or add the settings directly to your ~/.yarnrc file: proxy=http://username:password@host:port https-proxy=http://username:password@host:port ==== Step 2: Verify Installation ==== C:\> reposyd -V 2.0.0 C:\> ===== RePoSyD Services ===== ==== Installation ==== Open a command prompt and run the following command: C:\> reposyd install c:\temp\reposyd info: root folder 'c:/temp/reposyd' created. info: intalling RePoSyD packages... info: RePoSyD packages installation completed info: creating RePoSyD configuration file... info: initializing repository... info: initialization completed url sqlite:c:/temp/reposyd/database?database=reposyd.sqlite schema 0.34.0 account admin password gukidaka uuid {e6700c3e-f17f-455f-a6a0-92d45dadd3ab} **Automatically Generated Password** Do not forget to write down the automatically generated password. If you don't want to use an autogenerated password, you specify your own password using the CLI option --password. C:\> reposyd install c:\temp\reposyd --password For more information, see [[manual:cli:start|RePoSyD CLI]]. ==== Folder Structure ==== The following folder structure is created for running the RePoSyD Services: ^Folder ^^^ Content ^ |**** |||Root folder of the installation.| | |app ||Contains the files of the RePoSyD Web Application | | |config ||Configuration files, e.g. RePoSyD API config. | | |data || | | | |backup | |Location of backup files. | | | |database |Location of the database files. | | | |log |Log files | | | |templates |Templates for email generation.| | |service ||Contains the files for running the RePoSyD REST API and Win/Mac service| ===== RePoSyD Web Application ===== ==== Manual Installation ==== The RePoSyD web application is normally installed during the installation of the RePoSyD REST API. To install the application manually, open a command prompt and run the following command: C:\> reposyd app install c:\inetpub\wwwroot info: RePoSyD App installation completed C:\> ==== Microsoft IIS (Web Server) Configuration ==== RePoSyD requires the installation of the following IIS server functions: * [[https://www.iis.net/downloads/microsoft/application-request-routing|Application Request Routing]] The following URL rewrite rules need to be set up for RePoSyD: ^ URL ^ Pattern ^ Target ^ ^ | %%http(s):///api%% | %%^%%api/(.*) | %%http://127.0.0.1:3000/{R:1}%% | The request is redirected to RePoSyD and /api is removed from the URL. A query string remains unchanged (option //append query string// enabled) | | %%http(s)://servername>/auth%% | %%^%%auth/(.*) | %%http://127.0.0.1:3000/auth/{R:1}%% | The request is redirect to RePoSyD and remains unchanged (option //append query string// enabled). | ==== nginx Configuration ==== location /api/ { proxy_pass http://127.0.0.1:32769; rewrite ^/api/?(.*) /$1 break; } location /auth { proxy_pass http://127.0.0.1:32769; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; }