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)
For those who were facing issue with the postgres installation like me because of an error with the release file. (E: The repository 'http://apt.postgresql.org/pub/repos/apt ulyssa-pgdg Release' does not have a Release file.)
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
We were using this command according to the study guide provided to us. This (in my case) gets 'ulyssa' as the release file. This causes the error. You can try entering 'bionic' instead of '$(lsb_release -cs)' to resolve the error as this worked for me.
In case this does not solve your issue use the following link to select another name file:
https://apt.postgresql.org/pub/repos/apt/dists/
Hopefully this will resolve your issue. You can also use "sudo nano" command to edit the text.
Try sudo apt-get update after this and you will an error free log.
My System Details:
Operating System: Linux Mint 20.1 Cinnamon
Cinnamon Version: 4.8.6
Linux Kernel: 5.11.0-37-generic
Have a good day.