$ sudo adduser deploy
add "deploy" user to sudo group if you want deploy to be a sudoer
$ sudo usermod -aG sudo deploy
verify if the user has been added to the sudo group result should include "sudo" for the deploy user $ groups deploy
If you don't want deploy to be a sudoer, you can add the privileges independently
$ visudo
Add your new user privileges under root & ctrl+x then y to save
deploy ALL=(ALL:ALL) ALL
$ su deploy
Si unajua kufanya hiyo
sudo apt install build-essential libpq-dev libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev autoconf bison postgresql postgresql-contrib
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc
$ source ~/.bashrc
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
$ rbenv install 3.1.2
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ source ~/.bashrc
$ nvm install 16.10.0
$ sudo curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
$ source ~/.bashrc
$ npm install -g yarn
$ curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
$ echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
$ sudo apt-get update
$ sudo apt-get install redis redis-server
$ sudo vi /etc/redis/redis.conf
change supervised from auto to systemd
$ sudo systemctl restart redis-server
$ su - postgres
$ psql
CREATE USER deploy WITH PASSWORD 'S3Cur3Pa$&W0rD' CREATEDB;
CREATE DATABASE myapp_production;
GRANT ALL PRIVILEGES ON DATABASE spectralhub_production TO deploy;
\q
to exit postgres
ctrl+D to exit out of postgres user
$ sudo systemctl restart postgresql