CS 491/591 Linux Administration and Security PostgreSQL (database) Installation Installation Configuration Configuration Basic Security Basic Security.

Slides:



Advertisements
Similar presentations
SQL (Structured Query Language) X/OPEN Call Level Interface For SQL ODBC (Open DataBase Connectivity) API JDBC (Java DataBase Connectivity) API SQL (Structured.
Advertisements

Software Frameworks for Acquisition and Control European PhD – 2009 Horácio Fernandes.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
APNEE-TU DATABASES Instalation Problems Solutions.
Oracle SQL*plus John Ortiz. Lecture 10SQL: Overview2 Overview  SQL: Structured Query Language, pronounced S. Q. L. or sequel.  A standard language for.
Apache : Installation, Configuration, Basic Security Presented by, Sandeep K Thopucherela, ECE Department.
© 2010 VMware Inc. All rights reserved VMware ESX and ESXi Module 3.
Confidential ODBC May 7, Features What is ODBC? Why Create an ODBC Driver for Rochade? How do we Expose Rochade as Relational Transformation.
Access The L Line The Express Line to Learning 2007 L Line L © Wiley Publishing All Rights Reserved.
UNIT - III. Installing Samba Windows uses Sever Message Block(SMB) to communicate with each other using sharing services like file and printer. Samba.
ODBC Open DataBase Connectivity a standard database access method developed by Microsoft to access data from any application regardless of which database.
2440: 141 Web Site Administration Remote Web Server Access Tools Instructor: Enoch E. Damson.
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Linux Operations and Administration
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 24 – Web Servers (PWS, IIS, Apache, Jigsaw) Outline 24.1Introduction 24.2Microsoft Personal.
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
September 6, 2015 Connecting Client Applications to Informix Databases using IBM Informix Connect and ODBC James Edmiston Database Consultant Quest Information.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
Copyright ®xSpring Pte Ltd, All rights reserved Versions DateVersionDescriptionAuthor May First version. Modified from Enterprise edition.NBL.
Chapter Fourteen Windows XP Professional Fault Tolerance.
Fundamentals of Database Chapter 7 Database Technologies.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building Assignment.
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building.
SUSE Linux Enterprise Desktop Administration Chapter 6 Manage Software.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
Partner Logo German Cancio – WP4-install LCFG HOW-TO - n° 1 LCFGng configuration examples Updated 10/2002
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 13 FTP and Telnet.
ABSTRACT The JDBC (Java Database Connectivity) API is the industry standard for database- independent connectivity between the Java programming language.
Networking in Linux. ♦ Introduction A computer network is defined as a number of systems that are connected to each other and exchange information across.
Lab 5: Building PostgreSQL Server from Source Code and Modifying Source Code.
PostgreSQL Installation By: Keerthi Nelaturu Previous version by Ahmed Jeddah & Miguel Garzon.
Linux Services Configuration
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
JSP Server Integrated with Oracle8i Project2, CMSC691X Summer02 Ching-li Peng Ying Zhang.
1 Chapter Overview What is Microsoft SQL Server 2000? What are the SQL Server 2000 Components? What is the Relational Database Architecture? What is the.
DATA BASE ADMINISTRING DATABASE SERVICES IN RED HAT LINUX.
WEB SERVER SOFTWARE FEATURE SETS
Basics of JDBC Session 14.
Linux Operations and Administration
Remote Access Usages. Remote Desktop Remote desktop technology makes it possible to view another computer's desktop on your computer. This means you can.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop I Introduction to Linux Professional Training Academy.
What is PostgreSQL? Object-relational database management system (ORDBMS) Based on POSTGRES at Berkeley Computer Science Department. Sponsored by the Defense.
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
LINUX Presented By Parvathy Subramanian. April 23, 2008LINUX, By Parvathy Subramanian2 Agenda ► Introduction ► Standard design for security systems ►
Intro to JDBC Joseph Sant Applied Computing and Engineering Sciences Sheridan ITAL.
CACI Proprietary Information | Date 1 PD² SR13 Client Upgrade Name: Semarria Rosemond Title: Systems Analyst, Lead Date: December 8, 2011.
Maintaining and Updating Windows Server 2008 Lesson 8.
CACI Proprietary Information | Date 1 PD² v4.2 Increment 2 SR13 and FPDS Engine v3.5 Database Upgrade Name: Semarria Rosemond Title: Systems Analyst, Lead.
C Copyright © 2006, Oracle. All rights reserved. Oracle Secure Backup Additional Installation Topics.
Open source IP Address Management Software Review
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
Scientific Linux Inventory Project (SLIP) Troy Dawson Connie Sieh.
Fundamental of Databases
VMware ESX and ESXi Module 3.
PGT(CS) ,KV JHAGRAKHAND
Relational database and SQL MySQL LAMP SQL queries
SQL Queries Relational database and SQL MySQL LAMP SQL queries
Managing Software.
Installation, Configuration, Examples of use
Cloud based Open Source Backup/Restore Tool
DHCP, DNS, Client Connection, Assignment 1 1.3
Chapter 8 Working with Databases and MySQL
Chapter 2: The Linux System Part 1
Tiers vs. Layers.
ODBC and JDBC.
Presentation transcript:

CS 491/591 Linux Administration and Security PostgreSQL (database) Installation Installation Configuration Configuration Basic Security Basic Security Gulsen Gulsen

What is PostgreSQL? PostgreSQL is an Object-Relational Database Management System (ORDBMS) that has been developed in various forms since It’s an open source project. It means that you can obtain the source code, use the program, and modify it freely without the confines of proprietary software.

PostgreSQL provides a wealth of features that are usually only found in commercial databases such as Oracle. The following is a brief listing of some of these core features: It supports user-defined operators, functions, access methods, and data types. It supports user-defined operators, functions, access methods, and data types. It supports the core SQL99 specification. It supports the core SQL99 specification. It supports referential integrity, which is used to insure the validity of a database's data. It supports referential integrity, which is used to insure the validity of a database's data. The flexibility of the PostgreSQL API has allowed vendors to provide development support easily for the PostgreSQL RDBMS. These interfaces include Object Pascal, Python, Perl, PHP, ODBC, Java/JDBC, Ruby, TCL, C/C++, and Pike. The flexibility of the PostgreSQL API has allowed vendors to provide development support easily for the PostgreSQL RDBMS. These interfaces include Object Pascal, Python, Perl, PHP, ODBC, Java/JDBC, Ruby, TCL, C/C++, and Pike.

Conti…. It uses a process-per-user client/server architecture. It uses a process-per-user client/server architecture. The PostgreSQL feature known as Write Ahead Logging increases the reliability of the database by logging changes before they are written to the database. This ensures that, in the unlikely occurrence of a database crash, there will be a record of transactions from which to restore. This can be greatly beneficial in the event of a crash, as any changes that were not written to the database can be recovered by using the data that was previously logged. Once the system is restored, a user can then continue to work from the point that they were at before the crash occurred. The PostgreSQL feature known as Write Ahead Logging increases the reliability of the database by logging changes before they are written to the database. This ensures that, in the unlikely occurrence of a database crash, there will be a record of transactions from which to restore. This can be greatly beneficial in the event of a crash, as any changes that were not written to the database can be recovered by using the data that was previously logged. Once the system is restored, a user can then continue to work from the point that they were at before the crash occurred.

PostgreSQL Installation First, you can check if you have PostgreSQL database server already installed. Type the following command in your terminal. rpm -qa | grep postgresql If you get postgresql x or something alike when the command is executed, it means that you already have PostgreSQL database software installed.

Conti… If you don't have PostgreSQL installed, you will need to download PostgreSQL from binary RPM distribution from or its mirror sites. You can download the latest version of PostgreSQL from the following address: ftp://ftp3.us.postgresql.org/pub/postgr esql/binary/v8.0.3/linux/rpms/

Conti… You will need to install postgresql-libs first. If you want to run server, install postgresql - server and postgresql -rpms. The other packages are for developing applications, docs, tcl, perl, etc support. Run the following commands to install: rpm -ivh postgresql-libs PGDG.i686.rpm rpm -ivh postgresql-server PGDG.i686.rpm rpm -ivh postgresql PGDG.i686.rpm

PostgreSQL Configuration First check whether PostgreSQL is running: "/etc/rc.d/init.d/postgresql status” you should get some information back saying that is it running like this "postmaster (pid ) is running...” First check whether PostgreSQL is running: "/etc/rc.d/init.d/postgresql status” you should get some information back saying that is it running like this "postmaster (pid ) is running...” The user "postgres" should have already been configured by the installation of the RPMs. A password will be missing. So, we need to assign a password for user postgres: “passwd postgres” The user "postgres" should have already been configured by the installation of the RPMs. A password will be missing. So, we need to assign a password for user postgres: “passwd postgres”

Conti… Login as a user postgres: “su –postgres” Login as a user postgres: “su –postgres” This will execute the profile: “/var/lib/pgsql/.bash_profile ” This will execute the profile: “/var/lib/pgsql/.bash_profile ” To initialize PostgreSQL database server: To initialize PostgreSQL database server: “initdb --pgdata=/var/lib/pgsql/data” “initdb --pgdata=/var/lib/pgsql/data” This creates a bunch of directories, a template directory and sets up the postgres configuration in the user directory “/var/lib/pgsql/” This creates a bunch of directories, a template directory and sets up the postgres configuration in the user directory “/var/lib/pgsql/” To start the database server. As root: To start the database server. As root: “service postgresql start” or “/etc/rc.d/init.d/postgresql start” “service postgresql start” or “/etc/rc.d/init.d/postgresql start”

Conti… To create a database: “createdb magic” To create a database: “createdb magic” To connect to database: “psql magic” To connect to database: “psql magic” Now, you will be at the PostgreSQL command line prompt: Now, you will be at the PostgreSQL command line prompt: psql magic psql magic Welcome to psql, the PostgreSQL interactive terminal. Welcome to psql, the PostgreSQL interactive terminal. Type: \copyright for distribution terms Type: \copyright for distribution terms \h for help with SQL commands \h for help with SQL commands \? for help on internal slash commands \? for help on internal slash commands \g or terminate with semicolon to execute query \g or terminate with semicolon to execute query \q to quit \q to quit magic=# magic=#

Basic Network and Security Configuration To allow PostgreSQL to accept TCP/IP connections from the JDBC driver: To allow PostgreSQL to accept TCP/IP connections from the JDBC driver: “/var/lib/pgsql/data/postgresql.conf” “/var/lib/pgsql/data/postgresql.conf” change “tcpip_socket=false” to “tcpip_socket=true” change “tcpip_socket=false” to “tcpip_socket=true” PostgreSQL allows anyone from the local machine to connect to the databases PostgreSQL allows anyone from the local machine to connect to the databases without a password challenge. So, if other users are using your computer without a password challenge. So, if other users are using your computer

Conti… “/var/lib/pgsql/data/pg_hba.conf ” go to the end of the file, and change the authorization end of the file, and change the authorization checks from “trust” to “password” checks from “trust” to “password” Start server again: Start server again: “service postgresql start” “service postgresql start”