sudo apt update
sudo apt install unace unrar zip unzip p7zip-full p7zip-rar sharutils gnupg2 rar uudeview mpack arj cabextract file-roller
sudo apt-get install curl git gitk
curl -L get.rvm.io | bash -s stable
If it fails run these commands and try again:
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
ALTERNATIVELY, if you face unfixable issues you may follow https://github.com/rvm/ubuntu_rvm and skip this section)
-
CAREFULLY READ OUTPUT OF THIS COMMAND, THERE WILLL BE FAILURE PROBABLY, AND IT WILL TELL HOW TO FIX THIS FAILURE
-
IT WILL GIVE SOME LINE SIMILAR TO BELOW LINE, SEE PREVIOUS COMMAND OUTPUT FOR ACTUAL COMMAND
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-
AFTER FOLLOWING INSTRUCTIONS RE-RUN THE COMMAND I.E:
curl -L get.rvm.io | bash -s stable
rvm -v
if it fails, try closing and re-opening terminal window
rvm list
sudo apt-get install build-essential openssl libreadline6-dev
rvm install 2.7
rvm install 3.0
(Now we will install nvm for node version managaement, it will help when you will move to different projects)
(Follow instructions here: https://github.com/nvm-sh/nvm#install--update-script )
(restart terminal)
nvm install 14
gem -v
rvm list
rvm -v
gem install bundler
gem install bundler -v 1.17
gem install rails
bundle (only if you are in a rails project directory, skip otherwise)
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
*For simple instalation
sudo apt install postgresql pgadmin4
For PL/Python support(skip if you don't know what that is)
Don't forget to replace 10 with 9 in following command if you need postgres 9
sudo apt-get install postgresql postgresql-10 postgresql-plpython-10 pgadmin4
Below are common steps for initial setup of DB user
sudo -u postgres psql postgres
# \password postgres (SET PASSWORD FOR 'POSTGRES' USER)
# \q (to exit psql terminal)
exit
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install redis-server
sudo update-rc.d redis-server enable
sudo update-rc.d redis-server defaults
sudo systemctl restart redis-server.service
sudo systemctl enable redis-server.service
redis-benchmark -q -n 1000 -c 10 -P 5
sudo apt-get install gdebi npm
npm install -g sass-lint eslint stylelint coffeelint htmlhint typings (if fails, try with sudo)
- setup
git_rails
(if you want to).... - download and copy file git_rails in home directory(https://github.com/runephilosof/git-rails)
sudo ln -s ~/git_rails /usr/bin/git_rails
// IF YOU NEED, postgres backup and restore...(with roles etc) below are some commands for record.
pg_dumpall -U ziap1 -h localhost > db_backupall
(to backup from old system)
psql -f db_backupall postgres -U postgres -h localhost
(to restore on new system)
This gist is tested/used many times but still keep an eye for any abnormalities/errors and in addition to fixing them report them here by commenting so this guide can get better and up-to dated.