The installer script works with all supported upgrade methods (Linux Archive, RPM, Debian and Docker Compose). It provides you an interactive way to install Xray and its dependencies.
Warning
When running the installer script for a Linux Archive installation, do not run the installer script from a symlinked folder, as this may cause the installer to fail.
Before you proceed with the installation, review the system requirements.
Follow these steps to install the product:
Extract the contents of the compressed archive and go to the extracted folder.
tar -xvf jfrog-xray-<version>-<compose|rpm|deb>.tar.gz cd jfrog-xray-<version>-<compose|rpm|deb>
OS user permissions for Linux archive
When running Xray, the installation script creates a user called xray by default, which must have run and execute permissions on the installation directory.
We recommend that you extract the Xray download file into a directory that gives run and execute permissions to all users such as
/opt
.mv jfrog-xray-<version>-linux.tar.gz /opt/ cd /opt tar -xf jfrog-xray-<version>-linux.tar.gz mv jfrog-xray-<version>-linux xray cd xray
.env file included within the Docker-Compose archive
The .env file is used by docker-compose and is updated during installations and upgrades.
Some operating systems do not display dot files by default. If you make any changes to the file, remember to backup before an upgrade.
Run the installer script.
The script prompts you with a series of mandatory inputs, including the jfrogURL (custom base URL)and joinKey
RPM or Debian
./install.sh
Docker Compose
./config.sh
Linux archive
Check prerequisites for Xray in Linux Archive before running install script.
./install.sh --user <user name> --group <group name> -h | --help : [optional] display usage -u | --user : [optional] (default: xray) user which will be used to run the product, it will be created if its unavailable -g | --group : [optional] (default: xray) group which will be used to run the product, it will be created if its unavailable
Validate and customize the product configuration (optional), including the third party dependencies connection details and ports.
Warning
Verify that a large file handle limitis specified before you start Xray.
Start and manage the Xray service.
Important
Starting from Xray 3.8x, the stop and restart action on Xray will not be applied to RabbitMQ process. On start action of Xray, if RabbitMQ is not running, it will be started.
If you want the script to perform stop and restart action on RabbitMQ, set shared.rabbitMq.autoStop as true in the system.yaml. This flag is not consumed in docker-compose installation.
systemd OS
systemctl start|stop xray.service
systemv
service xray start|stop
Docker Compose
cd jfrog-xray-<version>-compose # Starting from Xray 3.8x RabbitMQ has been moved to a compose file of its own, this needs to be started before starting other services docker-compose -p xray-rabbitmq -f docker-compose-rabbitmq.yaml up -d # Starting from 3.8.x, PostgreSQL needs to be started before starting the other services. docker-compose -p xray-postgres -f docker-compose-postgres.yaml up -d docker-compose -p xray up -d docker-compose -p xray ps docker-compose -p xray down
Linux archive
xray/app/bin/xray.sh start|stop
You can install and manage Xray as a service in a Linux archive installation. For more information, see start Xray section under Linux Archive Manual Installation.
Access Xray from your browser at:
http://<jfrogUrl>/ui/:port
.Go to the Xray Security & Compliance tab in the Administration module in the UI.
Check the Xray log.
tail -f $JFROG_HOME/xray/var/log/console.log
Configure log rotation of the console log
The
console.log
file can grow quickly since all services write to it. For more information, see configure the log rotation.