Jump to content

User:Gifti/Tcl

From Wikitech

Set up a dwl instance

Become root

sudo su -

Install packages

apt-get install fossil build-essential automake bc libssl-dev libmariadbclient-dev-compat libcurl4-gnutls-dev rlwrap poppler-utils cron

Change directory

cd /usr/src

tcl

fossil clone https://core.tcl-lang.org/tcl/ tcl.fossil
mkdir tcl
cd tcl
fossil open ../tcl.fossil 4ccc
sed -i 2157s/4/6/ generic/tcl.h
cd unix
./configure --prefix=/usr
make all install
cd ../..

tcllib

fossil clone https://core.tcl-lang.org/tcllib/ tcllib.fossil
mkdir tcllib
cd tcllib
fossil open ../tcllib.fossil
./configure --prefix=/usr
make all install
cd ..

tdom

fossil clone https://core.tcl-lang.org/tdom/ tdom.fossil
mkdir tdom
cd tdom
fossil open ../tdom.fossil
cd unix
../configure --prefix=/usr
make install
cd ../..

tls

fossil clone https://core.tcl-lang.org/tcltls/ tls.fossil
mkdir tls
cd tls
fossil open ../tls.fossil b5c4
./autogen.sh
./configure --prefix=/usr --disable-stubs --with-tcl=/usr/lib --with-openssl-dir=/usr/lib/x86_64-linux-gnu
make install
cd ..

mysqltcl-3.052

curl -o- http://www.xdobry.de/mysqltcl/mysqltcl-3.052.tar.gz > mysqltcl-3.052.tgz
tar xzf mysqltcl-3.052.tgz
cd mysqltcl-3.052
./configure --prefix=/usr --exec-prefix=/usr --with-mysql-lib=/usr/lib/x86_64-linux-gnu
make install
cd ..

TclCurl-7.22.0

curl -o- http://archive.ubuntu.com/ubuntu/pool/universe/t/tclcurl/tclcurl_7.22.0.orig.tar.gz > tclcurl-7.22.0.tgz
tar xzf tclcurl-7.22.0.tgz
cd TclCurl-7.22.0
./configure --prefix=/usr --exec-prefix=/usr
make install
cd ..

trf2.1.4 (Trf/native sha1)

curl -o- https://master.dl.sourceforge.net/project/tcltrf/tcltrf/2.1.4/trf2.1.4.tar.gz?viasf=1 > trf-2.1.4.tgz
tar xzf trf-2.1.4.tgz
cd trf2.1.4
./configure --prefix=/usr --exec-prefix=/usr
sed -i s/-DHAVE_MD2_H=1\ // Makefile
sed -i s/84/86/ generic/registry.c
make install
cd ..

xmlgen-1.4 (htmlgen)

curl -o- https://master.dl.sourceforge.net/project/tclxml/xmlgen/v1.4/xmlgen-1.4.tar.gz?viasf=1 > xmlgen-1.4.tgz
tar xzf xmlgen-1.4.tgz
cd xmlgen-1.4
tclsh8.7 bras-sa prefix=/usr install
cd ..

sqlite3 (cookiejar)

fossil clone https://www.sqlite.org/src sqlite.fossil
mkdir sqlite
cd sqlite
fossil open ../sqlite.fossil release
./configure --prefix=/usr
make all install
cd ..

Cinder volume remount

cd /home
tar czf /srv/taxonbot.tgz taxonbot
lsblk -o +uuid
/etc/fstab:
taxonbot: UUID=6fe5773e-b097-43eb-bc95-f8b125e69792 /srv ext4 discard,nofail,x-systemd.device-timeout=2s 0 2
taxonbota: UUID=458a4bcd-f033-4417-9c18-f01efb10379c /srv ext4 discard,nofail,x-systemd.device-timeout=2s 0 2
taxonkatbot: UUID=6db93f18-58a0-4317-b0d3-05e9a81b5e5a /srv ext4 discard,nofail,x-systemd.device-timeout=2s 0 2
systemctl daemon-reload
mount /srv
cd /home
tar xzf /srv/taxonbot.tgz

Webserver (taxonbot)

Security group: web

Redirect proxy

apt-get install lighttpd

/etc/lighttpd/lighttpd.conf:

server.document-root        = "/home/taxonbot/web/"
server.modules             += ( "mod_cgi" )
cgi.assign                  = ( ".tcl" => "" )
sudo systemctl enable --now lighttpd