background preloader

Linux

Facebook Twitter

PostgreSQL Database Server Configuration in Debian. PostgreSQL is a fully featured object-relational database management system.

PostgreSQL Database Server Configuration in Debian

It supports a large part of the SQL standard and is designed to be extensible by users in many aspects. Some of the features are: ACID transactions, foreign keys, views, sequences, subqueries, triggers, user-defined types and functions, outer joins, multiversion concurrency control. Graphical user interfaces and bindings for many programming languages are available as well. Postgresql Database Installation in Debian If you want to install the PostgreSQL base system as well as a textual clientrun the following command from your shell #apt-get install postgresql postgresql-client This will install a lot of package dependencies as well. A few questions will be asked by the configuration script. Data directory All database data will be kept in /var/lib/postgres/data by default. Data removal policy Also by default, a PostgreSQL system removal won't remove the data (database contents). Creating Users for your Database. Learning the shell.

Why do you need to learn the command line anyway?

Learning the shell.

Well, let me tell you a story. Many years ago we had a problem where I worked. There was a shared drive on one of our file servers that kept getting full. I won't mention that this legacy operating system did not support user quotas; that's another story. But the server kept getting full and it stopped people from working. Du -s * | sort -nr > $HOME/user_space_report.txt Graphical user interfaces (GUIs) are helpful for many tasks, but they are not good for all tasks.

I once heard an author say that when you are a child you use a computer by looking at the pictures. Vi Cheat Sheet. Basic vi Commands. What is vi?

Basic vi Commands

The default editor that comes with the UNIX operating system is called vi (visual editor). [Alternate editors for UNIX environments include pico and emacs, a product of GNU.] The UNIX vi editor is a full screen editor and has two modes of operation: Command mode commands which cause action to be taken on the file, and Insert mode in which entered text is inserted into the file. In the command mode, every character typed is a command that does something to the text file being edited; a character typed in the command mode may even cause the vi editor to enter the insert mode. In the insert mode, every character typed is added to the text in the file; pressing the <Esc> (Escape) key turns off the Insert mode. While there are a number of vi commands, just a handful of these is usually sufficient for beginning vi users.

NOTE: Both UNIX and vi are case-sensitive. To Get Into and Out Of vi To Start vi To use vi on a file, type in vi filename. To Exit vi Moving the Cursor Changing Text. Linux Commands - A practical reference. Creating, copying, moving, and removing directories in Linux. Linux Directory Structure (File System Structure) Explained with Examples.

By Ramesh Natarajan on September 8, 2010 Have you wondered why certain programs are located under /bin, or /sbin, or /usr/bin, or /usr/sbin?

Linux Directory Structure (File System Structure) Explained with Examples

For example, less command is located under /usr/bin directory. Why not /bin, or /sbin, or /usr/sbin? What is the different between all these directories? In this article, let us review the Linux filesystem structures and understand the meaning of individual high-level directories. 1. / – Root Every single file and directory starts from the root directory.Only root user has write privilege under this directory.Please note that /root is root user’s home directory, which is not same as /. 2. Contains binary executables.Common linux commands you need to use in single-user modes are located under this directory.Commands used by all the users of the system are located here.For example: ps, ls, ping, grep, cp. 3. 4. 5. Contains device files.These include terminal devices, usb, or any device attached to the system.For example: /dev/tty1, /dev/usbmon0. Linux's directory structure.