Install / Initial Config. Install CentOS (01) Download CentOS 7 (02) Install CentOS 7; Initial Settings (01) Add an User (02) FireWall & SELinux (03) Configure Networking (04) Configure Services (05) Update System (06) Add Repositories (07) Configure vim (08) Configure sudo (09) Cron's Setting; NTP / SSH Server. NTP Server (01) Configure NTP. Install A2enmod Redhat. 0 Comments Read Now. Comments placed here should be directed to suggestions to improve the documentation or the server and can be removed.
This page describes how to install a brat server and its third-partydependencies.
(If you already have a running server, you may wish to read about annotation configuration next.)
Please note: you do not need to install brat to try it out;brat runs in your browser and a live demo system usable with anysupported browser islinked form the brat home page.
If you wish to set up your own local brat installation for yourannotation project, please follow the instructions below.
Table of contents
Quick start
The following brief technical instructions present a quick minimal wayto set up the brat server. If you are not sure if your setup fills thetechnical requirements, please skip this section and read the detailedinstructions below.
The brat server is aPython(version 2.5+) program that runs by default as aCGIapplication, and the installation script assumes a UNIX-likeenvironment. If you are setting up brat server in a compatibleenvironment with an existing web server that supports CGI, the quickstart instructions for using CGI should work.If you don’t have aweb server installed and want to try brat out locally, you may wanttry out the quick start instructions for thestandalone server. (For securityreasons, we strongly recommend serving brat via a full web server suchas Apache in production environments.)
First, download a brat package from the brat home page.
Then, unpack the package (e.g. in the public_html
subdirectory ofyour home directory)
Next, enter the created brat directory
The next step depends on whether you intend to run brat in a CGIenvironment or as a standalone server.
Quick start installation: using CGI
Run the installation script
and follow the instructions. You will be prompted for the followinginformation:
- brat username (e.g. “editor”)
- brat password (for the given user, e.g. “annotate”)
- administrator contact email (e.g. “admin@example.com”)
Finally, if you are not running the installation as superuser, thescript will prompt you for the sudo password. (This is necessary toassign write permissions to the work
and data
directories to theweb server.)
If this works, the brat installation is complete. Now that brat is installedyou will have to install and configure a CGI-capable web server if one is notalready available on your system. You then only need to make sure that yourweb server permits CGI for the brat directory (see the Apache 2.x sectionbelow for instructions).
Quick start installation: standalone server
First, please note the following:
- The brat standalone server only is available in brat v1.3 and above.
- The standalone server is experimental and should not be used for sensitive data or systems accessible from the internet.
Run the installation script in “unprivileged” mode
and follow the instructions (as above). Then, start the standaloneserver
You should then be able to access the brat server from the addressprinted out by standalone.py. For more detail, see thestandalone server instructionsbelow.
Quick start: next steps
After initial installation, you may want to set up some data of yourown in your brat installation. For this, look in the Placing Datasection below.
If you want to add additional users, you can edit the config.py
file, which contains further instructions.
If you feel that your installation requires a more fine-tunedconfiguration, please see the section Manual Installation below.
If you encountered any issues with these quick start instructions,read on for detailed instructions. You may also wish to check thetroubleshooting page.
Detailed Instructions
Preliminaries
The brat server is implemented in Python, and requires version 2.5 (orhigher in the 2.x series) of python to run. If you do not currentlyhave python installed, we recommend installing the most recent versionof python in the 2.x series from python.org.
In its standard setup, brat is a served through a web server.If you are installing brat server on a machine that is not currently running a web server, you should consider starting by installing one. brat is currently developed againstApache 2.x, and we recommend using Apache.
For serving brat via a web server,These instructions primarily assume Apache, but we do have alsoLigHTTPD configuration files in the repository if you prefer thisalternative, and any CGI-capable web server can be configured to runthe brat server.
Alternatively, you may wish to consider running brat using theexperimental standalone server included in version 1.3 and above.In this case, no web server is required.
Finally, these installation instructions and parts of the brat serverassume a UNIX-like environment. These instructions should work withoutchanges on most linux distributions. If you are running OS X (mac),please note a couple of OS X-specific points in the instructions below.If you are running windows, the easiest way to run a brat server is in a virtual machinerunning a UNIX-like operating system such asUbuntu.
Manual Installation
First, download a brat package from the brat home page.
Then, unpack the package
(where VERSION
is the version string, like “v1.1_Albatross”).Next, enter the created brat directory
Setting up working directories
The brat server needs to read and write data to several directories.Let’s create them:
We now need to set the permissions of the directories so that they canbe read and written by the web server. We recommend doing this byassigning the directories to the apache group and setting grouppermissions. To do this, you will need to know the apache group. Thefollowing script is provided for convenience for determining this
(if this doesn’t work, see the “Finding Your Apache 2 Group” sectionof this document).
Then simply change the group of the directories (replace${YOUR_APACHE_GROUP}
with the output you got above) and set thecorrect permissions:
If you can’t succeed with the above or you are not concerned withsecurity (say that it is a single-user system), you can run thecommand below instead. This will make the directories write-able andread-able by every user on your system. (This is not necessary if thecommand above succeeded.)
Setting up dependencies
brat uses JSON for client-servercommunication. As JSON support is not included in all supportedversions of python, you may need to set up a JSON library.
First, you can determine the version of python you are running with
if your python version is 2.5 or lower, you will need to installan external JSON library. As of v1.2, brat supports twoJSON libraries, UltraJSONand simplejson. You onlyneed to set up one of these, and UltraJSON is recommended as itis considerably faster.
To install UltraJSON, run the following in the brat root directory:
If this fails, or you prefer simplejson, install simplejson as
No other library setup is required for standard brat operation.
(if you require Japanese tokenization support, please set upMeCab,included in the external/
directory.)
brat server configuration
The overall configuration of the brat server is controlled byconfig.py
in the brat root directory. This configuration file isautomatically created when running install.sh
, but can be set upmanually as follows:
Put a configuration template in place:
cp config_template.py config.py
Edit the configuration to suit your environment using your favoritetext editor, e.g.
Detailed instructions for setup are contained in the configurationfile itself.
Sudo A2enmod Ssl
brat standalone server
As of version 1.3, brat includes an experimental standalone server.This is an alternative for running the brat server that doesn’trequire a separate web server such as Apache, and can be substantiallyfaster, reducing server response times by 90% in some cases.
However, the standalone server is not currently security-hardened oras comprehensively tested as the rest of brat. For these reason, westrongly recommend serving brat via a full web server such as Apachein production environments, projects involving sensitive data, andon systems accessible from the internet.
On a standard installation, the brat standalone server can typicallybe run simply as
(this command will prompt for your password.)
In more detail: to run the standalone server, you need to execute thescript standalone.py
in the brat directory. This script should havewrite permissing to the working directories (normally work/
anddata/
). If you have set these directories up using install.sh
orper the instructions in the section onworking directories,they should be writable by the Apache user (if one exists). Theabove attempts to determine the username for Apache(./apache-user.sh
), and then run standalone.py
as this user(sudo -u
).
If you do not have Apache installed, you may instead run thestandalone server with
where USER
is any user with write permissions to the brat workand data directories.
Placing Data
Your installation should now be ready, just place your data in thedata
directory and make sure it has the right permissions usingchmod
as you did above.
You can either place your data files directly in the data
directory,or create arbitraty directory structure under data
. We recommendcreating a subdirectory into data
for each (version of a) corpus youare working on.
Brat stores its data in a standoff format, using twofiles for each document: a .txt
file containing the document text(UTF-8 encoding), and a .ann
file containing the annotations. Tostart a new annotation project, you can simply place the .txt
filesin the desired location and create an empty .ann
file correspondingto each .txt
. After copying the .txt
files in the data
directory,the .ann
files can be created as follows:
(Remember also to set write permissions for these files.)
You can now access your brat installation by retrieving the brat directory orindex.xhtml
file from your web server using asupported web browser.
Third-party components
This part largely focuses on Ubuntu, but the instructions should bereadily applicable to other *NIX-based systems.
Apache 2.x
brat supports FastCGI which can speed up yourinstallation by roughly x10 since you won’t have to invoke the Pythoninterpreter for every request. If you want to use FastCGI as opposed to CGIkeep an eye out for configuration comments regarding it.
For FastCGI you need the flup Python library:
Install Apache 2.x if you don’t have it already:
From here, the setup process is different for OS X and for otherUNIX-like systems such as linux. Please check the section relevant toyour system below.
Apache setup on UNIX-like systems other than OS X
Next, let’s edit httpd.conf:
If you are installing brat into the public_html
subdirectory of your homedirectory, add the following lines:
If you are not installing into public_html
in your home directory, adjust the above (in particular the line <Directory /home/*/public_html>
) accordingly. If you installed into public_html
in your homedirectory, make sure that you have the userdir
module enabled:
For FastCGI you also want to install its module and then add it and therewrite
module that we use to redirect the CGI requests to FastCGI:
The final FastCGI step is detailed in .htaccess
in the brat installationdirectory, which involves uncommenting and configuring the rewrite
module.
Finally tell Apache 2.x to load your new configuration.
Apache setup on OS X
Next, let’s edit the apache httpd.conf:
where USER
is your username.
If you are installing brat into the Sites
directory in your homedirectory, make sure the following is included:
where USER
is again your username.
Finally, restart apache
(For FastCGI, we’re currenly trying to determine a configuration thatworks on OS X and will provide instructions once we have one.)
Finding Your Apache 2 Group
Ideally you should set all permissions as needed for the Apache 2 group, butfinding it can be painful.
Find out what the Apache group name is, it is usually apache
or www-data
;it can be found in apache2.conf
or httpd.conf
under /etc/apache2/
or/etc/httpd/
. Let’s assume it’s www-data
. Then:
Actually, due to the joy of Linux segmentation you can find the groupelsewhere as well. Here is a small heuristic that works on at least twoLinux distributions:
If what you get from this looks funky (like a variable), say with a leading $, try this:
If this doesn’t work either dive into /etc/group
and hope that you can findsomething that at least looks like apache
or www-data
:
Back-ups
There is a script that you can use with good old cron
.Do as follows.
Add a line like the one below to the crontab for your Apache user:
You will now have a back-up made into your work directory every morning atfive o’clock.
Skip to end of metadataGo to start of metadataInstall Apache/Httpd
For PHP 5
For PHP 7 (Ubuntu 16.04> and Debian 9>)
SUSE already comes with a preinstalled apache server we only need to enable additional add-ons
Enable the module version
Depending on the SUSE version one of the following php versions should be enabled
Install WebApp
Add the following lines to the earlier create kopano.list in /etc/apt/sources.list.d/
Take note that the following is an example for Debian 10. Adjust them according to your specific distribution if needed, such as Ubuntu_18.04
See Full List On Devops.ionos.com
If not already done for core add our key aswell
Install Apache
Now install kopano-Webapp
Add the following lines to the earlier create kopano.repo in /etc/yum.repos.d/
Take note that the following is an example for RHEL 7 and CentOS 7. Adjust them according to your specific distribution if needed
Add the following lines to the earlier create kopano.repo in /etc/zypp/repos.d/
Take note that the following is an example for SLE 12. Adjust them according to your specific distribution if needed.
We need to reload Apache/Httpd in order to enable the WebApp site.
Or use systemd
Please make sure that apache2 is enabled with systemd on startup
or use systemd
Since WebApp 3.4.0 secure cookies are enabled by default this means that you can't access the WebApp without ssl certificates.
This can be turned off by enabling insecure cookies in /etc/kopano/webapp/config.php
Requirements
Please make sure the web server is enabled on system startup.
It can be enabled using systemctl enable, for example
Go to the url/IP of your Webapp server and you should see the WebApp login page