CentOS cheatsheet

Add user to group:  useradd -G <groupname> <username>

Change password:  passwd <username>

Allow sudo access: visudo

Server Hostname:  /etc/hosts, /etc/sysconfig/network

PostgreSQL:

  1. yum install postgresql-server postgresql-cli
  2. service postgresql initdb
  3. chkconfig postgresql on
  4. /var/lib/pgsql/data/pg_hba.conf (add “host all all 127.0.0.1/32 trust” near bottom of page)
  5. service postgresql start

yum commands:  

  1. remove
  2. install
  3. list <package>*
  4. list installed | grep “^<package>”

List bash history:  cat /root/.bash_history

Leave a Reply

Your email address will not be published. Required fields are marked *

*