-
-
Notifications
You must be signed in to change notification settings - Fork 32
CentOS
Here is the following instructions to ensure a simple setup/config in CentOS.
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
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 yum install mariadb-server redis-server
Please start the database server once it is ready:
sudo systemctl start mariadb
You may wish to ensure that mariadb runs on system startup, this can be done with the following command:
sudo systemctl enable mariadb
Once running, please run the secure installation(mysql_secure_installation
), then create a get5 user after logging in as root:
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.
If Redis was unable to be installed, this may be due to missing EPEL. You will have to install EPEL with the following command:
sudo yum install epel-release
Once installed, please re-run sudo yum install redis-server
.
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.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 systemctl restart redis-server
and check the status of redis with the following command:
sudo systemctl status redis-server
With that, all requirements for the API have been met. Next up is configuring the application, which can be found at this page.