FreeBSD Installation and deployment Apache OFBiz Crm And Erp Platform

The presence of an integrated information system is important and urgent, for the sake of creating more effective and efficient ways of working, with an impact on efforts to be efficient in people and improving business processes. Thus, managerial level functions can be more agile in managing available information in analyzing and determining business strategies for the company's future business development. Ironically, implementing an integrated information system such as ERP (Enterprise Resource Planning), carries the risk of failure. System Information is a component consisting of humans, information technology, and work procedures that process, store, analyze, and disseminate information to achieve a goal.

One of the success factors in business competition is support for the use of Information Technology in managing business transactions. For this reason, Information Technology needs to be managed well, such as how it can meet customer and supplier satisfaction levels.

Optimal use of new Information Technology (New Technology) in managing daily business transactions to produce information that can be extracted to be used as a strategic decision making tool. With an integrated information system, large volumes of numerical computation can be carried out at high speed, provide relatively fast communication, store large amounts of information and be easily accessible, increase work effectiveness and efficiency, present information informatively, accurately, up to date and according to management needs. and users, automating semi-automatic business processes and manually performed tasks.

The presence of ERP is not a misperception and what is scary for people is that they will lose their jobs and be replaced by computers, but on the contrary, the presence of ERP can increase the way of working more effectively and efficiently, provide ideas and innovation for strategic business decision making. for the sake of development
company.

ERP is an abbreviation of 3 word elements, namely enterprise which means company or organization, resource which means resources and planning which means planning. So ERP reflects a concept that leads to the verb "planning" which means that ERP (Enterprise Resource Planning) emphasizes the planning aspect. Based on the above, ERP (Enterprise Resource Planning), namely the existence of an integrated planning aspect in an organization or company with the aim of being able to plan and manage organizational resources and be able to respond well to customer needs.

ERP system can be said to be a terminology given to an integrated information system to support transactions or operational processes within a company. Basic concepts
ERP system is presented in Figure below.



Before starting to install Apache OFBiz, we recommend updating the system ports or PKG packages to the latest version. You can run the following command to update your system.

Update package PKG
root@ns3:~ # pkg update -f
root@ns3:~ # pkg upgrade -f


1. Install Java openjdk17

Before starting Apache OFBiz, you need to note that OFBiz requires the Java Development Kit (JDK) openjdk17 or higher version. By default, FreeBSD provides a Java repository that you can install via ports or PKG. Install Java openjdk17 to run OFBiz with the following command.

Install openjdk17
root@ns3:~ # pkg install openjdk17
In this section, we will not discuss in detail, the openjdk17 Java installation process. You can read our previous article.

Installing and Configuring Java openjdk17 in FreeBSD 13


2. Setting Up a Database OFBiz

Before installing Apache OFBiz, you must prepare a database server. Even though OFBiz has a Hypersonic SQL database built into it, you don't need to do any configuration to run OFBiz. However, if you want to use a MySQL or MariaDB database, or another commercial database, we recommend installing and creating a database for OFBiz first. Follow the instructions below to create an OFBiz database with MySQL server.

Setting Up a Database ofbiz
root@ns3:~ # mysql -u root -p
Enter password:
root@localhost [(none)]> CREATE DATABASE ofbiz CHARACTER SET utf8;
root@localhost [(none)]> CREATE USER 'userofbiz'@'localhost' IDENTIFIED BY 'router123';
root@localhost [(none)]> GRANT ALL PRIVILEGES ON ofbiz.* TO 'userofbiz'@'localhost';
root@localhost [(none)]> FLUSH PRIVILEGES;
root@localhost [(none)]> exit;

root@localhost [(none)]> CREATE DATABASE ofbizolap CHARACTER SET utf8;
root@localhost [(none)]> CREATE USER 'userofbizolap'@'localhost' IDENTIFIED BY 'router123';
root@localhost [(none)]> GRANT ALL PRIVILEGES ON ofbizolap.* TO 'userofbizolap'@'localhost';
root@localhost [(none)]> FLUSH PRIVILEGES;
root@localhost [(none)]> exit;

root@localhost [(none)]> CREATE DATABASE ofbiztenant CHARACTER SET utf8;
root@localhost [(none)]> CREATE USER 'userofbiztenant'@'localhost' IDENTIFIED BY 'router123';
root@localhost [(none)]> GRANT ALL PRIVILEGES ON ofbiztenant.* TO 'userofbiztenant'@'localhost';
root@localhost [(none)]> FLUSH PRIVILEGES;
root@localhost [(none)]> exit;
The method above creates an ofbiz database with user and password:
database name: ofbiz
database user: userofbiz
database password: router123
database host: 127.0.0.1

database name: ofbizolap
database user: userofbizolap
database password: router123
database host: 127.0.0.1

database name: ofbiztenant
database user: userofbiztenant
database password: router123
database host: 127.0.0.1



3. Installing Apache OFBiz

On FreeBSD, the Apache OFBiz repository is not available. You can clone on the Github website or download directly on the OFBIZ official site. In this example we will clone OFBiz directly from Github. Run the following command.

Download OFBiz
root@ns3:~ # cd /usr/local/www
root@ns3:/usr/local/www # git clone https://github.com/apache/ofbiz-framework.git
After that, you migrate OFBiz from Derby to the MySQL database by placing the MySQL JDBC driver in the build.gradle file. In the build.gradle file, add the script below.

/usr/local/www/ofbiz-framework/build.gradle
root@ns3:/usr/local/www # cd ofbiz-framework
root@ns3:/usr/local/www/ofbiz-framework # ee build.gradle
dependencies {
         pluginLibsCompile 'mysql:mysql-connector-java:5.1.6'
    }
Open and edit the entityengine.xml file, update the script in that file with the script below.

/usr/local/www/ofbiz-framework/framework/entity/config/entityengine.xml
root@ns3:/usr/local/www/ofbiz-framework # cd framework/entity/config
root@ns3:/usr/local/www/ofbiz-framework/framework/entity/config # ee entityengine.xml
<datasource name="localmysql" helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO" field-type-name="mysql" check-on-start="true" add-missing-on-start="true" check-pks-on-start="false" use-foreign-keys="true" join-style="ansi-no-parenthesis" alias-view-columns="false" drop-fk-use-foreign-key-keyword="true" table-type="InnoDB" character-set="utf8" collate="utf8_general_ci">
    <read-data reader-name="tenant" />
    <read-data reader-name="seed" />
    <read-data reader-name="seed-initial" />
    <read-data reader-name="demo" />
    <read-data reader-name="ext" />
    <read-data reader-name="ext-test" />
    <read-data reader-name="ext-demo" />
    <inline-jdbc jdbc-driver="com.mysql.jdbc.Driver" jdbc-uri="jdbc:mysql://localhost/ofbiz?autoReconnect=true&amp;characterEncoding=UTF-8" jdbc-username="ofbiz" jdbc-password="ofbiz" isolation-level="ReadCommitted" pool-minsize="2" pool-maxsize="250" time-between-eviction-runs-millis="600000" />
</datasource>
<datasource name="localmysqlolap" helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO" field-type-name="mysql" check-on-start="true" add-missing-on-start="true" check-pks-on-start="false" use-foreign-keys="true" join-style="ansi-no-parenthesis" alias-view-columns="false" drop-fk-use-foreign-key-keyword="true" table-type="InnoDB" character-set="utf8" collate="utf8_general_ci">
    <read-data reader-name="seed" />
    <read-data reader-name="seed-initial" />
    <read-data reader-name="demo" />
    <read-data reader-name="ext" />
    <inline-jdbc jdbc-driver="com.mysql.jdbc.Driver" jdbc-uri="jdbc:mysql://localhost/ofbizolap?autoReconnect=true&amp;characterEncoding=UTF-8" jdbc-username="ofbizolap" jdbc-password="ofbizolap" isolation-level="ReadCommitted" pool-minsize="2" pool-maxsize="250" time-between-eviction-runs-millis="600000" />
</datasource>
<datasource name="localmysqltenant" helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO" field-type-name="mysql" check-on-start="true" add-missing-on-start="true" check-pks-on-start="false" use-foreign-keys="true" join-style="ansi-no-parenthesis" alias-view-columns="false" drop-fk-use-foreign-key-keyword="true" table-type="InnoDB" character-set="utf8" collate="utf8_general_ci">
    <read-data reader-name="seed" />
    <read-data reader-name="seed-initial" />
    <read-data reader-name="demo" />
    <read-data reader-name="ext" />
    <inline-jdbc jdbc-driver="com.mysql.jdbc.Driver" jdbc-uri="jdbc:mysql://localhost/ofbiztenant?autoReconnect=true&amp;characterEncoding=UTF-8" jdbc-username="ofbiztenant" jdbc-password="ofbiztenant" isolation-level="ReadCommitted" pool-minsize="2" pool-maxsize="250" time-between-eviction-runs-millis="600000" />
</datasource>
Don't forget to replace derby with mysql database in default, look for the delegator script and replace it with the script below.

/usr/local/www/ofbiz-framework/framework/entity/config/entityengine.xml
root@ns3:/usr/local/www/ofbiz-framework # cd framework/entity/config
root@ns3:/usr/local/www/ofbiz-framework/framework/entity/config # ee entityengine.xml
<delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
    <group-map group-name="org.apache.ofbiz" datasource-name="localmysql"/>
    <group-map group-name="org.apache.ofbiz.olap" datasource-name="localmysqlolap"/>
    <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmysqltenant"/>
</delegator>
     
<delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
    <group-map group-name="org.apache.ofbiz" datasource-name="localmysql"/>
    <group-map group-name="org.apache.ofbiz.olap" datasource-name="localmysqlolap"/>
    <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmysqltenant"/>
</delegator>
 
<delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
    <group-map group-name="org.apache.ofbiz" datasource-name="localmysql"/>
    <group-map group-name="org.apache.ofbiz.olap" datasource-name="localmysqlolap"/>
    <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmysqltenant"/>
</delegator>
Then download the Gradle wrapper using the provided shell script. This will download the gradle-wrapper.jar file and put it under gradle/wrapper directory.

Download the Gradle wrapper
root@ns3:/usr/local/www/ofbiz-framework # gradle init-gradle-wrapper.sh
After that, compile ofbiz with the following command.

Compile OFBiz
root@ns3:/usr/local/www/ofbiz-framework # ./gradlew cleanAll loadAll
The final step is Start the Apache OFBiz Service.

Run OFBiz
root@ns3:/usr/local/www/ofbiz-framework # ./gradlew ofbiz
Happy! You have successfully installed Apache OFBiz ERP/CRM Platform on FreeBSD 13.2 server. Enjoy the ease of managing CRM, Inventory, ERP and much more using Apache OFBiz. Continue learning about the ERP/CRM Platform on the official Apache OFBiz repository and don't hesitate to ask the people who write Apache OFBiz tutorials via the comments column.
Iwan Setiawan

I Like Adventure: Mahameru Mount, Rinjani Mount I Like Writer FreeBSD

Post a Comment

Previous Post Next Post