Install A2enmod Redhat

In this article. The following instructions assume a clean environment and show how to install PHP 7.x, the Microsoft ODBC driver, the Apache web server, and the Microsoft Drivers for PHP for SQL Server on Ubuntu 16.04, 18.04, and 20.04, RedHat 7 and 8, Debian 8, 9, and 10, Suse 12 and 15, Alpine 3.11, and macOS 10.13, 10.14, and 10.15. Following the tutorial 'How To Set Up ModRewrite' indicates I should run the command 'sudo a2enmod rewrite', but I mark: sudo: a2enmod: command not found anyone know how to fix it.

If you want to install Akaunting for a demo on a local server or for permanent purpose on cloud/hosting VPS server then here is the tutorial to guide you the steps for the installation of Akaunitng on Ubuntu, CentOS, Debian, Linux, Elementary OS and other similar Linux.

Akaunting is free and open source accounting software uses PHP & MySQL to run and available on GitHub. Thus, no need to use any client or the installation of accounting software on each and every system of a company or home. Any user who wants to use the Akaunting for small and medium business or personal usage can access it locally or remotely with the help of the internet and browser, once installed.

It provides a web interface like some WordPress based website and the procedure of its setup is also similar to it. That’s why it is not only user-friendly but also device too. Yes, we can use it on smartphones and tablets as well.

Akaunting Features:

  • Completely Free accounting software to use.
  • Access financial data online anytime on Mac, PC, tablet or mobile phone.
  • Open Source Accounting software with Github repository
  • Add deposits to and transfers between accounts
  • Send professional invoices to clients
  • Vendor Management system
  • Create and manage bills
  • Add non-billable expenses
  • Manage the finances of multiple companies
  • Accept bulk payments
  • Automatically create invoices, revenues, bills, and payments for ongoing jobs
  • Discount management
  • Customer Summary
  • Graph and Visual reporting
  • Mutlicurrencies support

Akaunting requirements:

The requirements of this software are very common and easily provided by almost every hosting service provider.

  • PHP 7.2 or higher
  • Web Server (eg: Apache, Nginx, IIS)
  • Database (eg: MySQL, PostgreSQL, SQLite, SQL Server)
  • URL Rewrite (mod_rewrite)
  • Php extensions:
    • PDO
    • OpenSSL
    • Mbstring
    • Tokenizer
    • XML
    • Zip
  • Official website and Github link of this software
Install Akaunting software on Ubuntu or CentOS Linux

Install Akaunting software on Ubuntu or CentOS Linux

Almost all the steps are same for both Ubuntu and CentOS, expect a few such as Apache installation command.

1: Install Apache server for Akaunting

If you already have Apache installed on your Linux server or Desktop where you want to setup Akaunting then move to the next step.

For Ubuntu, Debian and Linux

sudo apt update

sudo apt install apache2

For CentOS & RedHat

yum update

yum install httpd

2. Enable and Start Apache

Once the installation procedure is completed on your server, run the following commands to enable and start the webserver along with system boot.

Ubuntu, Debian and Linux Mint

sudo systemctl enable apache2
sudo systemctl start apache2

CentOS, Redhat and Fedora
sudo systemctl enable httpd

sudo systemctl start httpd

3. Install MySQL server for Akaunting database

To store financial data created by the Akaunting software, we need some database and that would be provided by MySQL. However, you can also use PostgreSQL and SQLite.

To install MySQL on Debian or Ubuntu-based systems use this command:

sudo apt install mysql-server

Whereas for CentOS or Redhat, one can use this one:

yum install mysql-sever

4. Enable MySQL services

After setting up of MySQL, just like Apache, we also have to enable and start this database service at boot level, means whenever our system reboots, Apache and MySQL services should start automatically.

sudo systemctl start mysql
sudo systemctl enable mysql

5. Akaunting database setup

Now using the following commands to create a database that we will use in this opensource accounting software. It will be the same for any Linux OS.

See More Results

sudo mysql -u root -p

create database h2smedia;

create user h2s;

GRANT ALL ON h2smedia.* TO 'h2s'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

flush privileges;

exit;

A2enmod

Note: Replace the red colour text with whatever you want to use.

6. Akaunting supports PHP 7.2 or high version along with modules

The install Akaunting, minimum PHP version we need to set up for this open-source accounting software is PHP 7.2 or higher.

For Ubuntu, Debian and their equal Linux, here are the commands:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php

sudo apt update

sudo apt install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-imap php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2-ldap php7.2-zip php7.2-curl

To install PHP on CentOS and other similar Linux

sudo yum install epel-release yum-utils -y

sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

sudo yum-config-manager --enable remi-php72

sudo yum update

sudo yum install php libapache2-mod-php php-common php-imap php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-ldap php-zip php-curl

7. Download zipped Akaunting file to setup

In this step, we will download the latest release file of the Akaunting free software and then extract the same in the public web folder for further usage.

Ubuntu or Debian

sudo apt install git

CentOS or Redhat

sudo yum install git

Clone the latest version of Akaunting available on the Github repository

cd /var/www/html/

git clone https://github.com/akaunting/akaunting.git

Now, change the permission of the cloned folder:

sudo chown -R www-data:www-data /var/www/html/akaunting/

If you get an error” chown: invalid user: ‘www–data:www-data’” after running the above command use this one:

sudo chown -R apache:apache /var/www/html/akaunting/

Now give the apache user full read and write permission:

sudo chmod -R 755 /var/www/html/akaunting/

See: 10 top opensource accounting software

8. Configure Apahce2 site configuration file for Akaunting

Here, we will create an Apache site configuration file for Akaunting to tell it where to look the folder to execute the files and what other things should it follow.

Ubuntu: sudo apt install nano

CentOS: yum install nano

Create a file:

Ubuntu or Debian

sudo nano /etc/apache2/sites-available/akaunting.conf

for CentOS

sudo nano /etc/httpd/sites-available/akaunting.conf

Now add the following lines:

Replace the red text with your own domain or values.

To save and exit the nano editor, press: Ctrl+X keys and type: Y and then hit the Enter button.

Enable the configuration and rewrite modules.

sudo a2ensite akaunting.conf
sudo a2enmod rewrite


Finally, restart the apache to make the changes into effect.

Ubuntu: sudo systemctl restart apache2

CentOS: sudo systemctl restart httpd

Introduction

9: Setup & Dashboard of Akaunting open source accounting software

Now, everything is ready, go to your browser and open the server IP address or domain name (if you are installing it on cloud or VPS hosting).

Here, we are installing Akaunting for a demo on our local server, thus we are using the local IP address of the same.

  1. As you point the domain or IP to access the server, a setup page of the Akaunting will open. First, select the language in which you wan to install it, by default it will be English.

    Select language

  2. Add the details of MySQL database which we have created in this article.
  3. Add the details of the company along with admin email and password which will be used to access this free accounting software from anywhere.

    Company and admin details

  4. Finally, the Dashboard of the software will be in front of you. Now, start performing your financial calculations.

    Akaunting free accounting software installed on Ubuntu Linux


    Other Articles:

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.pyfile, 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.

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

How To: Enable/Disable Apache2 Modules And Configuration ...

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.

NOTE: FastCGI support in brat is still somewhat experimental and there are known issues relating in particular to failures to reload aspects of the system on change to configuration files. We recommend to only use FastCGI for fixed annotation configurations.

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

Install Apache

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

Requirements

There is a script that you can use with good old cron.Do as follows.

Centos A2enmod Apache的安全增强配置 - Linux - 服务器之家

Add a line like the one below to the crontab for your Apache user:

How Do I Enable Apache Modules From The Command Line In RedHat?

You will now have a back-up made into your work directory every morning atfive o’clock.