How to Install Traduora on Ubuntu Server

Traduora is an open-source translation management software that enables you to translate your website, software, or application into different languages. In this tutorial, we will go through the process of installing Traduora on Ubuntu Server.

Prerequisites

Step 1: Install Required Packages

To begin the installation process, we need to install some required packages on our Ubuntu server. Open up a terminal and run the following command to update the package list:

sudo apt-get update

Next, install the required packages using the following command:

sudo apt-get install -y curl git nginx php php-fpm php-mbstring php-zip php-curl php-xml unzip zip mysql-server

Step 2: Install Composer

Composer is a dependency manager for PHP that we need to install to manage the packages needed by Traduora.

Run the following command to install Composer:

sudo curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

Step 3: Clone Traduora from GitHub

Now, we need to clone Traduora from GitHub repository to our server.

Run the following command to clone the repository:

git clone https://github.com/traduora/traduora.git

After the clone is completed, go to the Traduora directory:

cd traduora

Step 4: Install Packages

In this step, we will install the packages required by Traduora.

Run the following command to install the packages:

sudo composer install

Step 5: Configure NGINX

In order to access Traduora, we need to configure NGINX.

Run the following command to create a new NGINX configuration file:

sudo nano /etc/nginx/sites-available/traduora.conf

Add the following content to the file:

server {
    listen 80;
    server_name traduora.example.com;
    root /var/www/traduora/public;

    client_max_body_size 100M;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}

Don't forget to replace traduora.example.com with your domain name. Save and close the file by pressing Ctrl + X, Y, and then Enter.

Now, create a symbolic link to the configuration file:

sudo ln -s /etc/nginx/sites-available/traduora.conf /etc/nginx/sites-enabled/

Finally, restart NGINX to apply the changes:

sudo systemctl restart nginx

Step 6: Configure Database

In this step, we will create a new database for Traduora.

Log in to the database server using the following command:

mysql -u root -p

After that, create a new database and user with the following command:

CREATE DATABASE traduora;
CREATE USER 'traduora'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON traduora.* TO 'traduora'@'localhost';
FLUSH PRIVILEGES;

Remember to replace password with your own password.

Step 7: Configure Environment Variables

Traduora requires some environment variables to be set in order to work properly. In this step, we will create a new .env file and configure the variables.

Run the following command to create the file:

cp .env.example .env

Next, open up the .env file using a text editor:

nano .env

Configure the following variables according to your preferences:

APP_ENV=local
APP_DEBUG=true
APP_URL=http://traduora.example.com

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=traduora
DB_USERNAME=traduora
DB_PASSWORD=password

Save and close the file by pressing Ctrl + X, Y, and then Enter.

Step 8: Run Migrations

In this step, we will run the migrations to create the required database tables.

Run the following command to migrate the tables:

php artisan migrate

Step 9: Install Language Package

Finally, we need to install the language package that we want to translate our application into.

Run the following command to install the package:

php artisan lang:install es

Replace es with the language key that you want to install.

Step 10: Access Traduora

Now, everything should be set up and running. Visit http://traduora.example.com to access Traduora and start translating your application!

Conclusion

In this tutorial, we learned how to install Traduora on Ubuntu Server. Now, you can start translating your applications into different languages with ease.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!