DigitalOcean VPS: Install PostgreSQL on CentOS Step 4

reference 1 : https://wiki.postgresql.org/wiki/YUM_Installation
reference 2 : https://www.webcorecloud.com/blog/2015/02/03/install-postgresql-94-centos-6x/

 

Install PostgreSQL

  1. command: rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm
  2. command: yum update
  3. command: yum install postgresql94*
  4. command: /usr/pgsql-9.4/bin/postgresql94-setup initdb
  5. command: chkconfig postgresql-9.4 on
  6. command: service postgresql-9.4 start
  7. command: service postgresql-9.4 statusinstall postgresql 001

Set password ‘postgres’

  1. command: su – postgres
  2. command: psql
  3. command: \password postgres
  4. command: \q
  5. command: exitinstall postgresql 002

set MD5 authentication

  1. command: nano /var/lib/pgsql/9.4/data/pg_hba.conf
  2. original text: install postgresql 003
  3. change text ‘ident’ to ‘md5’
  4. result text: install postgresql 004
  5. option change for accept allow any IPinstall postgresql 008
  6. command: Ctrl…

    Read More

DigitalOcean VPS: Install Tomcat 8 on CentOS Step 3

Reference 1 : https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-centos-7
Reference 2 : http://www.vwin.co.th/linux/basic-commands/
Reference 3 : http://www.yougetsignal.com/tools/open-ports/
Reference 4 : http://stackoverflow.com/questions/24756240/how-can-i-use-iptables-on-centos-7

 

Create Tomcat User

  1. command: sudo groupadd tomcat
  2. command: sudo useradd -M -s /bin/nologin -g tomcat -d /opt/tomcat tomcatinstall tomcat 001

Install Tomcat

  1. Download Tomcat: http://tomcat.apache.org/download-80.cgi
  2. copy url path “tar.gz”install tomcat 002
  3. command: wget http://www.us.apache.org/dist/tomcat/tomcat-8/v8.0.30/bin/apache-tomcat-8.0.30.tar.gzinstall tomcat 003
  4. command: sudo mkdir /opt/tomcat
  5. command: sudo tar xvf apache-tomcat-8*tar.gz -C /opt/tomcat —strip-components=1install tomcat 004

Update permission

  1. command: cd /opt/tomcat
  2. command: sudo chgrp -R tomcat conf
  3. command: sudo chmod g+rwx conf
  4. command: sudo chmod g+r conf/*
  5. command: sudo chown -R tomcat webapps/ work/ temp/ logs/Read More