-
Notifications
You must be signed in to change notification settings - Fork 1
LexO‐lite Installation Guide
This guide aims to provide compilation and installation instructions for those who are not familiar with Java or Apache Tomcat.
You need:
- Apache Tomcat v8.0 or later
- MySQL v5.0 or later
- Java 1.8
If you haven't already, install Tomcat: apt install tomcat9
Check if it's running by visiting http://localhost:8080
in a webbrowser.
Tomcat needs access to the LexO-lite configuration/lexicon-folder wich is located at
/.LexO-lite/
, but since Tomcat is sandboxed to certain folders by systemd you need to give it access to the LexO folder.
Create the directory /etc/systemd/system/tomcat9.service.d/
and in it create the file override.conf
containing:
[Service]
ReadWritePaths=/.LexO-lite/
Then restart the service by executing:
systemctl daemon-reload
systemctl restart tomcat9
LexO-lite requires a UTF-8 Database LexO_users
to store user data.
- Open the MySQL console by typing
mysql
- Create the database LexO_users:
CREATE DATABASE LexO_users CHARACTER SET utf8 COLLATE utf8_bin;
- Create a user and give it access to the database:
CREATE USER 'USERNAME'@'localhost' IDENTIFIED BY 'PASSWORD'; GRANT ALL ON LexO_users.* TO 'USERNAME'@'localhost'; FLUSH PRIVILEGES;
Replace USERNAME and PASSWORD with your preferred ones.
For compiling we will use Maven.
apt install maven
To compile LexO-lite you first need to compile the dependencies OWL-API and SPARQL-DL .
Do the following for every dependecy:
- Download dependency from github
- Navigate to the folder that contains the file pom.xml
- execute the command
mvn install
-
Download the LexO-lite source-code from github
-
Before compiling you need to tell LexO to use the MySQL database and user that you've created earlier. To do this navigate to
LexO-lite-master/src/main/resources/
and open the filehibernate.cfg.xml
.Change the lines
<property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">root</property>
to the username and password you created for your LexO_users database and save the file.
-
Navigate back to the folder that contains the file pom.xml
-
execute the command
mvn install
-
A new folder
target
has been created, in it you will find the fileLexO-lite-1.0-SNAPSHOT.war
-
Stop Apache Tomcat:
systemctl stop tomcat9
-
Create the config/lexicon-folder
/.LexO-lite/
. -
In it create the file
lexolite.properties
containing:lexiconFileName=mylexicon.owl lexiconNamespace=http\://lexica/mylexicon\# lexiconFolder=.LexO-lite/ lexiconExportFileName=exportedLexicon
-
(OPTIONAL) If you want to include an ontology, also add the following to
lexolite.properties
:domainOntologyFileName=domainOntology.owl domainOntologyNamespace=http\://ontologies/myontology\# domainOntologyFolder=.LexO-lite/
-
Copy the empty lexicon file
mylexicon.owl
fromLexO-lite-master/lexicon
to.LexO-lite/
. -
(OPTIONAL) If you did step 4, open the ontology you want to import with a text editor and change the Namespace to:
xmlns:ONTOLOGYNAME="http://ontologies/myontology#"
Where
ONTOLOGYNAME
is the name of your ontology.Save it as
domainOntology.owl
and copy it to.LexO-lite
-
Give Tomcat the rights to access and write to the .LexO-lite folder and the containing files.
chown -R tomcat:tomcat /.LexO-lite/
-
Navigate to
LexO-lite-master/target/
and copy the .war file to/var/lib/tomcat9/webapps/
cp LexO-lite-1.0-SNAPSHOT.war /var/lib/tomcat9/webapps/
-
(OPTIONAL) LexO will be at
localhost:8080/NAME-OF-WAR-FILE
, so you can rename it however you like. In the next steps we will assume it is namedLexO-lite.war
-
Start tomcat:
systemctl start tomcat
-
Call the servlets for creating the database and populating it with the default admin user:
http://localhost:8080/LexO-lite/servlet/domainCreator?command=create
http://localhost:8080/LexO-lite/servlet/domainCreator?command=preset
If everything went right, you should see the message
OK
when executing these commands. -
Open LexO
http://localhost:8080/LexO-lite/
and log in with the default username and passwordadmin
.