# Installation
# Server Requirements
The Laravel Framework has a few system requirements, so you will need to make sure your server meets the following requirements:
Requirements |
---|
OS Ubuntu, Debian |
PHP >= 8.2 |
PostgreSql >= 15.01 |
NODE JS >= v16.4 |
NODE PACKAGE MANAGER (NPM) >= 7.14 |
BCMath PHP Extension |
Ctype PHP Extension |
BCMath PHP Extension |
JSON PHP Extension |
Mbstring PHP Extension |
OpenSSL PHP Extension |
PDO PHP Extension |
Tokenizer PHP Extension |
XML PHP Extension |
PGSQL PHP Extension |
GD PHP Extension |
# Copy project files
Unzip the downloaded archive file and unzip it into your project root folder. Make sure your system and web-server user has write access to entire storage
and bootstrap
folders.
IMPORTANT: After unzipping files, you may need to configure some permissions. Directories within the storage
and the bootstrap/cache
directories, and .env
(we need this to set some config files from Admin Dashboard) file should be writable by your web server or CEX Exchange will not run!
You can get .env.example file content from the Environment variables section.
Also, you should configure your web server's document / web root to be the public
directory. The index.php in this directory serves as the front controller for all HTTP requests entering your application. Nginx or Apache Virtual Host Files should be properly configured. See the documentation (opens new window) from the official Laravel Website.
# Installing Project
CEX Exchange utilizes Composer to manage its dependencies. So, before using, make sure you have Composer installed on your machine, otherwise see this guide (opens new window) about how to install it.
- Install Composer Dependencies
composer install
- Install Node Package Dependencies
npm install
- Copy Environment File
cp .env.example .env
IMPORTANT: You have to create .env file from .env.example file, as it has preconfigured variables, such as SMTP Server Credentials of the email provider, and only for demo purposes. These values will be changed from the Site Configuration
section later.
- Generate Application Key
php artisan key:generate
Create Postgre Database / User
Open .env file and set database credentials
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
Set Application Url (just edit existing variable from .env file)
APP_URL=
Example:
APP_URL=http://yourdomain.com
Set Application Domain for API without protocol (just edit existing variable from .env file)
SANCTUM_STATEFUL_DOMAINS=
Example:
SANCTUM_STATEFUL_DOMAINS=yourdomain.com
NOTE: If you use other port than 80 to run it locally, e.g. php artisan serve
command starts serving the site with custom port 127.0.0.1:8000, don't forget to include the port as well.
Example:
SANCTUM_STATEFUL_DOMAINS="127.0.0.1:8000"
7. Run Database Migrations
php artisan migrate
- Run Database Seeders
php artisan db:seed
- Link Storage Folder
Linux, Windows Users:
php artisan storage:link
Mac OS (Run the command to create the symlink manually (assuming we are in public
folder):
cd public
sudo ln -s ../storage/app/public storage
- Build asset files
./compile.sh
That's all. Initial installation was completed. These steps are pretty enough to serve both front and backend pages.
If you can't open the site after the steps above, the reason might be:
Folder / File Permissions. See our notes in
Copy Project Files
section above.Web-Server Virtualhost Configuration. See the official Laravel instructions (opens new window)
Skipped commands above. Any missed or skipped steps above might cause unexpected exceptions.
# Product Activation
When you complete all the steps above and visit the page, the first thing you need to do is entering your license key.
# Account Registration
By default, CEX Exchange does not have any preinstalled users, so the first registered user will become an admin user.
After registration, click on the profile icon to open Admin Dashboard, you can also visit it by navigating yoursite.com/exchange-control-panel
The next section describes the site configuration sections, so let's move to it.