Date: Mon, 23 Jul 2012 19:15:11 +0000 From: tzabal@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r239702 - soc2012/tzabal/server-side/akcrs-setup Message-ID: <20120723191511.A67D5106564A@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tzabal Date: Mon Jul 23 19:15:10 2012 New Revision: 239702 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=239702 Log: Add the steps required for PostgreSQL and the lxml module regarding Python. Modified: soc2012/tzabal/server-side/akcrs-setup/database.sql soc2012/tzabal/server-side/akcrs-setup/setup Modified: soc2012/tzabal/server-side/akcrs-setup/database.sql ============================================================================== --- soc2012/tzabal/server-side/akcrs-setup/database.sql Mon Jul 23 17:47:04 2012 (r239701) +++ soc2012/tzabal/server-side/akcrs-setup/database.sql Mon Jul 23 19:15:10 2012 (r239702) @@ -10,7 +10,7 @@ CREATE TABLE Submitters ( - id integer, + id SERIAL, email varchar(254) NOT NULL, passwd varchar(12) NOT NULL, @@ -20,7 +20,7 @@ CREATE TABLE Bugs ( - id integer, + id SERIAL, state varchar(10) NOT NULL, reported integer NOT NULL, @@ -30,7 +30,7 @@ CREATE TABLE Reports ( - id integer, + id SERIAL, bug_id integer NOT NULL, submitter_id integer NOT NULL, received_date date DEFAULT CURRENT_DATE, Modified: soc2012/tzabal/server-side/akcrs-setup/setup ============================================================================== --- soc2012/tzabal/server-side/akcrs-setup/setup Mon Jul 23 17:47:04 2012 (r239701) +++ soc2012/tzabal/server-side/akcrs-setup/setup Mon Jul 23 19:15:10 2012 (r239702) @@ -69,7 +69,29 @@ ########################################################### # Part 3. PostgreSQL ########################################################### +# Install the default version of PostgreSQL server currently used in FreeBSD (PostgreSQL Server 9.0.8) +cd /usr/ports/databases/postgresql90-server +make config +make install clean +# Run the PostgreSQL Server at startup +echo 'postgresql_enable="YES"' >> /etc/rc.conf + +# Initialize the PostgreSQL database cluster for the first time. +# This command creates the initial database cluster in the /usr/local/pgsql/data directory by default +/usr/local/etc/rc.d/postgresql initdb + +# Start the database server +/usr/local/etc/rc.d/postgresql start + +# Swith to the (system) user that owns the PostgreSQL Server (or remain as root) +su pgsql + +# Create a new PostgreSQL user (role) that will NOT be superuser, create databases and create roles +createuser -P akcrs + +# Create a Unicode database that our PostgreSQL user will has access to +/usr/local/bin/createdb akcrs_db -O akcrs --encoding=UNICODE ########################################################### @@ -78,4 +100,10 @@ # Install Python (default: python 2.7.3) cd /usr/ports/lang/python -make -DBATCH install clean \ No newline at end of file +make -DBATCH install clean + +# Install the module psycopg2 (DB API 2.0 driver of PostgreSQL for Python) +easy_install psycopg2 + +# Install the module lxml (Library for processing XML and HTML in Python) +easy_install lxml \ No newline at end of file
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120723191511.A67D5106564A>