INSTALL AND CONFIGURE A RETRO WITH THE NITRO CLIENT LOCALLY ON LINUX! [1/2]

Aenis

New Member
Aug 10, 2021
11
7
Welcome to you,

if you liked this title I hope you will find your happiness there,
Being a current Linux user, I got interested and motivated to want to contribute to using Nitro to give a helping hand to the curious and passionate community of any beginner, novice or professional.

I followed the steps to follow in the tutorial to make sure that no step is missing so that even beginners find their way around, nothing is perfect, if you have spotted errors or if you do not succeed do not hesitate to let me know!


Here I will discuss some steps to administer and install a Nitro client locally on the linux operating system (Debian 10 & GNU / Linux):

You will learn to:
_ Install Linux dependencies to realize your web project.
_ Familiarize yourself with the Linux terminal.
_ Install and configure a site on the Apache2 web server.
_ Familiarize yourself with the Mysql database from the command line.
_ Set up and configure a simple CMS like Cosmic.
_ Create a domain name locally on your machine.
_ Some useful Linux commands.


/!\
You will not learn to:
_ Use a Linux system.
_ Understand and use all the tools to install.
_ Manage any errors encountered during the steps of this tutorial.

If you are a Linux newbie, I suggest you try this tutorial on a virtual machine!

/!\

Personally, I advise you to learn how to document yourself on the Internet to know the steps to follow, do not stupidly copy / paste an order without knowing what it is for, this will not help you at all and you may encounter problems that can undoubtedly disturb your machine with bugs!


Do you have questions, errors? Do not hesitate to contact me by private message or on the article.

My discord: bringthesalam

////////
/ CREDITS
/
/ A big thank you to Bill and his team of developers and to the third parties who were present to help me complete this tutorial
/ Bill - Nitro project discord server links:

/
/
////////


/!\
First off, you'll have some useful resources and tools to download from Linux before you get started!
/!\


PREREQUISITES:

Installation of NodeJS :

_In view of the few installation problems I encountered on Nitro with version (14) - LTS of NodeJS I would use version 16 on this tutorial, (if you have installation problems with the version, try multiple versions to test them on your machine is the first step.)

To change version with the Github NodeJS:
LINK


DO NOT FORGET :
Bash:
$ sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y autoremove

Install 16v.Node JS with the commands:


# For use in Ubuntu
Bash:
$ curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
$ sudo apt-get install -y nodejs

# To be used on Debian, as root
Bash:
$ curl -fsSL https://deb.nodesource.com/setup_current.x | bash -
$ apt-get install -y nodejs

# Install PHP and its useful modules:
Bash:
$ apt-get -y install php-json

$ apt-get -y install php-curl

$ apt-get -y install php-mbstring

# Installation of composer :
Bash:
$ sudo apt-get -y install composer

# Installation of npm :
Bash:
$ sudo apt-get -y install npm

# Installation of Git :
Bash:
$ sudo apt-get -y install git

# Installation of Apache2 :
Bash:
$ sudo apt-get -y install apache2

# Installation of mysql and phpmyadmin :
mysql [CONFIGURING MYSQL IN ANOTHER POST AVAILABLE SOON]:
Bash:
$ sudo apt-get -y install default-mysql-server
phpmyadmin :
Bash:
$ sudo apt-get -y install phpmyadmin

START OF INSTALLATION!

We will have to install the Arcturus Morningstar emulator and its database:

Download the 3-0-0-stable.rar file from this link:

Extract the file and access the emulator's SQL folder:
Bash:
$ cd 3-0-0-stable/sqlupdates/

Start the mysql and apache2 server:

mysql:
Bash:
$ sudo service mysql start
apache2:
Bash:
$ sudo service apache2 start

We connect to Mysql to create the database which will import the .sql file:

# Connection to the database:
Bash:
$ mysql -u root  -p
Enter password: [PASSWORD]

# Creation of the database:
SQL:
> create database nitro;

# Check that your database has been created:
SQL:
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| nitro              |
| performance_schema |
| phpmyadmin         |
+--------------------+
5 rows in set (0.001 sec)

Nitro has been created, now we can quit mysql:
SQL:
> exit

Still in the / 3-0-0-stable / sqlupdates / folder we will import the .sql file from the emulator:
Bash:
$ mysql -u root -p nitro < arcturus_3.0.0-stable_base_database.sql
Enter password: [MOT_DE_PASSE]

Here you are, you are now ready to install the Cosmic CMS!

We will install the Cosmic CMS in apache, import its database and update its PHP components:
Bash:
$ git clone https://git.krews.org/Raizer/Cosmic.git ./var/www/CMS/

# Access the CMS folder and run the composer command:

Bash:
$ cd /var/www/CMS/
$ sudo composer install

# Configure the .env file to connect your CMS to the database:
Bash:
$ sudo mousepad /var/www/CMS/Cosmic/.env

# You must have this configuration:
Code:
DB_DRIVER=mysql
DB_HOST=localhost
DB_NAME=nitro
DB_USER=root
DB_PASS=[MOT_DE_PASSE]
DB_CHARSET=utf8
DB_COLLATION=collation

# Once finished, access the CMS SQL file folder and import the .sql file:
Bash:
$ cd /var/www/CMS/Database/

# Before importing the .sql file we need to fix some issues the CMS is having with the emulator:

# Connect to http: // localhost / phpmyadmin / and click on the nitro database you created:
You must be registered for see images attach


# Click on SQL and copy paste the following command to run it:
You must be registered for see images attach



SQL :
SQL:
ALTER TABLE users ADD template enum('light','dark') NULL DEFAULT 'dark';
ALTER TABLE bans MODIFY COLUMN machine_id varchar(255)NOT NULL DEFAULT '';
SET FOREIGN_KEY_CHECKS = 1;

# Return to the console to import the .sql file into / var / www / CMS / Database /:
Bash:
$ mysql -u root -p nitro < 2.6.sql
Enter password: [MOT_DE_PASSE]
ERROR 1060 (42S21) at line 1595: Duplicate column name 'secret_key' ##YOU CAN IGNORE THIS ERROR##

Now that we have configured the emulator database and the CMS we must now set up a virtualhost in our apache2 web server to access our CMS!

# Access the apache2 site configuration file:
Bash:
$ cd /etc/apache2/site-available/

# Disable the default apache2 virtualhost:
Bash:
$ sudo a2dissite default

# Create the virtualhost configuration file for your CMS and edit it:
Bash:
$ sudo mousepad cosmic.conf

# Edit your file with the following configuration:
Code:
<VirtualHost *:80>
    ServerName cosmic.local
    DocumentRoot /var/www/CMS/Cosmic/public
 
    <Directory /var/www/CMS/Cosmic/public/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

</VirtualHost>

# Edit your hosts file to create the domain name cosmic.local:
Bash:
$ sudo mousepad /etc/hosts

# Add the following line at the bottom of localhost to add the domain name:
Code:
127.0.0.1    localhost ##NE TOUCHER SURTOUT PAS CETTE LIGNE##
127.0.0.2    cosmic.local ##AJOUTER CETTE LINGNE##

# Activate the configuration of the cosmic.conf site with the following command in / etc / apache2 / site-available /:
Bash:
$ a2ensite cosmic.conf
Enabling site cosmic.
To activate the new configuration, you need to run:
  systemctl reload apache2

# Restart the apache2 web server if it is not done:
Bash:
$ service apache2 restart

# Currently we have just configured our CMS at http: //cosmic.local from our local web server you can now access it from your preferred browser:
You must be registered for see images attach


# Create your user (We will give him the rank of moderator a bit later in the next steps)

Here is the first steps to follow before configuring our Nitro client, if all is well, you will move on to the next step otherwise repeat the steps until you understand the essential principles of these steps and and by the the same occasion you familiarize yourself with Linux!
 
Last edited:

Aenis

New Member
Aug 10, 2021
11
7
My prefer is to use nginx instead of apache. It is easier to use and you can also configure some ddos protections etc
You are right, I am currently trying to optimize the speed (disk [RAID 10] (Or without) & TCP / IP) with the operating system OpenBSD, Nginx as web server, Mariadb / SQLite as database, and the emulator starts directly on OpenBSD.

You can with this with another machine, access your server securely with SSH (For administration), DBeaver (For database management) everything is a question of configuration.

Haven't tried it yet, but it looks great to me, in terms of performance and safety.
 

bradandrews4

New Member
Dec 4, 2011
10
1
Nice share mate. Sure this will help out lots of people, struggling with getting the initial setup to work properly! When will you be sharing part 2/2?

Only part I'm getting confused with, is getting Nitro Client to work.
 

Aenis

New Member
Aug 10, 2021
11
7
Nice share mate. Sure this will help out lots of people, struggling with getting the initial setup to work properly! When will you be sharing part 2/2?

Only part I'm getting confused with, is getting Nitro Client to work.
Hello, glad you like it, for part 2 of the tutorial I am looking for a way to have a way to convert .swf and at the moment I have not found an alternative that could help me provide you with a good one. .swf or .nitro
 

bradandrews4

New Member
Dec 4, 2011
10
1
Hello, glad you like it, for part 2 of the tutorial I am looking for a way to have a way to convert .swf and at the moment I have not found an alternative that could help me provide you with a good one. .swf or .nitro
Why do you need to convert? Does this help you at all?:

Or there's also this:

But it decompiles/recompiles nitro files only, not swf...
 

Users who are viewing this thread

Top