Linux #5 2018 – Turtl Listing Server Installatie-script
- October 18, 2018
- 0
# Installatie van de Turtl server
# zie ook https://www.linode.com/docs/applications/cloud-storage/how-to-install-a-turtl-server-on-ubuntu/
sudo apt install wget curl libtool subversion make automake git m4
sudo wget https://dist.libuv.org/dist/v1.19.2/libuv-v1.19.2.tar.gz
# libuv installeren
sudo tar -zxvf libuv-v1.19.2.tar.gz
cd libuv-v1.19.2
sudo sh autogen.sh
sudo ./configure
sudo make
sudo make install
sudo ldconfig
# rethink installeren, hier halen wij een .deb binnen
wget https://github.com/srh/rethinkdb/releases/download/v2.3.6.srh.1/rethinkdb_2.3.6.srh.1.0bionic_amd64.deb
sudo dpkg -i rethinkdb_2.3.6.srh.1.0bionic_amd64.deb
sudo apt-get install -f
sudo dpkg -i rethinkdb_2.3.6.srh.1.0bionic_amd64.deb
sudp cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/default.conf
sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
sudo systemctl restart rethinkdb.service
# Clozure Common Lisp (CCL) installeren
svn co http://svn.clozure.com/publicsvn/openmcl/release/1.11/linuxx86/ccl
sudo cp -r ccl/ /usr/local/src
sudo cp /usr/local/src/ccl/scripts/ccl64 /usr/local/bin
# Qucklisp installeren
sudo adduser turtl
su – turtl
wget https://beta.quicklisp.org/quicklisp.lisp
ccl64 –load quicklisp.lisp
(quicklisp-quickstart:install)
(ql:add-to-init-file)
(quit)
wget https://common-lisp.net/project/asdf/asdf.lisp
ccl64 –load quicklisp.lisp
(load (compile-file “asdf.lisp”))
(quit)
git clone https://github.com/turtl/api.git
cd api
echo “(pushnew \”./\” asdf:*central-registry* :test #’equal)” > launch.lisp
echo “(load \”start\”)” >> launch.lisp
# Aanvullende dependencies installeren
echo “https://github.com/orthecreedence/cl-hash-util https://github.com/orthecreedence/cl-async https://github.com/orthecreedence/cffi https://github.com/orthecreedence/wookie https://github.com/orthecreedence/cl-rethinkdb https://github.com/orthecreedence/cl-libuv https://github.com/orthecreedence/drakma-async https://github.com/Inaimathi/cl-cwd.git” > ~/dependencies.txt
cd /home/turtl/quicklisp/local-projects
for repo in `cat ~/dependencies.txt`; do `git clone $repo`; done
echo “cwd \”/home/turtl/api\”)” >> ~/.ccl-init.lisp
echo “(load \”/home/turtl/api/launch\”)” >> ~/.ccl-init.lisp
cp /home/turtl/api/config/config.default.lisp /home/turtl/api/config/config.lisp
# In /home/turtl/api/config/config.lisp regel aanpassen:
# de regel die begint met “(defvar *site-url*” moet wijzen naar: “http://0.0.0.0:8181”
# hierna starten in ~ met: ccl64
# In de Turtl desktop client in plaats van naar https://api.turtl.it/v2 naar http://localhost:8181
# Als alles goed werkt, nog een reverseproxy er voor.