Turtl API Server Installation CentOS 7
Clone and Configure Turtl
- Create a user for turtl API:
sudo useradd turtl - Switch user to
turtl:sudo su turtl - Change directory to
turtl's home:cd ~ - Install Clozure CL
- Install RethinkDB and create an instance for Turtl API
- Install
libuv:sudo yum install libuv - Clone Turtl repo:
git clone https://github.com/turtl/api.git - Copy Turtl API config:
cp config/config.default.lisp config/lisp - Edit and configure
config/config.lisp, make sure to update the following parameters:(defvar *local-upload* "<local upload directory>" (defvar *local-upload-url* "<upload url>"
Setup Up Service
Create a service file at /usr/lib/systemd/system/turtl.service with the following entry:
[Unit]
Description=Turtl API Server
[Service]
User=turtl
Group=turtl
ExecStart=/usr/local/bin/ccl64 --load /home/turtl/api/start.lisp
KillMode=process
[Install]
WantedBy=multi-user.target
Start and enable the service:
sudo systemctl start turtl
sudo systemctl enable turtl
(OPTIONAL) Configure Reverse Proxy in Apache
Create httpd virtual host configuration /etc/httpd/conf.d/turtl.conf with the following content, make sure to change <turtl domain> to your own domain name:
<VirtualHost *:80>
#Server name configuration
ServerName <turtl domain>
ServerAdmin webmaster@<turtl domain>
#Proxy configuration
ProxyPreserveHost on
ProxyRequests off
ProxyPass / http://localhost:8181/
ProxyPassReverse / http://localhost:8181/
#Logging configuration
ErrorLog /var/log/httpd/turtl.err
LogLevel warn
</VirtualHost>