Fading Coder

One Final Commit for the Last Sprint

Home > Tools > Content

Deploying FineBI 6 on openEuler with MySQL 8 and Tomcat 9

Tools 1

System Preparation and Package Updates

sudo yum upgrade -y
sudo yum install -y vim tar net-tools wget
sudo systemctl reboot

MySQL 8 Database Configuraton

sudo yum install -y https://repo.mysql.com/mysql84-community-release-el9-1.noarch.rpm
sudo yum repolist enabled | grep mysql
sudo yum install -y mysql-community-server
sudo systemctl enable --now mysqld

Retrieve the auto-generated credentials and reconfigure the root account for remote access:

sudo grep 'temporary password' /var/log/mysqld.log
mysql -u root -p

Execute the following SQL statements within the MySQL shell:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'Str0ng_DB_P@ss!';
UPDATE mysql.user SET host = '%' WHERE user = 'root';
CREATE DATABASE finebi_metadata DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
FLUSH PRIVILEGES;
EXIT;

Restart the database service and adjust the firewall rules:

sudo systemctl restart mysqld
sudo firewall-cmd --permanent --add-port=3306/tcp
sudo firewall-cmd --reload

Java and Tomcat Runtime Setup

Extract the archives into a dedicated application directory and rename them for cleaner path management:

sudo mkdir -p /opt/analytics
sudo tar -xzf jdk-8u411-linux-x64.tar.gz -C /opt/analytics/
sudo mv /opt/analytics/jdk1.8.0_411 /opt/analytics/java-runtime
sudo tar -xzf tomcat-linux-64.tar.gz -C /opt/analytics/
sudo mv /opt/analytics/apache-tomcat-9.0.91 /opt/analytics/web-server

Define the runtime environment variables using a dedicated profile script:

sudo tee /etc/profile.d/analytics-env.sh > /dev/null <<EOF
export JAVA_HOME=/opt/analytics/java-runtime
export CATALINA_HOME=/opt/analytics/web-server
export CATALINA_BASE=/opt/analytics/web-server
export PATH=\$PATH:\$JAVA_HOME/bin:\$CATALINA_HOME/bin
EOF
source /etc/profile.d/analytics-env.sh

Systemd Service Definition

Create a unit file to manage the application server lifecycle:

[Unit]
Description=FineBI Analytics Server
After=network-online.target mysqld.service
Wants=network-online.target

[Service]
Type=forking
Environment="JAVA_HOME=/opt/analytics/java-runtime"
Environment="CATALINA_HOME=/opt/analytics/web-server"
PIDFile=/opt/analytics/web-server/bin/tomcat.pid
ExecStart=/opt/analytics/web-server/bin/startup.sh
ExecStop=/opt/analytics/web-server/bin/shutdown.sh
Restart=on-abort
PrivateTmp=true

[Install]
WantedBy=multi-user.target

Load the configuration, start the service, and open the web port:

sudo systemctl daemon-reload
sudo systemctl enable --now finebi-server.service
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
sudo systemctl reboot

Application Initialization and External DB Linking

Access the deployment wizard via http://<host-ip>:8080/finebi/decision. Define the administrator credentials when prompted.

Navigate to the system management panel and select the external database configuration option. Input the following connection parameters to migrate platform metadata:

  • Database Type: MySQL
  • Driver Class: com.mysql.cj.jdbc.Driver
  • Connection URL: jdbc:mysql://<database-ip>:3306/finebi_metadata?useSSL=false&characterEncoding=utf8
  • Username: root
  • Password: Str0ng_DB_P@ss!

Apply the configuration to trigger the schema migration. Once the process completes, authenticate through the main dashboard endpoint to verify the deployment.

Related Articles

Efficient Usage of HTTP Client in IntelliJ IDEA

IntelliJ IDEA incorporates a versatile HTTP client tool, enabling developres to interact with RESTful services and APIs effectively with in the editor. This functionality streamlines workflows, replac...

Installing CocoaPods on macOS Catalina (10.15) Using a User-Managed Ruby

System Ruby on macOS 10.15 frequently fails to build native gems required by CocoaPods (for example, ffi), leading to errors like: ERROR: Failed to build gem native extension checking for ffi.h... no...

Resolve PhpStorm "Interpreter is not specified or invalid" on WAMP (Windows)

Symptom PhpStorm displays: "Interpreter is not specified or invalid. Press ‘Fix’ to edit your project configuration." This occurs when the IDE cannot locate a valid PHP CLI executable or when the debu...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.