What is ProcessMaker and how to install it on Ubuntu Server 16.04

ProcessMaker is an open source Business Process Management (BPM) platform designed to automate workflows and improve business efficiency. Business analysts and IT users can create process maps, build web forms, set email notifications, build reports, and more. Analysts can be streamlining processes while decision makers can monitor progress with flexible dashboards and KPIs, all starting within minutes of launching the application. With mobile applications and support for RESTful APIs, the full functionality of the application can be brought with you anywhere and adds additional value to existing applications. Say goodbye to lost or delayed forms, redundant emails, and confusing excel spreadsheets and hello to efficiently managed workflows.

Installation:

Before we start the installation go ahead for LAMP installation with this link. Be informed that ProcessMaker 3 is not compatible with Php7.

Step 1:

Ubuntu 16.04 comes with PHP 7 which is not supported by ProcessMaker. However, PHP 5.6 can be installed from an alternative repository:

~$ sudo add-apt-repository ppa:ondrej/php

~$ sudo apt-get update

~$ sudo apt-get install apache2 mysql-server php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml php5.6-gd php5.6-ldap php5.6-curl php5.6-cli php5.6-soap

Step 2:

The default configuration of PHP should be able to run ProcessMaker, however, check the following settings if PHP’s configuration file php.ini has been modified.

~$ sudo nano /etc/php/5.6/apache2/php.ini

Search for the following lines and edit them using the following configurations:

file_uploads = On

short_open_tag = On

memory_limit = 512M

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

display_errors = Off

post_max_size = 24M

upload_max_filesize = 24M

It is also recommended to set the date.timezone to a your time zone as shown below:

date.timezone = Asia/Istanbul

Step 3:

Go to ProcessMaker’s SourceForge page and download a recent tarball of ProcessMaker and then decompress it:

~$ wget https://netix.dl.sourceforge.net/project/processmaker/ProcessMaker/3.2.1/processmaker-3.2.1-community.tar.gz

~$ sudo tar -C /opt -xzvf processmaker*

Set file permissions:

~$ cd /opt/processmaker

~$ sudo chmod -R 770 shared workflow/public_html gulliver/js gulliver/thirdparty/html2ps_pdf/cache

~$ cd workflow/engine/

~$ sudo chmod -R 770 config content/languages plugins xmlform js/labels

~$ sudo chown -R www-data:www-data /opt/processmaker

 

Step 4:

Grant a user on MySQL:

~$ mysql -u root -p

mysql> grant all on *.* to ‘USER’@’localhost’ identified by ‘PASSWORD’ with grant option;

mysql> exit;

Replace USER with the name of your MySQL user and PASSWORD with the password for that user and start the service:

~$ sudo service mysql start

 

Step 5:

Configure Apache:

Copy the sample ProcessMaker configuration file (pmos.conf.example):

~$ sudo cp /opt/processmaker/pmos.conf.example /etc/apache2/sites-available/pmos.conf

Then edit the pmos.conf file to fit your environment:

~$ sudo nano /etc/apache2/sites-available/pmos.conf

 

#processmaker virtual host

<VirtualHost your_ip_address >

ServerName “your_processmaker_domain

DocumentRoot /opt/processmaker/workflow/public_html

DirectoryIndex index.html index.php

<Directory /opt/processmaker/workflow/public_html>

Options Indexes FollowSymLinks MultiViews

AddDefaultCharset UTF-8

AllowOverride All

Require all granted

ExpiresActive On

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^.*/(.*)$ app.php [QSA,L,NC]

</IfModule>

#Deflate filter is optional. It reduces download size, but adds slightly more CPU processing:

AddOutputFilterByType DEFLATE text/html

</Directory>

</VirtualHost>

 

Replace your_ip_address with the IP number or domain name of the server running ProcessMaker.

If your DNS or /etc/hosts has a defined domain for ProcessMaker, then use that domain for your_processmaker_domain or IP address

Step 6:

Enable site and modules:

~$ sudo a2ensite pmos.conf

~$ service apache2 reload

Enable all modules will be needed:

~$ sudo a2enmod ldap

~$ sudo a2enmod authnz_ldap

~$ sudo a2enmod deflate

~$ sudo a2enmod expires

~$ sudo a2enmod rewrite

~$ sudo a2enmod ssl

~$ sudo a2enmod vhost_alias

~$ sudo a2enmod filter

 

Step 7:

Disable the default Apache site

~$  sudo a2dissite 000-default.conf

~$  sudo service apache2 reload

Congratulation! The installation of ProcessMaker is done. Now you can browse the server link

PS: At login in Workspace you should type workflows

What is ERPNext and how to install it on Ubuntu 16.04

ERPNext is the perfect example of the software that will help companies to organize and manage the work of each department. ERPNext is an open source web-based system aimed at small and medium-sized businesses. It assists companies with accounting, project and task management, sales, purchase, inventory, CRM, administration, human resource management, manufacturing, and even website. This system is the most suitable for businesses in manufacturing, retail, and distribution spheres. Extensive functionality is integrated into a single platform for easy management.

 

Installation:

Update the system and install necessary packages

~$ apt-get update && sudo apt-get -y upgrade

~$ apt-get install wget python-minimal

Install Frappe and ERPNext with an easy script:

To download the install script run the following command:

~$ wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

Start the installation by issuing the command below:

~$ python install.py –production –user frappe

The install script will install all requirements including bench, create a new user ‘frappe’ and setup a new ERPNext site.

You can sit back and relax while the script goes through the installation process.

Under the hood this python script uses Ansible playbook to install the following services, tools, and modules:

– MariaDB

– Nginx

– Nodejs

– Redis

– Supervisor

– Wkhtmltopdf

 

The installation will take some time and if it is successful, you will see something like this:

Frappe/ERPNext has been successfully installed!

Once the installation process is completed, visit your server IP address and you will see the Login screen.

That’s it. You have successfully installed ERPNext on your Ubuntu 16.06!

How to install KoboToolbox by using Docker on Ubuntu Server 16.04

KoBoToolbox is a suite of tools for field data collection for use in challenging environments. KoboToolbox is free and open source. Most of the users are the staff who are working in humanitarian crises, as well as aid professionals and researchers working in developing countries. KoboToolbox developers and researchers are based in Cambridge, MA and many other places around the world.

Installation

You can find a nice instruction on KoboToolbox GitHub site

First of all, you need to check for Docker installation by this link

Clone the repository by typing:

~$ git clone https://github.com/kobotoolbox/kobo-docker.git

It will clone the necessary documents in kobo-docker folder

~$ cd kobo-docker

The first decision to make is whether your instance (kobo) will use secure (https) or insecure (http) communications when interacting with clients.

If it is local one:

~$ nano envfile.local.txt

If it is server one

~$ nano envfile.server.txt

Fill the lines as shown below with your username and password:

Save and exit.

Then type :

For Local:

~$ ln -s docker-compose.local.yml docker-compose.yml

For Server:

~$ ln -s docker-compose.server.yml docker-compose.yml

 

~$ docker-compose pull

~$ docker-compose up

It will take some time based on connection

After it is finished you can check on your browser (for local):

http://[IP_address_of_your_machine]:8000/

Congratulations you have a fresh instance of KoboToolbox!

Use the below link for Site Administration

http://[IP_address_of_your_machine]:8000/admin/

To stop the container you can type:

~$ docker-compose stop

 

Congratulations!

How to install Snipe-IT on Ubuntu 16.04

Snipe-IT was made for IT asset management, to enable IT departments to track who has which laptop, when it was purchased, which software licenses and accessories are available, and so on.

1. Install LAMP

First of all, we need to install LAMP (Linux, Apache2, MySQL and PHP).

Go ahead and install LAMP following this link.

2. Updating Ubuntu 16.04 and installing prerequisites

Updates first:

~$ sudo apt-get update && sudo apt-get upgrade -y

Be sure you have curl command is working. If not then install it with the below command:

~$ sudo apt-get install curl

Next we are going to download composer:

~$ sudo curl -sS https://getcomposer.org/installer | php

 

Then we are going to move composer to another folder:

~$ sudo mv composer.phar /usr/local/bin/composer

~$ cd /var/www/

 

Alright, time to download snipe-it:

~$ sudo git clone https://github.com/snipe/snipe-it snipeit

~$ cd snipeit/

 

Finally we replace .env.example with .env:

~$ sudo cp .env.example .env

3. Configuring the MySQL Database

Time to create our MySQL Database:

~$ sudo mysql -u root -p

Now you need to run a couple of commands, make sure to use the EXACT commands like in the box below, replace “yourusername” and “yourpw” with your own username and password:

  • mysql> create database snipeit;
  • mysql> GRANT ALL ON *.* TO ‘your_username’@‘%’ IDENTIFIED BY ‘your_password’;
  • mysql> flush privileges;
  • mysql> exit

4. Editing the .env file

Now we are going to edit the .env config file.

~$ sudo nano .env

You need to adjust the values according to your server and the database we created earlier. Remember to enter your username and password that you set in step 3.

Don’t worry about the APP_KEY either, we are going to generate that later.

Hit CTRL+O to write and CTRL+X to exit.

5. Adjusting permissions

Now we got to adjust a couple of permissions:

~$ sudo chown -R www-data:www-data storage public/uploads

~$ sudo chmod -R 775 storage

~$ sudo chmod -R 755 public/uploads

. Installing PHP dependencies

Installing PHP dependencies:

~$ sudo apt-get install -y git unzip php php-mcrypt php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml php-bcmath

 

 

7. Installing Composer & generating our App Key

Installing Composer:

~$ sudo composer install –no-dev –prefer-source

 

And generating our APP Key:

~$ sudo php artisan key:generate

Type yes when you get asked if you really want to run that command.

 

 

8. Editing configuration files and wrapping up

Now we are going to enable our Virtual Host:

~$ sudo nano /etc/apache2/sites-available/snipeit.example.com.conf

And paste the text in the box below:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
<Directory /var/www/snipeit/public>
Require all granted
AllowOverride All
</Directory>
DocumentRoot /var/www/snipeit/public
ServerName 192.168.71.129
#Redirect permanent / https://snipeit.your-server-fqdn.com/
ErrorLog /var/log/apache2/snipeIT.error.log
CustomLog /var/log/apache2/access.log combined
</VirtualHost>

 

Change the IP(ServerName) then press CTRL+O to save and CTRL+X to exit.

Now we are going to run a couple apache commands:

~$ sudo a2ensite snipeit.example.com.conf

~$ sudo a2enmod rewrite

~$ sudo systemctl restart apache2

 

And we are going to disable the default.conf

~$ sudo a2dissite 000-default.conf

~$ sudo service apache2 restart

 

Change directory

~$ cd /etc/apache2/sites-available

 

And we are going to rename the default.conf to keep it as backup:

~$ sudo cp 000-default.conf 000-default.confTEMP

 

And finally remove it:

~$ sudo rm 000-default.conf

 

Already and finally wrapping it up with:

~$ sudo phpenmod mcrypt

~$ sudo phpenmod mbstring

~$ sudo a2enmod rewrite

~$ sudo service apache2 restart

 

9. Setup with the Web Browser

Now you are as good as done. Open a Web Browser and enter your server IP and enter:

 

Click on Next: Create Database Tables.

You will likely get an error:

 

Don’t panic, just refresh the page by hitting F5

Click on Next: Create User

Finalize everything to your liking, click F5 if you get the error again.

 

And congratulations, you are now running a powerful, completely free cloud based instance of the Snipe IT Asset Management!

How to Install LAMP on Ubuntu

LAMP is an open source Web development platform that uses Linux as the operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language.

1. Update your system

First we are making sure you are up to date by running:

~$ sudo apt-get update -y && sudo apt-get upgrade -y

2. Installing Apache2

Now that we have the L in place, it’s time to install the A.

~$ sudo apt-get install apache2

You can verify if that worked by entering your server’s IP into a browser, you should see something along those lines:

 

3. Installing MySQL

~$ sudo apt-get install mysql-server

During the installation, you will be prompted to enter the MySQL root password. Make sure to write that down.

Now we are also going to secure our installation:

~$ sudo mysql_secure_installation

Enter the root password you entered before.

Now you get asked a couple of questions, answer as below:

Enter current password for root (enter for none): Enter your root password

Would you like to setup VALIDATE PASSWORD plugin? N

Change the password for root? [Y/n] N

Remove anonymous users? [Y/n] {ENTER}

Disallow root login remotely? [Y/n] {ENTER}

Remove test database and access to it? [Y/n] {ENTER}

Reload privilege tables now? [Y/n] {ENTER}

That’s it. Let’s continue with PHP.

 4. Installing PHP

And last but not least, the P.

For PHP we need to install slightly more, PHP with all it’s dependencies:

~$ sudo apt-get install php libapache2-mod-php php-mysql php-curl php-gd php-intl php-pear php-imagick php-imap php-mcrypt php-memcache php-pspell php-recode php-sqlite3 php-tidy php-xmlrpc php-xsl php-mbstring php-gettext

Let’s restart apache2:

~$ sudo /etc/init.d/apache2 restart

5. Testing the configuration and wrapping up

To test your configuration, we first need to create the phpinfo.php file.

~$ sudo nano /var/www/html/phpinfo.php

Paste the following text into it:

<?php phpinfo(); ?>

Save with CTRL+O and exit with CTRL+X.

If you  now open http://YOURSERVERIP/phpinfo.php in your web browser, you should see the PHP configuration page:

 

Congradulation!

How to Install PostgreSQL on Ubuntu Server 16.04 and Manage

What does PostgreSQL mean?

PostgreSQL is an open-source, object-relational database management system (ORDBMS) that is not owned or controlled by one company or individual. Because PostgreSQL software is open-source, it is managed mostly through a coordinated online effort by an active global community of developers, enthusiasts and other volunteers.

First released in the mid-1990s, postgresSQL is written in C. Its primary competitors include Oracle DB, SQL Server and MySQL.

This term is also known as Postgres.

Installation:

First, let us update the system:

~$ sudo apt-get update && sudo apt-get upgrade

Install PostgreSQL from the Ubuntu package repository:

~$ sudo apt-get install postgresql postgresql-contrib

Change Postgres Linux user’s password
~$ sudo passwd postgres
 To enable remote access you will need to edit two files:
/etc/postgresql/9.5/main/pg_hba.conf
/etc/postgresql/9.5/main/postgresql.conf (9.5 is the version number so it can be various)
~$ sudo nano /etc/postgresql/9.5/main/pg_hba.conf
 Find the below
# IPv4 local connections:
host all all 127.0.0.1/32 md5
and change it as below
# IPv4 local connections:
host all all 0.0.0.0/0 md5
and for second file:
~$ sudo nano /etc/postgresql/9.5/main/postgresql.conf
# listen_addresses=’localhost’ to
listen_addresses=’*’

Switching Over to the postgres Account

The installation procedure created a user account called postgres that is associated with the default Postgres role. In order to use Postgres, we can log into that account.

Switch over to the postgres account on your server by typing:

~$ sudo -i -u postgres
be below command:
~$ psql

You will be logged in and able to interact with the database management system right away.

~$ postgres=#
 Exit out of the PostgreSQL prompt by typing: \q
~$ postgres=# \q
To change the password for a user type below
~$ postgres=# ALTER USER [user_name] with PASSWORD [password];
 Creating a user
~$ sudo -u postgres createuser [user_name]
Create a database
~$ sudo -u postgres createdb [db_name]
Granting a user on a database
~$ postgres=# grant all privileges on database [db_name] to [user_name];

How to install Tomcat 8 on Ubuntu Server 16.04

Apache Tomcat is a web server and servlet container that is used to serve Java applications. Tomcat is an open source implementation of the Java Servlet and JavaServer Pages technologies, released by the Apache Software Foundation. This tutorial covers the basic installation and some configuration of the latest release of Tomcat 8 on your Ubuntu 16.04 server.

 First step will be to install apt-get-repository by below command

~$ sudo apt-get install software-properties-common

 let us update
~$ sudo apt-get update
The second step is about installing Java. If you want to install Oracle Java then execute the below commands
~$ sudo apt-add-repository ppa:webupd8team/java
~$ sudo apt-get update
~$ sudo apt-get install oracle-java8-installer

Setting as default JDK

~$ sudo apt-get install oracle-java8-set-default

Setting the path globally:

type :

~$ sudo nano /etc/bash.bashrc

and add this line at the end of page.

export JAVA_HOME=/usr/lib/jvm/java-8-oracle

loading bash.bash.bashrc

~$ source /etc/bash.bashrc

The third step is creating tomcat group and user.

~$ sudo groupadd tomcat

~$ sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat

Forth Step is about installing Tomcat

Go to  https://tomcat.apache.org/ click the version you want to download

Then click the mirror if you want to change the download server and click on tar.gz then copy the link address. Here it is http://ftp.itu.edu.tr/Mirror/Apache/tomcat/tomcat-8/v8.5.24/bin/apache-tomcat-8.5.24.tar.gz

Run the below command

~$  wget http://ftp.itu.edu.tr/Mirror/Apache/tomcat/tomcat-8/v8.5.24/bin/apache-tomcat-8.5.24.tar.gz

~$ sudo mkdir /opt/tomcat

~$ sudo tar xzvf apache-tomcat-8*tar.gz -C /opt/tomcat

The Fifth step is updating the permission

~$ cd /opt/tomcat

~$ sudo chgrp -R tomcat /opt/tomcat

Next, give the tomcat group read access to the conf directory and all of its contents, and execute access to the directory itself:

~$ sudo chmod -R g+r  conf

~$ sudo chmod g+x  conf

Make the tomcat user the owner of the webapps, work, temp and logs directories:

~$ sudo chown -R tomcat  webapps/ work/ temp/ logs/

The sixth step is about creating a systemd service file

Run the below command first to know where Java is installed

~$ sudo update-java-alternatives -l

It will show something like this

java-8-oracle 1081 /usr/lib/jvm/java-8-oracle

So the java is installed under /usr/lib/jvm/java-8-oracle

~$ echo $JAVA_HOME

If these both are not same then you need to command

~$ sudo nano /etc/bash.bashrc

and add you need to add

export JAVA_HOME=/usr/lib/jvm/java-8-oracle

Let us create the systemd service file

~$ sudo nano /etc/systemd/system/tomcat.service

and let us add

[Unit]
Description=Apache Tomcat Web Application Container
After=network.target

[Service]
Type=forking

Environment=JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh

User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always

[Install]
WantedBy=multi-user.target

Save and exit

Reload the systemd daemon:

~$ sudo systemctl daemon-reload

Start the Tomcat service :

~$ sudo systemctl start tomcat

Let’s enable the service on boot

~$ sudo systemctl enable tomcat

Step Seven:

If firewall is enabled the allow traffic to 8080 port which tomcat server use by typing:

~$ sudo ufw allow 8080

Let us test the Tomcat server on a browser:

http:// [server_name_or_IP] : 8080

Step Eight:

Configure tomcat web management interface

~$ sudo nano /opt/tomcat/conf/tomcat-users.xml

Now let us add this

<?xml version='1.0' encoding='utf-8'?>

<tomcat-users>
    <role rolename="admin"/>
    <role rolename="admin-gui"/>
    <role rolename="manager-gui"/> 
    <user username="admin" password="password" roles="admin,admin-gui,manager-gui"/>
</tomcat-users>

Generate a username which it is admin here and generate a proper password

We also need to configure context.xml file under

/opt/tomcat/webapps/manager/META-INF/context.xml and /opt/tomcat/webapps/host-manager/META-INF/context.xml

In both file it should be

<Context antiResourceLocking="false" privileged="true" >
<!--
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
</Context>

Restart the service by typing:

~$ sudo systemctl start tomcat

Congradulation for the installation of Apache Tomcat!

Set A Static IP On Linux

The interfaces file is where you need to change from the default “dhcp” setting to add some information about the “static” IP address that you want to configure.

Edit the /network/interfaces file

~$ sudo nano /etc/network/interfaces

sudo nano /etc/network/interfaces

 

Then reboot the computer or run the below command

~$ sudo /etc/init.d/networking restart

Apt-Get Update : failure to fetch

For that you will need the below commands:

~$ sudo rm -vf /var/lib/apt/lists/*
~$ sudo apt-get update

This will solve your issue!

If the problem is messed with keys then you can try the below commands

~$ cd /etc/apt/apt/sources.list.d/

~$ sudo rm -R *

~$ cd /var/lib/apt/lists/

~$ sudo rm -R *

~$ sudo nano /etc/apt/sources.list

and comment out the line with #

~$ apt-key list

~$ sudo apt-key del XXXX

XXXX is the key ID from the list you got

~$ sudo apt-key update

~$ sudo apt-get clean

~$ sudo apt-get update