Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:matrix:riot [2020/05/02 07:45] – [update] scipio | projects:matrix:riot [2022/11/04 08:21] (current) – removed sscipioni | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== matrix synapse ====== | ||
- | vr: | ||
- | * 172.30.18.45: | ||
- | * 172.30.18.54: | ||
- | |||
- | galileo: | ||
- | * matrix.csgalileo.org: | ||
- | * jitsi: meet.csgalileo.org (bilanciamento tra 1.meet.csgalileo.org e 2.meet.csgalileo.org) | ||
- | |||
- | |||
- | ===== synapse (matrix) ===== | ||
- | |||
- | * configurazione: | ||
- | * service: matrix-synapse.service | ||
- | |||
- | ==== aggiornamento ==== | ||
- | |||
- | normale apt | ||
- | |||
- | ==== install ==== | ||
- | |||
- | |||
- | < | ||
- | apt install nginx | ||
- | </ | ||
- | |||
- | installare da repository | ||
- | < | ||
- | wget -qO - https:// | ||
- | sudo add-apt-repository https:// | ||
- | |||
- | apt install matrix-synapse-py3 | ||
- | apt install python-matrix-synapse-ldap3 | ||
- | </ | ||
- | |||
- | a questo punto synapse si trova nel virtualenv / | ||
- | |||
- | ==== nextcloud auth ==== | ||
- | |||
- | python package synapse_g creato nella cartella / | ||
- | < | ||
- | cd / | ||
- | |||
- | / | ||
- | ├── setup.py | ||
- | ├── synapse_g | ||
- | │ | ||
- | │ | ||
- | </ | ||
- | |||
- | ==== setup con db postgresql ==== | ||
- | |||
- | Installare postgresql. | ||
- | |||
- | < | ||
- | apt install postgresql postgresql-contrib | ||
- | </ | ||
- | |||
- | Creare un utente e un database per synapse. | ||
- | |||
- | < | ||
- | su - postgres | ||
- | createuser --pwprompt synapse_admin | ||
- | |||
- | psql | ||
- | CREATE DATABASE synapse | ||
- | ENCODING ' | ||
- | LC_COLLATE=' | ||
- | LC_CTYPE=' | ||
- | template=template0 | ||
- | OWNER synapse_admin; | ||
- | </ | ||
- | |||
- | Installare i pacchetti per synapse e postgres | ||
- | |||
- | < | ||
- | apt install libpq5 | ||
- | / | ||
- | </ | ||
- | |||
- | Importante: prima di effettuare il porting mettere il nome del server nel file di configurazione " | ||
- | altrimenti lo script va in errore | ||
- | Il servername si trova in / | ||
- | |||
- | |||
- | Preparare le configurazioni | ||
- | |||
- | < | ||
- | cp / | ||
- | cp / | ||
- | |||
- | vim / | ||
- | database: | ||
- | name: psycopg2 | ||
- | args: | ||
- | user: " | ||
- | password: "la password del db per synapse_admin" | ||
- | database: synapse | ||
- | host: 127.0.0.1 | ||
- | cp_min: 5 | ||
- | cp_max: 10 | ||
- | </ | ||
- | |||
- | === Porting === | ||
- | |||
- | < | ||
- | systemctl stop matrix-synapse | ||
- | |||
- | synapse_port_db --sqlite-database / | ||
- | --postgres-config / | ||
- | | ||
- | mv / | ||
- | |||
- | systemctl start matrix-synapse | ||
- | </ | ||
- | |||
- | |||
- | ===== riot ===== | ||
- | |||
- | ambiente di sviluppo creato da https:// | ||
- | |||
- | ==== aggiornamento ==== | ||
- | |||
- | < | ||
- | cd /lab/riot | ||
- | source lib/ | ||
- | |||
- | cd matrix-react-sdk | ||
- | git co develop | ||
- | git pull | ||
- | git co verona | ||
- | git merge develop | ||
- | ... risolvere i conflitti | ||
- | yarn install | ||
- | cd .. | ||
- | |||
- | cd matrix-js-sdk | ||
- | git pull | ||
- | yarn install | ||
- | |||
- | |||
- | cd riot-web | ||
- | git co develop | ||
- | git pull | ||
- | git co verona | ||
- | git merge develop | ||
- | ... risolvere i conflitti | ||
- | yarn install | ||
- | </ | ||
- | |||
- | |||
- | test in locale | ||
- | < | ||
- | yarn start | ||
- | </ | ||
- | |||
- | deploy galileo | ||
- | < | ||
- | cd /lab/riot | ||
- | make deploy | ||
- | </ | ||
- | |||
- | deploy verona | ||
- | < | ||
- | cd /var/www | ||
- | cp -a riot-dev riot-backup/ | ||
- | </ | ||
- | < | ||
- | cd /lab/riot | ||
- | make deployvr | ||
- | </ | ||
- | ===== matrix-dimension ===== | ||
- | |||
- | ==== update ==== | ||
- | |||
- | < | ||
- | su - dimension | ||
- | cd matrix-dimension | ||
- | git pull | ||
- | npm install | ||
- | </ | ||
- | |||
- | < | ||
- | systemctl restart matrix-synapse.service | ||
- | </ | ||
- | |||
- | after 1 minute from start check with browser https:// | ||
- | ==== install ==== | ||
- | |||
- | |||
- | in synapse server create local user called dimension for matrix-dimension binding | ||
- | < | ||
- | / | ||
- | New user localpart [root]: dimension | ||
- | Password: | ||
- | Confirm password: | ||
- | Make admin [no]: | ||
- | Sending registration request... | ||
- | Success! | ||
- | </ | ||
- | |||
- | run browser in incognito mode and login with dimension credentials in https:// | ||
- | |||
- | {{ : | ||
- | |||
- | {{ : | ||
- | |||
- | |||
- | as user root | ||
- | < | ||
- | apt install g++ gcc sqlite3 make | ||
- | </ | ||
- | |||
- | |||
- | as user dimension | ||
- | |||
- | < | ||
- | nodeenv -n 10.19.0 venv | ||
- | . venv/ | ||
- | |||
- | unset NODE_ENV | ||
- | |||
- | # Download dimension | ||
- | git clone https:// | ||
- | cd matrix-dimension | ||
- | |||
- | # Install dependencies | ||
- | npm install | ||
- | |||
- | # Build it | ||
- | npm run build | ||
- | </ | ||
- | |||
- | < | ||
- | cp config/ | ||
- | </ | ||
- | |||
- | get token at https:// | ||
- | |||
- | verify token | ||
- | < | ||
- | TOKEN=xxxxxxx | ||
- | curl -H " | ||
- | </ | ||
- | |||
- | |||
- | edit config/ | ||
- | < | ||
- | homeserver: | ||
- | name: " | ||
- | clientServerUrl: | ||
- | mediaUrl: " | ||
- | accessToken: | ||
- | admins: | ||
- | - " | ||
- | dimension: | ||
- | publicUrl: " | ||
- | </ | ||
- | |||
- | < | ||
- | NODE_ENV=production npm run start:app | ||
- | </ | ||
- | |||
- | systemd service | ||
- | < | ||
- | [Service] | ||
- | ExecStart=/ | ||
- | |||
- | |||
- | # | ||
- | WorkingDirectory=/ | ||
- | Environment=NODE_ENV=production | ||
- | |||
- | # Restart timing | ||
- | Restart=always | ||
- | RestartSec=60 | ||
- | |||
- | # Output to syslog | ||
- | StandardOutput=syslog | ||
- | StandardError=syslog | ||
- | SyslogIdentifier=matrix-dimension | ||
- | |||
- | # User & group to run service as | ||
- | User=dimension | ||
- | |||
- | [Install] | ||
- | WantedBy=default.target | ||
- | </ |