Install broadleaf commerce on Ubuntu 18.04 | 16.04

This brief tutorial shows students and new users how to install Broadleaf Commerce on Ubuntu 18.04 | 16.04

Broadleaf commerce is an enterprise eCommerce platform that provides the next-level eCommerce functionality. With a streamlined and centralized interface, you can enable multiple sites for multiple brands using the same underlying codes.

Not only can do manage your sites, but broadleaf commerce including product manage, order management, catalog management order and checkout modules and more.

It has comprehensive product features for small, medium and large businesses that want a platform designed on some of the hottest opensource technologies such as JAVA, Maven and JavaScript framework.

If you’re looking for a functional, high performance eCommerce platform to manage your online stores, you’ll find Broadleaf to be useful. It can help you create and manage your content and products efficiently on every device with its minimalist and modern user and admin interface.

For more about Broadleaf commerce, please check out its homepage.

To get Broadleaf Commerce installed on Ubuntu, follow the steps below:

Step 1: Install OpenJDK 8

Broadleaf is a Java based app so you’ll need Java installed. First, download the Java 8 Development Kit: either the official Oracle JDK or Open JDK

For this tutorial, we’re going to be install OpenJDK.

To do that, run the commands below:

sudo apt update
sudo apt-get install openjdk-8-jdk openjdk-8-doc openjdk-8-jre-lib

After installing Java, you can verify it by running the commands below:

java -version

It should output something similar as shown below:

Output:
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

After, continue below to install Maven.

Step 2: Download and Install Maven

After installing OpenJDK version 8 above, use the steps below to download Maven. You will also need the latest version of Maven (at least version 3.3.1, version 3.3.9 is recommended).

Next, go and download Apache Maven latest from its download page.

The recommended version of Apache Maven is 3.3.9. Make sure to check the Maven download page to see if a newer version is available for you to download… If there are, select those and download instead.

Run the commands below to download version 3.3.9.

cd /tmp
wget https://downloads.apache.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz

Next, run the commands below to extract the downloaded package to the /opt directory…

sudo tar xf /tmp/apache-maven-*.tar.gz -C /opt

If you want to have separate versions and update as they become available, create a symbolic link to the version folder…

sudo ln -s /opt/apache-maven-3.3.9 /opt/maven

When the next version is released… all you have to do is update the symbolic link to reference the new release folder by running the command above and updating the release number in the folder name….

Setup Maven Environment Variables

After downloading and extracting Maven package, go and setup its environment variables… To do that, run the commands below:

sudo nano /etc/profile.d/maven.sh

Then copy and pastes the lines below and save into the file…

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export M2_HOME=/opt/apache-maven-3.3.9
export MAVEN_HOME=/opt/apache-maven-3.3.9
export PATH=${M2_HOME}/bin:${PATH}

Finally, run the commands below to update and load the changes…

sudo chmod +x /etc/profile.d/maven.sh
source /etc/profile.d/maven.sh

Now run the commands below to check the version number…

mvn -version

You should see the content below…

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T10:41:47-06:00)
Maven home: /opt/apache-maven-3.3.9
Java version: 1.8.0_242, vendor: Private Build
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.3.0-40-generic", arch: "amd64", family: "unix"

Step 3: Install Broadleaf Commerce

Now that both OpenJDK and Maven are installed, follow the steps below to download and install Broadleaf Commerce.

First, change into the /tmp directory and download broadleaf commerce package.

cd /tmp
wget https://github.com/BroadleafCommerce/LegacyDemoSite/archive/broadleaf-5.0.8-GA.zip

Then extract the content into your home directory. Change into the directory and use Maven to download and build all dependencies.

unzip broadleaf-5.0.8-GA.zip
cp -R LegacyDemoSite-broadleaf-5.0.8-GA ~/broadleaf
cd ~/broadleaf
mvn install

That should download all dependencies and build Broadleaf. After a successful build, you should see a similar message as below:

------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] ecommerce .......................................... SUCCESS [  4.420 s]
[INFO] core ............................................... SUCCESS [01:55 min]
[INFO] admin .............................................. SUCCESS [ 30.036 s]
[INFO] site ............................................... SUCCESS [  7.961 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:37 min
[INFO] Finished at: 2020-03-16T12:43:58-05:00
[INFO] Final Memory: 48M/346M
[INFO] ------------------------------------------------------------------------

Next, go to the admin folder and start up the service.

cd ~/broadleaf/admim
./startadmin.sh

When you’re done, open your browser and browser to the server hostname or IP address followed by port 8081.

http://localhost:8081/admin

That should brief up Broadleaf commerce login page.

Broadleaf commerce Ubuntu

Login with the credentials below:

Username: admin
Password: admin

Broadleaf commerce ubuntu

Conclusion:

You’ve learn how to install broadleaf commerce on Ubuntu 18.04 | 16.04. If you find any error above, please use the comment form below to report it.

Thanks!

You may also like the post below:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.