Installing a private PostgreSQL instance on WebFaction
Installing a private PostgreSQL instance on WebFaction
Yet another actionable, practical, to-the-point, and screencapture-heavy TinyBooks@BriefNotes.net publication that explains all the important stuff in 10 chapters or less.
About the Book
There is no "Introduction", no "Preface", no "About the Author", nor other fluff to be found in the book.
Instead, the first page is the Overview, which reads:
This tinybooks.briefnotes.net publication explains in fair detail the following steps to install a private instance of PostgreSQL on WebFaction. The procedures are based in part on the official PostgreSQL Installation Procedure:
- Create a WebFaction custom app in order to reserve a port number which allows you to communicate with a running instance of your installed PostgreSQL.
- Update the file .bash_profile to have the PATH environment variable point at the to-be-installed PostgreSQL's bin directory.
- Copy the download link of the compressed file containing the version of PostgreSQL that you wish to install.
- Download the compressed file from Chapter 3 to WebFaction and extract its contents.
- Install PostgreSQL with configure, make & make install.
- Create and initialize a data directory to hold the PostgreSQL database storage files and logfile.
- Start up the PostgreSQL server and monitor its status.
- Create a default database named after your WebFaction username.
- Run some simple database tests.
- Learn how to shut down the database.
Table of Contents
- Overview
-
1. Create a WebFaction custom app
- 1.1 Add a new application
- 1.2 Enter these values for the new custom application
- 1.3 Write down the assigned port number
-
2. Update
PATH
in.bash_profile
to point at the to-be-installed PostgreSQLbin
directory-
2.1 Code to be inserted into
~/.bash_profile
-
2.2 Example using
nano
editor
-
2.1 Code to be inserted into
-
3. Obtain the download link for PostgreSQL software
- 3.1 Go to File Browser @ postgresql.org in your browser
- 3.2 Copy the PostgreSQL download link
- 4. Download PostgreSQL to WebFaction
-
5. Install PostgreSQL
-
5.1 Run the
configure
command -
5.2 Run the
make
command -
5.3 Run the
make install
command - 5.4 PostgreSQL software installation is now complete
-
5.1 Run the
-
6. Create and initialize a PostgreSQL data directory
- 6.1 Create the data directory
- 6.2 Initialize the data directory with PostgreSQL data files and sub-folders
-
6.3 Optional: Find out the location of the data directory with
psql
commandshow data_directory
-
7. Start up PostgreSQL, and find out if PostgreSQL is running
-
7.1
pg_ctl start
-
7.2
pg_ctl status
-
7.3
top
-
7.1
- 8. Create a database that is named after your WebFaction username
- 9. Run some simple database tests
-
10. Shut down PostgreSQL, and find out if PostgreSQL has successfully stopped running
-
10.1
pg_ctl stop
-
10.2
pg_ctl status
-
10.3
top
-
10.1
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them