<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; postgresql</title> <atom:link href="http://www.ghacks.net/tag/postgresql/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 09:52:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Create and manage databases in Linux with Glom</title><link>http://www.ghacks.net/2009/11/25/create-and-manage-datases-in-linux-with-glom/</link> <comments>http://www.ghacks.net/2009/11/25/create-and-manage-datases-in-linux-with-glom/#comments</comments> <pubDate>Wed, 25 Nov 2009 20:41:38 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[database]]></category> <category><![CDATA[database administration]]></category> <category><![CDATA[db]]></category> <category><![CDATA[postgresql]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=20630</guid> <description><![CDATA[If you&#8217;ve ever had to work with a database in Linux you most likely are aware of three or four tools that can handle the task: MySQL, PostgreSQL, PhpMyAdmin, and OpenOffice Base. These are all outstanding applications, but the first two are complex command-line only tools, the third requires a web server, and the last [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve ever had to work with a database in Linux you most likely are aware of three or four tools that can handle the task: MySQL, PostgreSQL, PhpMyAdmin, and OpenOffice Base. These are all outstanding applications, but the first two are complex command-line only tools, the third requires a web server, and the last isn&#8217;t as robust as some admins will need. But there is another tool that is very flexible and makes creating databases a simple task.</p><p><a
title="Glom" href="http://www.glom.org/wiki/index.php?title=Main_Page" target="_blank">Glom </a>can help you design and create databases as well as a user-interfaces with little to know coding or command line skills. Glom has an easy to use GUI that focuses on helping you get your job done instead of being an hindrance. Glom uses the PostgreSQL database as a backend, but can only edit databases created internally. In other words, all of those databases you created with PostgreSQL&#8230;Glom can not touch them. That is fine, because Glom is very good at creating and managing your databases.</p><p>In this tutorial you will learn how to install and get started using Glom.</p><p><span
id="more-20630"></span><strong>Installation</strong></p><p>If you point your browser to the <a
title="Glom Download Page" href="http://www.glom.org/wiki/index.php?title=Download" target="_blank">Glom Download Page</a> you will see fairly concise instructions on how to install Glom on your distribution. You might notice the warning that the default Ubuntu repository holds an out of date, buggy version of Glom. I installed Glom onto Ubuntu 9.10, using the Ubuntu Software Center (without having to add any extra repositories). The version that installed was 1.12.2. The latest source code available for Glom is 1.12. So this warning is most likely unnecessary for Karmic Koala users.</p><p>Once you have Glom installed you will find the menu entry located in the Office sub-menu of the Applications menu.</p><p>NOTE: There is a version of Glom for Windows.</p><p><strong>Using Glom</strong></p><div
id="attachment_20632" class="wp-caption alignleft" style="width: 186px"><a
rel="attachment wp-att-20632" href="http://www.ghacks.net/2009/11/25/create-and-manage-datases-in-linux-with-glom/glom_new/"><img
class="size-full wp-image-20632  " src="http://www.ghacks.net/wp-content/uploads/2009/11/glom_new.png" alt="Create New" width="176" height="125" /></a><p
class="wp-caption-text">Create New</p></div><p>When you first fire up Glom a small window will open (see Figure 1). From that window click on the Create New Document tab. In this tab select New Empty Document and then click the Select button. The next step needs you to input two pieces of information:</p><ul><li>Name: This will serve as the actual file name.</li><li>Title: A human-readable name for your database.</li></ul><p>In this same window you can select an option that will save this database to a database server, or to save it locally. If you go with the former, you will have to input the details of the server in a separate step.  After you have all of your information configured, click the Save button to continue. Depending upon the speed of your machine, the database initiation phase can take some time. But once the database is initiated, a new window will open (see Figure 2) where you can begin to create tables for your database. When you are working with your database there are two user levels (selected from the User Level menu):</p><ul><li>Developer: This is the level you use to create/edit your databases.</li><li>Operator: This is the level you use to work with your databases.</li></ul><div
id="attachment_20634" class="wp-caption alignright" style="width: 168px"><a
rel="attachment wp-att-20634" href="http://www.ghacks.net/2009/11/25/create-and-manage-datases-in-linux-with-glom/glom_add_tables/"><img
class="size-full wp-image-20634  " src="http://www.ghacks.net/wp-content/uploads/2009/11/glom_add_tables.png" alt="Figure 2" width="158" height="160" /></a><p
class="wp-caption-text">Figure 2</p></div><p>To create a table click on the Add button which will create a new line for a table. You have to name the table, so double click on the first column of your new table and enter a name. When you do that hit enter and you will see that the Title will auto-fill for you. You can also select if this table is to be hidden and/or default by selecting the check box for either option.</p><p>After you have created the tables the Glom window will change to the data entry mode. For each table you have created you will have to enter data in order to fill the tables. Adding data is done the same way as adding a table. The difference is that you have to select which table you want to add data to from the Tables menu in the toolbar.</p><div
id="attachment_20635" class="wp-caption alignleft" style="width: 190px"><a
rel="attachment wp-att-20635" href="http://www.ghacks.net/2009/11/25/create-and-manage-datases-in-linux-with-glom/glom_data/"><img
class="size-medium wp-image-20635  " src="http://www.ghacks.net/wp-content/uploads/2009/11/glom_data-500x383.png" alt="Figure 3" width="180" height="138" /></a><p
class="wp-caption-text">Figure 3</p></div><p>After you have entered your data, you can then switch to the Details view (see Figure 3) where you can view data, add static items and containers to a record. You can also create new Fields to add to your data. These will come in handy as they can add data to a user entry such as their birthday.</p><p>To create a custom field go to the Developer menu and select Fields. From this window you can add, edit, and delete all of the fields you need.</p><p>After you have completed creating your database, go to the User Level menu, select Operator, and start working with your new database.</p><p><strong>Final thoughts</strong></p><p>Although this tutorial only scratches the surface of the power Glom offers, you get the idea that this tool could really make a database developers job very easy. Give Glom a try, you will look at PostgreSQL databases in a completely different light.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/11/25/create-and-manage-datases-in-linux-with-glom/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Set up a Gnumed backend server</title><link>http://www.ghacks.net/2009/11/10/set-up-a-gnumed-backend-server/</link> <comments>http://www.ghacks.net/2009/11/10/set-up-a-gnumed-backend-server/#comments</comments> <pubDate>Tue, 10 Nov 2009 19:25:50 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[backend server]]></category> <category><![CDATA[gnumed]]></category> <category><![CDATA[medical practice server]]></category> <category><![CDATA[medical software]]></category> <category><![CDATA[postgresql]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=18370</guid> <description><![CDATA[Recently I covered the front-end of the Gnumed software designed for the medical industry (see &#8220;Let your medical practice go open source with Gnumed.&#8221;) In that article I showed you how to start working with Gnumed, but limited the installation to using the public servers. Because these public servers can not safely and securely hold [...]]]></description> <content:encoded><![CDATA[<p>Recently I covered the front-end of the Gnumed software designed for the medical industry (see &#8220;<a
title="Let your medical practice go open source with Gnumed" href="http://www.ghacks.net/2009/10/20/let-your-medical-practice-go-open-source-with-gnumed/" target="_blank">Let your medical practice go open source with Gnumed</a>.&#8221;) In that article I showed you how to start working with Gnumed, but limited the installation to using the public servers. Because these public servers can not safely and securely hold patient data, it is necessary to be able to set up your own backend server for this purpose. That is where this tutorial comes in.</p><p>In this article you will learn how to install everything you need to get your Gnumed front end connected to a locally hosted Gnumed backend server. I will be illustrating this on Ubuntu 9.10 with the end result being a local-only installation. Of course the necessary modifications to make this a LAN-based installation shouldn&#8217;t be difficult for you, once you have the local install up and running.</p><p><span
id="more-18370"></span>This article comes a good time because this month it was just announced that new versions of Gnumed will include both medication management and prescription handling as well it was announced (on the <a
title="Gnumed on Blogspot" href="http://gnumed.blogspot.com/" target="_blank">Gnumed Blog</a>) that a company is working on a billing feature for inclusion in a future release of Gnumed. That is certainly good news.</p><p>But, for now, let&#8217;s get on with the server installation.</p><p>Before we continue, make sure you have a working installation of PostgreSQL up and running. For more information on this take a look at my article &#8220;<a
title="Basic postgresql server setup" href="http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/" target="_blank">Basic postgresql server setup</a>.&#8221;</p><p>Once you have PostgreSQL up and running you are ready to go.</p><p><strong>Installing the backend</strong></p><p>Go do the Gnumed server download mirror page and download the <em>gnumed-server</em> deb file (just click on a mirror). Once that file is downloaded open up a terminal window, cd to the directory you saved the file to, and issue the command:</p><p><em>sudo dpkg -i gnumed-server*</em></p><p>which will install the server.</p><p>As soon as the server is installed you have to create the databases used by Gnumed. Fortunately the Gnumed server package includes a simple command for this. From your terminal window issue the command:</p><p><em>sudo gm-bootstrap_server</em></p><p>This command will take some time to run its course. And, in the end, it might seem like you have some errors. These errors most likely mention a password &#8211; it is safe to ignore those errors.</p><p><strong>Configuration</strong></p><p>There are only two configurations you have to take care of. The first is to copy the proper .conf file into the <strong>~/.gnumed</strong> directory. The file you want to copy will be <strong>/etc/gnumed/gnumed-client.conf</strong>. Copy that with the command:</p><p><em>sudo cp /etc/gnumed/gnumed-client.conf ~/.gnumed</em></p><p>You really only need to make one change in that file. Look for this section beginning with:</p><p><em>[profile local GNUmed database]</em></p><p><em>host =</em></p><p>You want to change the <em>host = </em>line to reflect:</p><p><em>host = localhost</em></p><p>Now you need to make a change to a PostgreSQL file. The file in question is <strong>/etc/postgres/8.4/main/pg_hba.conf</strong>. You have to add a section to a very specific section of this file. Look for this line:</p><p><em># TYPE  DATABASE    USER    CIDR-ADDRESS    METHOD</em></p><p>Underneath that line you need to add:</p><p><em>local   samegroup   +gm-logins   md5</em></p><p>Once you have added that, save the file, and restart PostgreSQL with the command:</p><p><em>sudo /etc/init.d/postgresql-8.4 restart</em></p><p><strong>Log in</strong></p><p>Now it&#8217;s time to start up Gnumed and log in to your local server. When you start you will want the following login information:</p><ul><li><span
style="background-color: #ffffff">Backend: local Gnumed database</span></li><li><span
style="background-color: #ffffff">Username: any-doc</span></li><li><span
style="background-color: #ffffff">Password: any-doc</span></li></ul><p>Hit the OK button to begin the login process. You will have to walk through a couple of windows (such as the language mismatch settings). But after that you will up and running with your own Gnumed backend server.</p><p><strong>Final thoughts</strong></p><p>It would behoove anyone medical practitioner looking to cut some corners (and wanting to take care of their own tech) to deploy Gnumed. And with the upcoming features, Gnumed is an outstanding solution.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/11/10/set-up-a-gnumed-backend-server/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Basic postgresql server setup</title><link>http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/</link> <comments>http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/#comments</comments> <pubDate>Mon, 09 Nov 2009 23:09:50 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[database]]></category> <category><![CDATA[database user]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[postgresql]]></category> <category><![CDATA[ubuntu server]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=18345</guid> <description><![CDATA[So many tool require databases. If you are a web administrator or a company with large stores of information, then you know the importance of databases. One of the most oft-used databases available is MySQL. But that is not the only player on the court. Another cross platform object-relational database management tool is PostgreSQL. Many [...]]]></description> <content:encoded><![CDATA[<p>So many tool require databases. If you are a web administrator or a company with large stores of information, then you know the importance of databases. One of the most oft-used databases available is MySQL. But that is not the only player on the court. Another cross platform object-relational database management tool is <a
title="PostgreSQL" href="http://www.postgresql.org/" target="_blank">PostgreSQL</a>. Many people refer to PostgreSQL as the Oracle of the open source world. That is because PostgreSQL is dense with features but not as fast as MySQL. And where MySQL is a simple to use database management tool, PostgreSQL is often seen as overly complicated.</p><p>Of course there are variations on that opinion. But that is neither here nor there. The purpose of this tutorial is to help you get a PostgreSQL server up and running quickly and easily. To make this simple we will make this a part of our Ubuntu Server series, so all you have to do is have your Ubuntu Server up and running (see my article &#8220;<a
title="Installing Ubuntu Server 9.04" href="http://www.ghacks.net/2009/09/03/installing-ubuntu-server-9-04/" target="_blank">Installing Ubuntu Server 9.04</a>&#8221; to get started.) Once you have that server up and running you are ready to get your PostgreSQL server up.</p><p><span
id="more-18345"></span><strong>Installation</strong></p><p>The first thing you need to do is to install the necessary software. Since this is Ubuntu, it&#8217;s quite easy. Open up a terminal window and issue the command:</p><p><em>sudo apt-get install postgresql</em></p><p>Once the software is installed you are ready to set it all up.</p><p><strong>Change the default user password</strong></p><p>One of the first steps you want to take is to change the default password for the user postgres. Sine we are using Ubuntu you will have to use the sudo command to change to the postgres user like so:</p><p><em>sudo su &#8211; postgres</em></p><p>You will have to enter your sudo password after which you will now be issuing commands as the user postgres. The next step is to gain access to the postgresql command prompt with the command:</p><p><em>psql</em></p><p>Your new command prompt will look like:</p><p><em>postgres=#</em></p><p>NOTE: The only user that can open the PostgreSQL prompt without defining a database to work with is the user postgres. Other users would have to gain access to the command prompt with a command like:</p><p><em>psql DB_NAME</em></p><p>Where <em>DB_NAME </em>is the name of an existing database.</p><p>Changing the password is as simple as issuing the command:</p><p><em>\password postgres</em></p><p>You will then be asked to enter a password and then verify that password.</p><p>Your default password has not been changed. You can exit from the PostgreSQL prompt by issuing the command:</p><p><em>\q</em></p><p><strong>Create a database</strong></p><p>Now, while still logged in as the postgres user, let&#8217;s create a database. For this you do not have to be logged into the PostgreSQL command prompt. Instead just issue the command:</p><p><em>createdb testdb</em></p><p>Where <em>testdb</em> is the name of the database you want to create. To check to make sure that database was created go back to the PostgreSQL command prompt (remember, the command <em>psql</em>) and enter:</p><p><em>\l</em></p><p>You should see a listing for your new database like:</p><p><code>testdb | postgres | UTF8 | en_US.UTF-8  | en_US.UTF-8</code></p><p>Once again, log out of the PostgreSQL command prompt with the command:</p><p><em>\q</em></p><p><strong>Create a user</strong></p><p>By default, the only user that can connect to a database is the postgres user. This will be of no help when you need to connect with another user. To create a new user (that can connect to databases) you would issue the command (as the user <em>postgres</em>):</p><p><em>createuser &#8211;superuser USERNAME</em></p><p>Where <em>USERNAME </em>is the name of the user you want to create.</p><p><strong>Final thoughts</strong></p><p>Now you should have a basic PostgreSQL installation with a test database and a user, besides postgres, that can work with the tools. Next time we work with PostgreSQL we&#8217;ll discuss more challenging issues with this outstanding database tool.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
