2015. 8. 31. 01:16

1. Install PostgreSql

$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

$ sudo echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main 9.4" >> pgdg.list

$ sudo cp pgdg.list /etc/apt/sources.list.d/pgdg.list

$ sudo apt-get update

$ sudo apt-get -y install postgresql-9.4 postgresql-client-9.4


2. Set password for Postgresql

$ sudo -u postgres psql postgres

postgres=# \password postgres

Enter new password: 

Enter it again: 

postgres=# \q


3. Allow aceess remote

$ sudo vi /etc/postgresql/9.4/main/pg_hba.conf

...

# IPv4 local connections:

host    all             all             127.0.0.1/32            md5

host    all             all             192.168.1.0/24          md5   # Add 

...

$ sudo vi /etc/postgresql/9.4/main/postgresql.conf

listen_addresses = '*' # replace "*" with "localhost"

port = 5432

$ sudo service postgresql restart


4. Open Port on firewall

$ sudo ufw allow 5432


5. Test

pgAdmin Download








Reference

http://www.unixmen.com/install-postgresql-9-4-phppgadmin-ubuntu-14-10/

http://askubuntu.com/questions/233064/why-am-i-getting-command-deb-not-found


Posted by CoolDragon
2015. 8. 27. 18:02


$ sudo dpkg -i "YourDebPackage.deb"


Posted by CoolDragon
2015. 8. 27. 07:00

#Download Vagrant latest version(2015.08.26)

$ wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4_x86_64.deb


# Install Vagrant

$ sudo dpkg -i vagrant_1.7.4_x86_64.deb


#version check

$ vagrant --version

Vagrant 1.7.4


#VirtualBox install

$ sudo apt-get install virtualbox


# Install ubuntu 14.04 on Virtualbox using vagrant

You can find vagrant box on the following: http://www.vagrantbox.es/

ex) $ vagrant box add {title} {url}


$ vagrant box add ubuntu14.04 https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box


# After initialization, Vagrantfile is created and the information in the file configuration can set up OS automatically

$ vagrant init ubuntu14.04


# Execute OS

$ vagrant up


# Shutdown OS

$ vagrant halt or vagrant suspend


# Delete OS

$ vagrant destroy


# Apply provisioning

$ vagrant provision


# Access server

$ vagrant ssh


# Setting Vagrant provisioning





Posted by CoolDragon