-
Notifications
You must be signed in to change notification settings - Fork 0
6. Part 1 Installation of Datomic Database on FreeBSD 11.2
Tanveer Alam edited this page Nov 25, 2018
·
1 revision
Installation of Datomic Database on FreeBSD 11.2
https://www.youtube.com/watch?v=bnBPuN4J_TE https://docs.datomic.com/on-prem/dev-setup.html https://www.datomic.com/get-datomic.html
https://docs.datomic.com/on-prem/languages.html#third-party Python - https://github.com/gns24/pydatomic
- Installing Java(JDK) for Maven: https://www.digitalocean.com/community/tutorials/how-to-install-java-on-freebsd-10-1
root@:~/performance/datomic # freebsd-update fetch
root@:~/performance/datomic # freebsd-update install
root@:~/performance/datomic # pkg search ^openjdk
openjdk-7.161.01,1 Java Development Kit 7
openjdk-jre-7.161.01,1 Java Runtime Environment 7
openjdk6-b45,1 Oracle's Java 6 virtual machine release under the GPL v2
openjdk6-jre-b45,1 Oracle's Java 6 Runtime Environment under the GPL v2
openjdk8-8.181.13 Java Development Kit 8
openjdk8-jre-8.181.13 Java Runtime Environment 8
root@:~/performance/datomic # pkg install openjdk8-8.181.13
root@:~/performance/datomic # mount -t fdescfs fdesc /dev/fd
root@:~/performance/datomic # mount -t procfs proc /proc
root@:~/performance/datomic # vi /etc/fstab
--------------------------
# Append this two lines at the end
fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0
--------------------------
root@:~/performance/datomic # rehash
root@:~/performance/datomic # java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
Setting JAVA_HOME env - https://www.freebsd.org/doc/en/books/porters-handbook/using-java.html
root@:~/performance/datomic # bash
[root@ ~/performance/datomic]# export JAVA_HOME=/usr/local/openjdk8/
[root@ ~/performance/datomic]# echo $JAVA_HOME
/usr/local/openjdk8/
- Installing Maven (mvn) https://maven.apache.org/install.html Download it from - https://maven.apache.org/download.cgi
Link Checksums Signature
Binary zip archive apache-maven-3.6.0-bin.zip apache-maven-3.6.0-bin.zip.sha512 apache-maven-3.6.0-bin.zip.asc
[root@ ~/performance/datomic]# wget http://mirrors.wuchna.com/apachemirror/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip
[root@ ~/performance/datomic]# unzip apache-maven-3.6.0-bin.zip
[root@ ~/performance/datomic]# cd apache-maven-3.6.0/bin/
[root@ ~/performance/datomic/apache-maven-3.6.0/bin]# pwd
/root/performance/datomic/apache-maven-3.6.0/bin
[root@ ~/performance/datomic/apache-maven-3.6.0/bin]# export PATH=$PATH:/root/performance/datomic/apache-maven-3.6.0/bin
Check mvn
[root@ ~/performance/datomic/apache-maven-3.6.0/bin]# mvn -v
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T00:11:47+05:30)
Maven home: /root/performance/datomic/apache-maven-3.6.0
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: /usr/local/openjdk8/jre
Default locale: en_US, platform encoding: US-ASCII
OS name: "freebsd", version: "11.2-release-p4", arch: "amd64", family: "unix"
- Get Datomic Free Downloads - https://my.datomic.com/downloads/free Install Datomic
Filename Description Version Size Release Date Changes
datomic-free-0.9.5703.zip Datomic Free Edition 0.9.5703 43MB 2018-06-06 Changes
root@:~/performance/datomic # wget https://my.datomic.com/downloads/free/0.9.5703
root@:~/performance/datomic # unzip 0.9.5703.1
root@:~/performance/datomic # cd datomic-free-0.9.5703/
[root@ ~/performance/datomic/datomic-free-0.9.5703]# bin/maven-install
--------------------------
[INFO] Installing /root/performance/datomic/datomic-free-0.9.5703/datomic-free-0.9.5703.jar to /root/.m2/repository/com/datomic/datomic-free/0.9.5703/datomic-free-0.9.5703.jar
[INFO] Installing /root/performance/datomic/datomic-free-0.9.5703/pom.xml to /root/.m2/repository/com/datomic/datomic-free/0.9.5703/datomic-free-0.9.5703.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:40 min
[INFO] Finished at: 2018-11-22T07:49:11+05:30
[INFO] ------------------------------------------------------------------------
-----------------------------
Running Transactor
# Changes in bin/transactor
old - exec java -server -cp `bin/classpath` $XMX $XMS $JAVA_OPTS clojure.main --main datomic.launcher "$@"
changed - exec java -server -cp `bash ./bin/classpath` $XMX $XMS $JAVA_OPTS clojure.main --main datomic.launcher "$@"
root@:~/performance/datomic/datomic-free-0.9.5703 # bash ./bin/transactor config/samples/free-transactor-template.properties
Launching with Java options -server -Xms1g -Xmx1g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
Starting datomic:free://172.16.205.131:8000/<DB-NAME>, storing data in: data ...
System started datomic:free://172.16.205.131:8000/<DB-NAME>, storing data in: data
- Install Datomic Console: -https://my.datomic.com/downloads/free Sign Up first
If you choose to download Datomic Free instead, register to download Datomic Console which is not included in the downloads below.
Datomic Console
The Datomic Console is included in the Datomic Pro distribution. Datomic Free users can download it below.
The use of Datomic Console is governed by the terms of the Datomic Console EULA . By downloading Datomic Console, you are agreeing to those terms.
I understand and agree.
Download Datomic Console v0.1.216 -- Released 2017-08-02
[root@ ~/performance/datomic]# wget https://my.datomic.com/downloads/console/latest
scp datomic-console-0.1.216.zip to you instance location /root/performance/datomic
[root@ ~/performance/datomic]# unzip datomic-console-0.1.216.zip
Move contents of datomic-console-0.1.216/bin and datomic-console-0.1.216/lib to datomic-free-0.9.5703/bin and datomic-free-0.9.5703/lib
[root@ ~/performance/datomic]# cp -R datomic-console-0.1.216/bin/* datomic-free-0.9.5703/bin/
[root@ ~/performance/datomic]# cp -R datomic-console-0.1.216/lib/* datomic-free-0.9.5703/lib/
Run console
root@:~/performance/datomic/datomic-free-0.9.5703 # bash ./bin/console -p 8081 dev datomic:free://localhost:4334/
./bin/console: bin/classpath: /bin/bash: bad interpreter: No such file or directory
Error: Could not find or load main class clojure.main
If you get this error Edit bin/console file
root@:~/performance/datomic/datomic-free-0.9.5703 # vi ./bin/console
#!/bin/sh
cd `dirname $0`/..
/usr/bin/env java -server -Xmx1g $DATOMIC_JAVA_OPTS -cp lib/console/*:`bash ./bin/classpath` clojure.main -i "bin/bridge.clj" --main datomic.console "$@"
run again
root@:~/performance/datomic/datomic-free-0.9.5703 # bash ./bin/console -p 8081 dev datomic:free://localhost:4334/
Console started on port: 8081
dev = datomic:free://localhost:4334/
Open http://localhost:8081/browse in your browser (Chrome recommended)