Workbook on Digital Private Papers > Setting up the Paradigm Digital Repository
Installing - PostgreSQL and phpPgAdmin
From the Desktop
Start up YaST. (Do this by clicking the SUSE toolbar's "Start" button (the green button with the smiling gecko) => System menu => Control Center (YaST):
The YaST dialog opens telling you that you need to enter root's password before you can continue.
Enter the root password.
In the YaST window that opens, click the Software icon in the left menu and then the Software Management icon to the right.
YaST takes a moment to inventory what you already have installed and what you can install. Then it opens a window with a search dialog. Search for PostgreSQL; select the components you want to install and select Accept:
Yast will automatically include any necessary packages - select Continue.
YaST updates the system configuration files. Select Finish when this is done.
Starting the PostgreSQL Service
We want PostgreSQL to start up when we boot. To enable this, click the System icon in the left pane of the YaST window. Then click the System Service (Runlevel) in the right pane.
Select the Expert mode radio button at the top of the dialog.
Scroll through the list of Services to find the PostgreSQL service entry.
Under the Set/Reset dropdown in the lower-right corner, choose Enable the Service.
This should automatically select the appropriate runlevels to use when starting the service.
Under the Start/Stop/Refresh dropdown, select Start now ...
The PostgreSQL service will start. Select OK to continue.
Click Finish.
Save the changes.
We are returned to the YaST Control Center Main panel.
Installing phpPgAdmin
- Extract the release to the webserver document root.
- Rename the directory to phpPgAdmin
- There are a couple of configuration activities to be performed before we can login via phpPgAdmin
- 1. Assign a password to the default admin user postgres
pserver1:/srv/www/htdocs # su - postgres
postgres@pserver1:~> psql template1
Welcome to psql 8.0.3, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
template1=# ALTER USER postgres WITH PASSWORD 'topsecret';
ALTER USER
template1=#\q
postgres@pserver1:~> exit
pserver1:/srv/www/htdocs #
- 2. Enable password authentication for PostgreSQL connections
To do this we will need to edit a PostgreSQL configuration file /var/lib/pgsql/data/pg_hba.conf
Comment out the existing authentication by ident entries - placing a # at the beginning of the lines then add the following lines to the file:
# Allow any user on the local system to connect to any database under
# any user name using local loopback TCP/IP connections authenticated
# by password
#
# TYPE DATABASE USER CIDR-ADDRESS METHOD
host all all 127.0.0.1/32 md5
postgres@pserver1:~/data>
To test our PostgreSQL installation we are going to install phpPgAdmin. There isn't an official SUSE RPM distribution yet so we will have to manually obtain and install phpPgAdmin ( from http://phppgadmin.sourceforge.net) .
We will download the tar.gz version of the distribution.
paradigm@pserver1:~> cd /srv/www/htdocs
paradigm@pserver1:/srv/www/htdocs> su
Password:
pserver1:/srv/www/htdocs # tar xzf ~paradigm/downloaf/phpPgAdmin-4.0.1.tar.gz
pserver1:/srv/www/htdocs # mv phpPgAdmin-4.0.1 phpPgAdmin
Access Run Command . (Do this by clicking the SUSE toolbar's "Start" button (the green button with the smiling gecko) => Run Command:
Select Options.
Select Run as a different user put in the root password
Enter command kate /var/lib/pgsql/data/pg_hba.conf
and select Run.
The PostgreSQL Client Authentication Configuration File should appear in the editor window
Scroll down to the lines containing the ident sameuser entries
Comment out the three lines by placing a # as the first character of the line.
Add the following:
# Allow any user on the local system to connect to any database under
# any user name using local loopback TCP/IP connections authenticated
# by password
#
host all all 127.0.0.1/32 md5
Save the file click on the Save icon.
Quit the editor select Quit from the File menu.
Back in the terminal window type in pg_ctl reload and press return to tell PostgreSQL we have modified a configuration file.
Test our changes by entering psql template1. An error message should be returned as no local entries remain in the configuration file.
We need to explicitly tell PostgreSQL the we want to connect via TCP/IP by entering
psql -h localhost template1
and supplying the "topsecret" password we chose for postgres earlier.
Enter \q to leave the PostgreSQL command line interface. We should now be able to access PostgreSQL via the web-based interface.
Testing PostgreSQL
Now we have installed phpPgAdmin and configured PostgreSQL, we can test your PostgreSQL installation by going to http://localhost/phpPgAdmin/. With Linux, URLs are case sensitive so it is important to capitalise the "P" and the "A" in phpPgAdmin or you'll get an error. Click on Servers to start the login process.
Login as postgres the default PostgreSQL system administrator.
Success! We are able to login and can administer the system.
The Users tab provides access to the User management functionality.
Previous section <<
Install MySQL
Next section >> Install Java



