Developer Documentation
Note
How to install and run FOSSLight.
Download FOSSLight Source
Clone the FOSSLight repository.
How to install - 1
Build and run using Docker.
Requirements
Build and run
docker-compose up --build
How to install - 2
Requirements
- Java 11 or higher
- MariaDB (10.0 or higher) or MySql (5.6 or higher)
- Memory : 8GB+
Development environment
- Framework : Spring Boot 2.1.x
- Build Tool : Gradle 6.x
- Git : https://github.com/fosslight/fosslight
- IDE : Spring Tool Suite
- lombok installation required.
- Project Character Set : UTF-8
Download & Installation
- Install Java. : https://openjdk.java.net
- Download a DDL file. : fosslight_create.sql
- Install MariaDB or Mysql. : https://mariadb.org/download
- Create a database and initialize data.
mysql -u root -p < fosslight_create.sql
If the database already exists or if you want to change the database name, change ‘fosslight' statement at the top.
mysql -u root -p <DATABASE_NAME> < fosslight_create.sql
Delete (or change) the CREATE USER and GRANT parts if the connection account already exists or if a different account is used.
- Install the tree package on the system. :
- Ubuntu
sudo apt-get install tree
- MacOS
brew install tree
- Ubuntu
IDE Configuration
Download Spring Tool Suite.
Project Import
※ Based on STS (Spring Tool suite) 4.x
- Install lombok. : https://projectlombok.org/setup/eclipse
- File > Import > Gradle > Existing Gradle Project
- Set up and import the Git Source Directory.
- Set to UTF-8 in Project> Properties> Resource> Text file encoding.
How to run
Change the running options.
Change running options in application.properties file.
- server.port=8180 : Web server port (In case of 8180, http://localhost:8180)
- spring.datasource.url=127.0.0.1:3306/fosslight : Set the IP, Port, and Database Name of the DB server where FOSSLight Database is installed.
- spring.datasource.username=fosslight : Database username.
- spring.datasource.password=fosslight : Database password.
- logging.path=./logs : Set log file path. ( Default "./logs" means an application execution path.)
- logging.file=fosslight : The name of the log file. (Ref. logback-spring.xml)
- root.dir=./data : Top path of file upload/download.
Build & Run
You can build and run it in the following way.
You can also download the official release version of the built war file.
- build (Create a war file.)
$ ./gradlew build
- run
$ ./gradlew bootRun
- build & run 2 (Run the application after building)
$ ./gradlew clean build && java -jar build/libs/FOSSLight-1.0.0.war
- Running options
- Web server port
--server.port=<PORT>
- Work Directory (Default : /usr/share/fosslight)
--root.dir=<WORK_DIRECTORY>
- Database Connections (Default : 127.0.0.1:3306/fosslight)
--spring.datasource.url=<IP>:<Port>/<Database> --spring.datasource.username=<USER_NAME> --spring.datasource.password=<PASSWORD>
- log file path
--logging.path=<LOG_PATH>
- Web server port
- Running options
Run from IDE
- Boot Dashboard > local > FOSSLight, (right click) start (Crtl + Alt + Shift + B, R)
Operation check
- If you connect to http://localhost:8180 from a web browser, the sign in page is displayed.
- Default account :
- id : admin, pswd : admin
Detailed settings
Set up the mail server
- Go to Configuration menu.
- Check the SMTP Setting check box.
- Enter the mail server information and save.
ex) In case of running mail service with docker-composeMail Server : fosslight_mail Email Address : no-reply@fosslight.org Port : 587 Encoding : UTF-8 Username : no-reply@fosslight.org Password : fosslight
- Restart Web server.
docker-compose restart fosslight_web
Download NVD Data
Set to download NVD data from 2002 data only once for the first time after server setting. : Download NVD Data