πΎ Archived View for any-key.press βΊ vostok βΊ how_to_run_on_openbsd.gmi captured on 2023-09-28 at 15:42:07. Gemini links have been rewritten to link to archived content
β‘οΈ Next capture (2024-05-10)
-=-=-=-=-=-=-
ΠΠ΄Π΅ΡΡ Ρ ΠΎΠΏΠΈΡΡΠ²Π°Ρ, ΠΊΠ°ΠΊ Ρ ΡΠ°Π·Π²Π΅ΡΠ½ΡΠ» ΡΠ΅ΡΠ²Π΅Ρ vostok Π΄Π»Ρ Ρ ΠΎΡΡΠΈΠ½Π³Π° ΡΡΠΎΠΉ ΠΊΠ°ΠΏΡΡΠ»Ρ Π½Π° ΠΌΠ°ΡΠΈΠ½Π΅ ΠΏΠΎΠ΄ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ΠΌ ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΎΠ½Π½ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΡ OpenBSD.
# adduser Use option ``-silent'' if you don't want to see all warnings and questions. Reading /etc/shells Check /etc/master.passwd Check /etc/group Ok, let's go. Don't worry about mistakes. There will be a chance later to correct any input. Enter username []: _vostok Enter full name []: Enter shell csh git-shell ksh nologin sh [ksh]: nologin Uid [1005]: Login group _vostok [_vostok]: Login group is ``_vostok''. Invite _vostok into other groups: guest no [no]: Login class authpf bgpd daemon default dovecot mysqld pbuild staff unbound vmd xenodm [default]: daemon Enter password []: Disable password logins for the user? (y/n) [n]: y Name: _vostok Password: **** Fullname: _vostok Uid: 1005 Gid: 1005 (_vostok) Groups: _vostok Login Class: daemon HOME: /home/_vostok Shell: /sbin/nologin OK? (y/n) [y]: Added user ``_vostok'' Add another user? (y/n) [y]: n Goodbye!
# su -s /bin/sh _vostok $ cd ~ $ git clone --branch v0.0.3 ssh://anonymous@got.any-key.press/vostok
$ cd vostok/ $ make make -C vostok c++ -O2 -pipe -Wall -Wextra -std=c++11 -c -o transport.o transport.cc <...> c++ -O2 -pipe -Wall -Wextra -std=c++11 -c -o vostok.o vostok.cc c++ -o vostok transport.o error.o gemini.o args.o parse_url.o open_file.o vostok.o -ltls
# cd /home/_vostok/vostok # make install make -C vostok install mkdir -p -m 755 /bin install -m 755 vostok /bin/vostok
# mkdir /var/vostok # chown _vostok:_vostok /var/vostok/ # su -s /bin/sh _vostok $ cd /var/vostok
$ mkdir cert $ openssl req -newkey rsa:4096 -nodes -keyout cert/server.key -x509 -days 36500 -out cert/server.crt Generating a 4096 bit RSA private key <...> writing new private key to 'cert/server.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) []: State or Province Name (full name) []: Locality Name (eg, city) []: Organization Name (eg, company) []: Organizational Unit Name (eg, section) []: Common Name (eg, fully qualified host name) []:any-key.press Email Address []:continue@to.any-key.press
$ mkdir capsule $ echo "# ΠΠΎΠ±ΡΠΎ ΠΏΠΎΠΆΠ°Π»ΠΎΠ²Π°ΡΡ" > capsule/index.gmi
# cat /etc/rc.d/vostok #!/bin/ksh daemon_args="-a 46.23.89.166 -k /var/vostok/cert/server.key -c /var/vostok/cert/server.crt -f /var/vostok/capsule -m /usr/share/misc/mime.types" daemon_user="_vostok" daemon="vostok ${daemon_args}" . /etc/rc.d/rc.subr pexp="${daemon}.*" rc_reload=NO rc_bg=YES rc_cmd $1
# chmod +x /etc/rc.d/vostok
# rcctl enable vostok # rcctl start vostok vostok(ok)
$ amfora any-key.press