Linux - Canary

[Linux] Compiling Canary Sources

This tutorial was created with /home/user. If you are using root user change for a normal user.

Create the user:

  • sudo adduser NAME

Give privileges to the created user:

  • sudo usermod -aG sudo NAME

Change in the Linux Terminal from root to the created user:

  • sudo su - NAME

1 - Download Bitvise:

https://www.bitvise.com/ssh-client-download

1.1 - Bitvise Tutorial:

https://www.bitvise.com/getting-started-install-ssh-client

2 - Compiling Canary Sources:

Debian

Update cmake

Update gcc:

-

Ubuntu 20.04

Update cmake:

Update gcc:

-

Ubuntu 20.04 ARM

Update cmake:

Update gcc

-

Ubuntu 22.04

Update cmake:

Update gcc:

-

Ubuntu 22.04 ARM

Update cmake:

Update gcc:

-

Ubuntu 24.04

Update cmake:

Update gcc:

-

How to update vcpkg:

If you already have vcpkg installed

To update vcpkg installation, run the commands below:

  • cd vcpkg

  • git pull

  • ./vcpkg upgrade

  • ./vcpkg upgrade --no-dry-run

  • ./bootstrap-vcpkg.sh

Observations:

Before compiling Canary in ARM, comment these lines in the CMakeLists.txt.

The file CMakeLists.txt is located on Canary main folder.

-- Running vcpkg install

This step will take a long time on the first run, as it needs to download and install all the dependencies, so be patient!

Nginx + MariaDB + MyAAC

1 - Installation - Nginx:

Nginx
  • How to test: http://server-ip

2 - Installation - MariaDB:

MariaDB

3 - Configuration - MariaDB User:

Configuration - MariaDB User
  • If you have root user-enabled password authentication, you will need to run the following command and enter your password when prompted to be able to connect:

  • From there, create a new user and give them a strong password:

  • Then grant your new user the appropriate privileges. For example, you can grant user privileges to all tables within the database, in addition to the power to add, change, and remove user privileges, with this command:

  • After that, exit the MariaDB shell:

4 - Installation - PHP:

PHP

5 - Installation - phpMyAdmin:

phpMyAdmin

6 - Configuration - Nginx:

Configuration - Nginx
  • In the terminal type the following command:

  • Once installed we will configure Nginx, then in the terminal enter the following command:

  • Configure leaving it this way:

-

  • How to test: http://server-ip/phpmyadmin

  • How to restrict phpMyAdmin access:

sudo mv /var/www/html/phpmyadmin /var/www/html/any_combination_youwant

• Change any_combination_youwant for a word that only you know.

• Then you will access phpMyAdmin by: http://server-ip/any_combination_youwant

7 - Database:

  • Go to phpMyAdmin.

  • On the left side click +New and create a database (e.g. canary)

  • Import the schema.sql that is in the server folder.

Atualizado