Search This Blog

Showing posts with label yum. Show all posts
Showing posts with label yum. Show all posts

Thursday, January 25, 2018

Postgres: Install Postgresql-server 9.2 on Centos 7.2


  • You search for the package you'll want to install
  • [root@toolz ~]# yum search postgres|grep server

  • To get more details:
  • [root@toolz ~]# yum info postgresql-server.x86_64

  • Then install it:
  • [root@toolz ~]# yum install postgresql-server.x86_64

  • Setup the postgres password:
  • [root@toolz ~]# passwd postgres

  • Init the postgres first DB
  • [root@toolz ~]# sudo postgresql-setup initdb

  • Setup your connections:
  • [root@toolz ~]# sudo vi /var/lib/pgsql/data/pg_hba.conf

  • Start postgresql service
  • [root@toolz ~]# systemctl start postgresql

  • And finaly enable it to start automatically at next boot
  • [root@toolz ~]# systemctl enable postgresql


What to do next:
  • pg_hba.conf
  • create databases and users
  • postgresql-server logging

Wednesday, February 22, 2012

YUM / RPM cheat


As root (or sudo):

YUM


To update your system:
yum update

To install a package:
yum install PACKAGE

To search a package:
yum search PACKAGE

To have more information for a specific package (version, architecture, etc):
yum info PACKAGE

To clean a "fucked up" yum conf:
yum clean all


RPM


What package "hold" a command
rpm -qf CMD

List packages
rpm -qa

Details of the package
rpm -qi PACKAGE

Erase a package. Give dependencies that block PACKAGE to be removed too)
rpm -e PACKAGE

Details of what provides a package
rpm -q --provides PACKAGE

Upgrade or install a package
rpm -Uvh PACKAGE

Upgrade a package (if already installed)
rpm -F PACKAGE