diff --git a/node/README.md b/node/README.md new file mode 100644 index 0000000..750b74a --- /dev/null +++ b/node/README.md @@ -0,0 +1,40 @@ +--- +gitea: none +include_toc: true +--- +# NodeJS + +## install + +install node version manager + +``` +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash +export NVM_DIR="$HOME/.nvm" +nvm install --lts +nvm use --lts +``` + +## npm node package manager installieren + +``` +npm install +``` + +## Run small Webserver on WSL/Windows + +### Installation + +``` +sudo npm install http-server -g +``` + +### Running it + +First navigate to the folder that is your web root, then + +``` +http-server +``` + +Website is available on `http://localhost:8080` \ No newline at end of file diff --git a/s3/README.md b/s3/README.md new file mode 100644 index 0000000..deafc8f --- /dev/null +++ b/s3/README.md @@ -0,0 +1,50 @@ +--- +gitea: none +include_toc: true +--- +# S3 + +## Verbindung mit Console + +(am besten WSL) mit rclone. Das `rclone.conf` könnte z.B. so aussehen: + +``` +[zurich] +type = s3 +provider = Ceph +env_auth = false +access_key_id = a1a1a1a1a1a1a11a1a1a1a1a1 +secret_access_key = b2b2b2b2b2b2b2b2b2b2bb +endpoint = https://irgendwas.irgendwas-s3.ch +acl = private +``` + +### Verbindung testen (gibt Buckets pro Standort aus): + +``` +rclone lsd zurich:/ +``` + +### Auflisten von Dateien + +``` +rclone --config rclone.conf ls lausanne:docuteam-backup-backup/backup_docuteam_ch +``` + +### Auflisten von Ordnern + +``` +rclone --config rclone.conf lsd lausanne:docuteam-backup-backup/backup_docuteam_ch +``` + +### Kopieren einer Datei nach lokal + +``` +rclone --config rclone.conf copy lausanne:docuteam-backup-backup/einFile.txt . +``` + +oder umgekehrt: + +``` +rclone copy c:\pfad\blabla zurich:pfad/bla -v -P +``` diff --git a/tls-ssl/README.md b/tls-ssl/README.md new file mode 100644 index 0000000..4a18c64 --- /dev/null +++ b/tls-ssl/README.md @@ -0,0 +1,59 @@ +--- +gitea: none +include_toc: true +--- +# SSL/TLS + +Übersicht: https://www.sslmarket.ch/ssl/formate-von-ssl-zertifikaten-und-ihre + +## cacerts / jave +## Neues Zertifikat in cacerts einfügen + +``` +keytool -importcert -file cert.pem -alias nwvappdaing001t -keystore cacerts_tryout +``` + +### Zertifikat aus cacerts exportieren + +``` +keytool -export -storepass changeit -alias arc2004.bgov.ch -keystore cacerts -file arc2003.bgov.ch.crt +``` + +### Alle Einträge in cacerts auflisten + +``` +keytool -list -v -keystore "c:\...\cacerts" > cacerts_output.txt +``` + +### Alter Eintrag in cacerts löschen + +``` +keytool -delete -alias aliasname -keystore ..\cacerts +``` + +## Verschiedenes + +### PKS12 (.pfx) in base64 umwandeln + +``` +openssl pkcs12 -in filename.pfx -clcerts -nokeys -out filename.pem +``` + +### PFX erstellen aus server-zertifikat und key + +``` +openssl pkcs12 -export -in linux_cert+ca.pem -inkey privateekey.key -out output.pfx +``` + +Oder mit Keystore Explorer: + + - Root als base64 exportieren + - Intermediate als base64 exportieren + - Serverzertifikat durch M. Kandlbinder geliefert und in C:\docuteam\ssl-zertifikate-06-2022 abgelegt + - In Keystore Explorer: Neu + - PKCS#12 wählen + - Root und Intermediate importieren + - Schlüsselpaar PKCS#8 erstellen, dabei Key und Serverzertifikat angeben + - default PW geben + - Abspeichern als PFX + - PFX bei Fedora Servern in Tomcat Conf Ordner ablegen