Created
June 21, 2016 00:46
-
-
Save ryaz/b2ae30f6fcb7f801c9e4e8cc29b03085 to your computer and use it in GitHub Desktop.
Notes for install rails project on ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- check run commands as login shell in terminal profile preferences after you install rvm and open new tab | |
- `sudo apt-get install nodejs postgresql postgresql-contrib git npm phantomjs libpq-dev` | |
- `sudo npm install bower -g` | |
- `sudo ln -s which nodejs/usr/bin/node` | |
- add ubuntu superuser: | |
ubuntu@ubuntu-amd64:~/Sites/webapp$ sudo -i -u postgres | |
postgres@ubuntu-amd64:~$ createuser --interactive | |
Enter name of role to add: ubuntu | |
Shall the new role be a superuser? (y/n) y | |
postgres@ubuntu-amd64:~$ exit | |
- Edit postgres configuration file: | |
`sudo nano /etc/postgresql/POSTGRE_VERSION/main/pg_hba.conf` | |
- Change all configuration access to: | |
# Database administrative login by Unix domain socket | |
local all all trust | |
# TYPE DATABASE USER ADDRESS METHOD | |
# "local" is for Unix domain socket connections only | |
local all all trust | |
# IPv4 local connections: | |
host all all 127.0.0.1/32 trust | |
# IPv6 local connections: | |
host all all ::1/128 trust | |
- Restart postgres server | |
`sudo service posgresql restart` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for Ubuntu 16.04
instead
sudo ln -s which nodejs/usr/bin/node
use
sudo ln -sT $(which nodejs) /usr/local/bin/node
and instead
sudo service posgresql restart
use
systemctl unmask postgresql
systemctl restart postgresql