Turtl is a protected and evernote alternative that is encrypted. It’s an source that is open that lets you make notes, bookmark sites, shop papers, share passwords together with your colleagues, and much more. Turtl lets you manage your information in a place that is private. The source code of turtl client and server that is turtl is on github – you are able to deploy it by hand in your host.
In this guide, we’ll demonstrate step-by-step how exactly to install and configure Turtl host on CentOS 7. Turtl host is written in accordance Lisp, so we must install Lisp that is common and on the system. This tutorial will cover some topics installation that is including of on CentOS 7 system and installing of RethinkDB the turtl information shop.
Prerequisites
that which we is going to do
- Install developing Tools
- Install Libuv on CentOS 7
- Install and Configure RethinkDB
- Install popular Lisp
- Install Quicklisp
- Download and Install Turtl Server
- Running Turtl Server as something
- Install and Configure Apache as a Reverse Proxy for Turtl
- Testing
For this guide, we truly need the ‘developing Tools’ packages installed regarding the CentOS system.
Install ‘developing Tools’ utilising the yum demand below.
sudo yum team install “Development Tools”
Wait for many ‘developing Tools’ packages installation.
Step 2 – Install Libuv on CentOS 7
Libuv is a support that is multi-platform focused on asynchronous I/O. This library is needed by the Turtl Server, and we will install this library manually.
Before installing manually ‘Libuv’ to the system, let’s install openssl and openssl-devel.
yum -y install openssl*******) that is openssl-devel(******)Now go directly to the ‘/usr/local/src’ directory and down load the libuv.targz File wget that is using
cd /usr/local/src
wget http://dist.libuv.org/dist/v1.9.1/libuv-v1.9.1.tar.gz
Extract libuv.tar.gz and remove the master.
tar -xf libuv-v1.9.1.tar.gz
rm -f libuv-v1.9.1.tar.gz
Go to the ‘libuv’ directory.
cd libuv-v1.9.1/
Install Libuv using the development tools by running all commands below.
sh autogen.sh
./configure
make
make install
When it’s complete, run the command that is following
sudo ldconfig
The Libuv collection is set up regarding the CentOS 7 system.
Step 3 – Install and Configure RethinkDB
RethinkDB is an source that is open distributed document-oriented database, and the Turtl Server is using RethinkDB as a data store.
In this step, we will install RethinkDB from its own repository.
Add RethinkDB repository for CentOS 7 to the system.
sudo wget http://download.rethinkdb.com/centos/7/`uname -m`/rethinkdb.repo
-O /etc/yum.repos.d/rethinkdb.repo
RethinkDB repository has been added, now install it using the yum command in the following way.
sudo yum install that is-y*******)
After the installation is complete, copy the standard setup to your ‘/etc/rethinkdb/instances.d’ directory.
cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/default.conf
And produce service that is new for RethinkDB using the vim editor.
cd /etc/systemd/system
vim rethinkdb.service
Paste the configuration that is following.
# Automatically created by systemd-sysv-generator(*)( that is:systemd-sysv-generator(8)
SourcePath=/etc/init.d/rethinkdb
Description=LSB: This starts a set of rethinkdb server instances.
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
Before=shutdown.target
After=remote-fs.target
Conflicts=shutdown.target[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/init.d/rethinkdb start
ExecStop=/etc/init.d/rethinkdb stop
Now reload the systemd system and start the RethinkDB service.
systemctl daemon-reload
systemctl start rethinkdb
RethinkDB is now installed and running on the CentOS 7 system.
Check it using the command that is following
systemctl status rethinkdb(*******) that is*****************)netstat-plntu(******)And you should get the result as below.
Step 4 – Install Common Lisp
Common Lisp (CL) is a dialect of the Lisp programming language. It’s a known member from Lisp household. Within action, we shall install manually the ‘Clozure Common Lisp’ to the CentOS system.
Go to the ‘/usr/local/src’ directory and download the ‘Clozure Common Lisp’ for Linux 86/64-bit using wget command.
cd /usr/local/src
wget https://github.com/Clozure/ccl/releases/download/v1.11.5/ccl-1.11.5-linuxx86.tar.gz
Extract the ‘Clozure Common Lisp’ compressed file and remove the master file.
tar -xf ccl-1.(**********************************************************************************************************************************************************************************).tar.gz that is***************************************************************************************************************************************************************************************).5-linuxx(*****************)rm -f ccl-1.11.5-linuxx86.tar.gz
And you’re getting the ‘ccl’ directory. Go directly to the ‘ccl’ directory and copy the ‘ccl64’ container file to ‘/usr/bin’ directory.
cd /usr/local/src/ccl
sudo cp scripts/ccl64 /usr/bin/
Now confirm the ‘Clozure popular Lisp’ installation by operating the ‘ccl64’ demand.
ccl64
And ensure you get the end result as below.
The ‘Clozure popular lisp’ is currently set up. Assuming you wish to leave from ‘ccl’ shell, kind the stop demand.
(quit)
Step 5 – Install Quicklisp
Quicklisp is a library supervisor the typical Lisp. We truly need the ‘Quicklisp’ installed regarding the operational system because turtl loads all of its dependencies through the Quicklisp system.
Before installing Quicklisp, please add a user that is new turtl installation.
useradd -m -s /bin/bash turtl
passwd turtl
Now login while the ‘turtl’ individual.
su – turtl
Download the ‘quicklisp.lisp’ and ‘asdf.lisp’ files utilising the wget/curl demand.
wget https://common-lisp.net/project/asdf/asdf.lisp
curl -O https://beta.quicklisp.org/quicklisp.lisp
Now load ‘quicklisp.lisp’ utilising the ‘ccl64’ demand as below.
ccl64 –load quicklisp.lisp
And you’re getting the ‘ccl’ shell demand line. Install Quicklisp utilising the demand below.
(quicklisp-quickstart:install)
The demand will install all dependencies for Quicklisp. And after it is complete, include the Quicklisp ‘init’ file and load ‘asdf.lisp’.
(ql:add-to-init-file)
(load (compile-file “asdf.lisp”))
when it is complete, exit from ‘ccl’ shell.
(quit)
And eliminate ‘quicklisp.lisp’ and ‘asdf.lisp’ files.
rm -f asdf.lisp quicklisp.lisp
Quiclisp is set up.
Step 6 – down load and Install Turtl Server
In this task, we’ll install Turtl beneath the ‘turtl’ individual that individuals’ve produced on top.
Login while the ‘turtl’ individual and clone the source that is turtl using git.
su – turtl
git clone https://github.com/turtl/api.git
Go to the ‘api’ directory and create new file ‘launch.lisp’ using vim.
cd /home/turtl/api
vim launch.lisp
Paste the configuration that is following.
(pushnew "./" asdf:*central-registry* :test #'equal)
(load "start")
Save and exit.
Next, we must install some dependencies for turtl. Go directly to the quicklisp clone and directory all dependencies.
cd ~/quicklisp/local-projects
Download all dependencies by running all commands below.
git clone git://github.com/orthecreedence/cl-hash-util
git clone git://github.com/orthecreedence/vom
git clone git://github.com/orthecreedence/cl-async
git clone git://github.com/orthecreedence/cffi
git clone git://github.com/orthecreedence/wookie
git clone git://github.com/orthecreedence/cl-rethinkdb
git clone git://github.com/orthecreedence/cl-libuv
git clone git://github.com/orthecreedence/drakma-async
git clone https://github.com/Inaimathi/cl-cwd.git
And edit the ccl init file.
vim /home/turtl/.ccl-init.lisp
Go to the end of the line, paste the configuration that is following.
(cwd "/home/turtl/api")
(load "/home/turtl/api/launch")
Save and exit.
Now copy the standard turtl setup ‘config.lisp’ and edit it vim that is using
cp /home/turtl/api/config/config.default.lisp /home/turtl/api/config/config.lisp
vim /home/turtl/api/config/config.lisp
On the ‘server-bind’ line, add the localhost IP address as below.
defvar *server-bind* "127.0.0.1"
Save and exit.
After all of the configuration is complete, start the server that is turtl the ‘ccl64’ demand.
ccl64
The demand will install Turtl host API, when it is complete you’re getting the end result as below.
Press ‘Ctrl + c’ and kind ‘(quit)’ to leave.
Step 7 – operating Turtl Server as something
The Turtl host API is set up beneath the ‘turtl’ individual. As well as for this guide, we’ll run turtl as a ongoing service.
Go to the ‘/lib/systemd/system’ directory and create a new ‘turtl.service’ File vim that is using
cd /lib/systemd/system/
vim turtl.service
Paste these service that is turtl there.
[Unit]
Description=turtl_service
After=network.target mysql.service postgresql.service[Service]
User=turtl
ExecStart=/usr/bin/ccl64
Restart=always[Install]
WantedBy=multi-user.target
Save and exit.
Now reload systemd and start the service that is turtl the systemctl demand.
systemctl daemon-reload
systemctl begin turtl
Add the turtl solution to your boot some time check out the turtl solution status.
systemctl enable*****************)systemctl that is turtl turtl
You should get the result as below.
The turtl service is now running as a service on CentOS 7 system.
Step 8 – Install and Configure Apache/httpd as a Reverse Proxy for Turtl
In this tutorial, we will run the Turtl server under the Apache/httpd reverse proxy server. The Turtl server is now running under the IP that is local127.0.0.1′ with slot ‘8181’, and today we’ll install the Apache2 internet host and configure it as a reverse proxy the Turtl host.
Install apache2 with dependencies utilising the yum demand below.
yum -y install httpd mod_proxy_html
After the installation is complete, include brand new digital host declare Turtl.
Go to your ‘/etc/httpd/conf.d’ directory and produce a brand new host that is virtual ‘turtl.conf’.
cd /etc/httpd/conf.d/
vim turtl.conf
Paste the following host that is virtual here.
<VirtualHost *:80>ServerName turtl*****************)ServerAdmin that is.hakase-labs.co [email protected]
ProxyPreserveHost On
ProxyRequests off
RewriteEngine On<Proxy http://localhost:8181>
Order deny,allow
Allow from all
</Proxy>ProxyPass / http://127.0.0.1:8181/ Keepalive=On timeout=1600
ProxyPassReverse / http://127.0.0.1:8181/LogLevel info
CustomLog /var/log/httpd/turtl.log combined
</VirtualHost>
Save and exit.
Now check the Apache configuration and make sure there is no error.
apachectl configtest
Now, restart the service that is httpd allow it to introduce each time at system boot.
systemctl restart httpd
systemctl enable httpd
The Apache2/httpd internet host is set up regarding the CentOS 7 system, therefore will act as a reverse proxy for Turtl application on slot 8181.
Check it utilising the netstat demand below.
netstat -plntu
Step 9 – Testing
Download the client that is turtl and open it.
Click on the ‘Create an Account’ link.
Now click the ‘I will remember my login’ button.
Type password and your Turtl server domain to your email address title.
And click on the ‘Join’ switch.
Now you’re getting a window that is new click the ‘skip this step’ button.
And you will get the blank dashboard that is turtl. Right here, you could add note that is new password, files, bookmark etc.
The Turtl host installation on CentOS 7 system is finished effectively.
Comments