Translations:Оффлайн установка платформы SmartPlayer на операционный системы Ubuntu / Astra/2/en

Материал из SmartPlayer
Версия от 15:16, 15 февраля 2026; N.Bloshkin (обсуждение | вклад) (Новая страница: «== '''Docker and Docker Compose Installation''' == Depending on the operating system, the user independently selects the appropriate Docker and Docker Compose version required for installation on the server OS: {| class="wikitable" |+ Docker and Docker Compose Versions |- ! Link to docker / docker-compose archive !! Description |- |[https://distributions.hb.bizmrg.com/PLATFORM/GENERAL/docker-and-docker-compose_ubuntu_server_24_04.tar.gz Link] || Archive f...»)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Docker and Docker Compose Installation

Depending on the operating system, the user independently selects the appropriate Docker and Docker Compose version required for installation on the server OS:

Docker and Docker Compose Versions
Link to docker / docker-compose archive Description
Link Archive for offline Docker installation for Ubuntu Server 24.04 LTS
Link Archive for offline Docker installation for Ubuntu Server 22.04 LTS

Installation Algorithm

Due to fonts, some commands may appear to use curly quotes. This is not the case — single quotes are used.
Replace the "*" symbol with the actual file version in the commands below.

Be sure to request a new user account from the SmartPlayer technical support team.
Create a SmartPlayer user without root privileges. After installing the server application, authorization under this user must be disabled.

To continue installation, connect to the server and upload all archives to the SmartPlayer user's home directory. You may use the "sftp" utility or any other method — the key requirement is that the archives are uploaded to the server.

It is recommended to use our offline archive for installation. However, in some cases installation from the customer’s repository is required. Both options are described below:

  • Extract the Docker archive and navigate to the extracted directory:

tar -zxvf docker-and-docker-compose*.tar.gz && cd docker-and-docker-compose*

  • Install Docker and required components:

sudo ./install-docker-and-docker-compose-offline.sh

  • Update package lists:

apt update

  • Install docker and docker compose packages:

apt install docker.io docker-compose-v2

  • Optional: to run docker without sudo, add the user to the docker group:

sudo usermod -aG docker $USER

  • Add the SmartPlayer user to the docker group:

sudo usermod -aG docker smartplayer

After completing the above steps, disconnect from the server and reconnect.

  • Verify Docker and Docker Compose installation:

docker --version

The output depends on the operating system.

docker-compose --version

The response will depend entirely on the operating system:

Example of output
For docker-compose ver.2 (included in Ubuntu archives starting from Ubuntu 24.04), it is recommended to enable compatibility mode (runs via "docker-compose", containers use "_" as separator):
  • sudo echo 'docker compose --compatibility "$@"' > /bin/docker-compose
  • sudo chmod +x /bin/docker-compose
  • Enable Docker auto-start:

sudo systemctl enable docker

Server Application Installation

  • Extract the archive into the directory where the platform will be installed. Replace "*" with the actual file version:

unzip sp_docker_v_*.zip -d smartplayer

  • Import Docker images (wait until images finish loading):

docker image load -i /home/smartplayer/smartplayer/tools/installer/docker_images_*.tar.gz

  • Verify all images were loaded:

docker image ls

The result should match the screenshot below:

Example output
  • If an error appears on Astra Linux during image loading such as:*

directory '/var/lib/docker/overlay2/... contains vulnerabilities!... Astra Linux - vulnerability in openssl ...

You must execute the following:

sudo mkdir /etc/docker sudo touch /etc/docker/daemon.json sudo cat << EOF > /etc/docker/daemon.json { "astra-sec-level" : 6 } EOF sudo systemctl restart docker

After that, reload the images.

  • Optional: if images were successfully loaded, remove the archive:

rm docker_images_*.tar.gz

  • Change ownership for the server application directory:

sudo chown -R smartplayer:smartplayer /home/smartplayer/smartplayer

  • Switch to SmartPlayer user and perform further steps under this account:

sudo su smartplayer

  • Navigate to the server application directory:

cd /home/smartplayer/smartplayer

  • Configure env file:

mv .env.example .env nano .env

  • The user must fill in the following fields:
  1. MYSQL_ROOT_PASSWORD, MYSQL_PASSWORD — passwords for MySQL connection (generate them)
  2. CMS_URL — Personal account URL. Example: if the server is available at "http://192.168.56.101/cms", specify this address (without trailing slash).
  3. APP_URL — Server application URL. Example: if the server is available at "http://192.168.56.101", specify this address (without trailing slash).

Save configuration and exit. (ctrl+S, ctrl+X)

Example configuration with highlighted parameters
  • If using https, add the certificate chain and private key named ssl.crt and ssl_private.key into:

/home/smartplayer/smartplayer/nginx/ssl/

  • Start applications and wait 2 minutes:

docker-compose up -d

  • Create database tables:

docker exec -it smartplayer_backend_1 sh -c './cli.js db init'

  • Upload widgets:

docker exec -it smartplayer_backend_1 sh -c './cli.js widgets upload'

  • Create user:

docker exec -it smartplayer_backend_1 sh -c './cli.js company create-with-user'

By default, the SmartPlayer technical support team should create the first user with login — root@smartplayer.org.
If an error occurs during user creation, repeat the previous step and recreate DB tables.
  • Check server application status:

docker exec -it smartplayer_backend_1 sh -c 'pm2 list'

Correct output example:

Example of correct output
  • Enable automatic MySQL DB backups (run under smartplayer user):

./mysql_backup/init_auto_backups.sh

  • Verify MySQL backups:

./mysql_backup/mysql_backup.sh

  • The server application will then be available in the browser at the address specified in the CMS_URL variable.