-
-
Notifications
You must be signed in to change notification settings - Fork 32
Ubuntu Debian
Here is the following instructions to ensure a simple setup/config in Debian.
It's preferable to use node version manager (nvm) to control node installations. It makes it easier to swap between projects.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
After installation, close and re-open your command window, and run the following statement:
nvm install 14.17.5
If you do not have yarn on your system, you're going to need it. From the installation guide on their website, you need to run the following (please visit their site as it will be more up to date):
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install --no-install-recommends yarn
Either mysql or mariadb is acceptable. Redis is also used as a session store, so it will require some configuration as well. Install with the following commands:
sudo apt update && sudo apt install mariadb-server redis-server
Please start the database server once it is ready:
sudo service mariadb start
You may wish to ensure that mariadb runs on system startup, this can be done with the following command:
sudo service mariadb enable
Once running, please run the secure installation(mysql_secure_installation
), then create a get5 user after logging in as root:
CREATE DATABASE GET5{ENV};
CREATE USER 'get5_user'@'localhost' IDENTIFIED BY 'sup3r_s3cUr3_p4ssw0rD';
GRANT ALL PRIVILEGES ON get5{ENV}.* TO 'get5_user'@'localhost';
FLUSH PRIVILEGES;
Where {ENV}
is either dev, test, or nothing (for production). Write down the password that you gave get5_user
as this will be needed later.
To ensure we have a secure installation for Redis, we must also edit the config file. Using your favourite text editor (such as vi/vim), open the file located at /etc/redis/redis.conf
and locate the line requirepass
. Un-comment this line (remove the #
) and change the password to something nice and secure. This will prevent anyone from logging into the redis database and stealing sessions. Write down this password as it will be needed. Once that is done, you may restart your redis instance via:
sudo service redis-server restart
and check the status of redis with the following command:
sudo service redis-server status
With that, all requirements for the API have been met. Next up is configuring the application, which can be found at this page.