-
Notifications
You must be signed in to change notification settings - Fork 292
Getting started Development ‐ Linux
1. Scada-LTS Installation using standalone installer
Technology | Version | Description |
---|---|---|
Java | 11 | Base programic language |
Gradle | 7.1 | Tool for building the application |
Tomcat | 9.0.75 | Servlet server for application |
MySQL Server | 8.0.33 | Database server for data persistence |
MySQL Client | DBeaver 23.1.2 or newer |
Database client |
Node.js | 14.20.1 | JavaScript runtime for New UI |
Git | 2.17.1 | Version control for source code |
Linux | Ubuntu-based | Operating system |
1. Scada-LTS Installation using installer ↑↑↑
-
Go to https://github.com/SCADA-LTS/linux-installer and select releases tab and then download latest release to desired folder.
-
Go to location of downloaded installer and extract it.
-
Start first script by using terminal and typing
./mysql_start.sh
inside extracted folder.Script will ask for some basic information to make configuration run correctly. Below is an example of the data that can be entered:
- Port: 3306
- Username: root
- Password: root
- root password: root
After providing the information you should wait for the line confirming the correct setup of the database:
~/linux-installer-1.2.0/mysql/server/bin/mysqld: ready for connections. Version: '8.0.33' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server - GPL.
-
Start second terminal in the same folder and run
./tomcat_start.sh
script.Similar to first script you will have to provide some information, example below:
- Enter port: 8080
- Enter username: tcuser
- Enter password: tcuser
- Enter database port: 3306
- Enter database username: root
- Enter database password: root
After that you should be able to access Scada-LTS via web browser by typing in search bar
localhost:8080/Scada-LTS
Enviroment variables ↑↑↑
-
You will have to add PATH for Java and Catalina in
~/.bashrc
file using any available text editor e.g.:nano ~/.bashrc
or
vim ~/.bashrc
-
On the bottom of this text file add two lines from below:
export CATALINA_HOME="/absolute_path_to_installer/linux-installer-1.2.0/tomcat64/server"
export JAVA_HOME="/absolute_path_to_installer/linux-installer-1.2.0/java/jdk"
-
After all that type in terminal:
source ~/.bashrc
This will reload Enviroment variables.
jSerialComm - Configuration ↑↑↑
More information about jSerialComm: https://fazecast.github.io/jSerialComm/
However, on linux system configuration is necessary as long as we are not running on root:
sudo usermod -a -G uucp username
sudo usermod -a -G dialout username
sudo usermod -a -G lock username
sudo usermod -a -G tty username
2. Database ↑↑↑
MySQL Client ↑↑↑
DBeaver - Installation ↑↑↑
Download Linux DBeaver Installer, run it and wait for it to finish. To launch it type dbeaver
in console.
DBeaver - Configuration ↑↑↑
NOTE: Before configurating DBeaver make sure that your MySQL Server is turned on.
- In top left corner of DBeaver window click on icon to add "New database connection".
- Select MySQL and press 'Next' button.
- Set port 3308 and click on 'Finish'. If the drivers have not been installed before, the program will suggest downloading and installing, click ok:
- If you have set password for root, you have to enable allowPublicKeyRetrieval in Connection Settings window in Driver properties tab.
- Press Test connection button on the bottom left corner of the window. If everything is set up correctly the following window should pop up.
3. IntelliJ ↑↑↑
-
Download desired version of IntelliJ here.
-
Put it in freshly made folder and extract it.
-
Install git with command below:
sudo apt-get install git-all
You can confirm if git setup finished correctly by running
git version
in terminal. -
Go inside extracted folder, then to
bin
folder and run./idea.sh
script. -
Intellij is set up and ready to use.
Node.js ↑↑↑
- You can check if you have any nvm or node.js installed on your PC using these commands:
nvm --version node --version
- You will need
nvm
which is Node Version Manager. You can install it running this command in terminal:curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
- You can check if nvm has installed correctly by typing:
nvm --verison
- When everything went succesfull we can install chosen version of Node.js with command below:
nvm install v14.20.1
- To make sure that correct version of node is installed type:
node --version
NOTE: If you want to uninstall node or change version of it, you have to use nvm from now on.
4. Docker-compose ↑↑↑
To check if you have any version of docker installed, run command from below in terminal.
dpkg -l | grep -i docker
- Start with commands below to update the
apt
package index:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
- Run these commands to add docker’s official GPG key:
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
- Use command below to set up repository:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Install Docker engine and all necessary docker plugins.
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- Install docker-compose itself with command below:
sudo apt install docker-compose
- Add non-admin user to docker group use command below:
sudo usermod -aG docker user_name
user_name
is the username of user you want to be able to launch docker-compose.
-
Download docker-compose.yml file to desired folder.
-
Go inside docker-compose.yml location using terminal and run:
docker-compose up database
- In second terminal and same location:
docker-compose up scadalts
NOTE: You have to wait for
docker-compose up database
to finish, otherwise errors may appear.
To uninstall all files related to docker use these two commands below:
sudo apt-get purge -y `dpkg-query -W -f='${binary:Package}\t' '*docker*'`
sudo apt-get autoremove -y --purge `dpkg-query -W -f='${binary:Package}\t' '*docker*'`
To delete all files that docker created e.g. groups, sockets etc. use commands below:
sudo rm -rf /var/lib/docker /etc/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock
sudo rm /etc/apt/keyrings/docker.gpg
If you deleted everything correctly command below should return nothing.
dpkg -l | grep -i docker