-
-
Notifications
You must be signed in to change notification settings - Fork 41
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 | bashAfter installation, close and re-open your command window, and run the following statement:
nvm install 14.17.5If 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 yarnEither 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-serverPlease start the database server once it is ready:
sudo service mariadb startYou may wish to ensure that mariadb runs on system startup, this can be done with the following command:
sudo service mariadb enableOnce 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 restartand check the status of redis with the following command:
sudo service redis-server statusWith that, all requirements for the API have been met. Next up is configuring the application, which can be found at this page.