Tech news
at TheJemReport.com
Software reviews
at SoftwareinReview.com
Hardware reviews
at HardwareinReview.com
Discuss technology
at TJRForum.com

January 31, 2007

Understanding Ajax book review

Filed under: Tech Book Reviews — @ 6:35 pm

The competition among Ajax programming books has gotten all the more fierce with Prentice Hall’s excellent Understanding Ajax. While many Ajax texts are good at covering a handful of advanced Ajax-related topics, this one starts at the beginning and covers every necessary aspect of Ajax programming in just the right amount of detail.


Writing analysis

Understanding Ajax is divided into three parts: an Ajax introduction, case studies dealing with Ajax libraries, and appendices that explain popular Ajax libraries in depth. The first section is among the best introductions to Ajax that I’ve yet read; every concept, term, and technique is explained simply, then shown in a small but operational example. Once the basic concept is established, the author ventures further into more complex uses and alternative approaches.

In terms of content quality, this book is easy to follow and understand. The code samples are perfectly conceived and formed, and for the most part will actually work in your Web browser. Where appropriate, the author builds on previous examples so that you can see your little program evolve as you expand your knowledge of the subject. I was particularly impressed by chapter 4, which offered a no-holds-barred discussion of the challenges of developing with Ajax and implementing Ajax techniques into current sites and applications. The lack of Ajax cheerleading is refreshing, to say the least.

The writing style may be easy to follow, but the editing isn’t on the same level. Typographical and punctuation errors litter the book, usually near the beginning of chapters.

Putting the book to the test

The book states that you must be familiar with JavaScript, HTML, and CSS in order to get the most benefit from it. That immediately put me off because I’ve read many technical books that start out with an admonition that the reader be “familiar with” or “competent in” certain key technologies, only to discover that what the author really meant to say was, “you must be a guru.” Understanding Ajax is among the minority of programming books that don’t assume you know everything, and when it says that you must have some degree of competence with JavaScript, HTML, and CSS, it means that you should know the basics of how to code your own Web page — how to build a cascading style sheet, how to use HTML tags, the basics of object-oriented programming, and how to create and implement a JavaScript function.

Understanding Ajax covers development in Internet Explorer 6 and Firefox 1.5. It occasionally mentions Opera, Konqueror, and Safari, and completely ignores the subject of mobile and handheld browsers. I wasn’t too pleased with these omissions because they make that terrible assumption that everyone who has a computer uses Microsoft Windows.

Though I have pages of notes on this book, the last thing I’ll say about it as that it includes a whole chapter that walks you through building an entirely Ajax-based “support ticket” Web application, broken up into appropriate sections, and using techniques the book has previously taught. I can comfortably say that you can learn how to develop with Ajax by reading and following Understanding Ajax.

Summary and conclusions

Understanding Ajax is among the best books to learn Ajax programming from that I’ve seen so far. It’s thorough without being dry, the author intuitively knows just how far to go into a subject to teach it to you without running off on some wild tangent, and every piece of relevant information — browser-specific performance issues, debugging using popular software tools, error logging, integration with PHP-based applications, usability in user interface design — is included. Definitely recommended for prospective Ajax Web developers.

Title Understanding Ajax
Publisher Prentice Hall
Author Joshua Eichorn
ISBN 0132216353
Pages Paperback, 362 pages
Rating 9 out of 10
Tag line Using JavaScript to create rich Internet applications.
Price (retail) U.S. $26. (Buy it from Amazon.com)

Discuss this article or get technical support on our forum.

Copyright 2007 JEM Electronic Media, Inc. No reprints without written permission.

January 30, 2007

Popular object database expands licensing options

Filed under: News Stories — @ 12:00 am

Today the company that develops and controls the db4objects object database announced that in addition to the GNU General Public License and a commercial use license, it will also be offering its flagship product under a new, more freely distributable agreement: the db4objects Opensource Compatibility License (dOCL). This allows the software to be redistributed with a wider range of non-commercial open source projects, many of which cannot easily redistribute programs licensed under the GPL. An explanation of this software, the license, and a brief interview with db4objects CEO Christof Wittig are below.


Object databases

By far the most popular database frameworks in production today are relational database management systems (RDBMS). They were designed in and for an era when procedural programming was the only logical and widely-accepted method of solving problems with software. Data was a consequence of a program, not its basis. Today though, object-oriented programming is a more popular approach to solving problems because it is data-focused, and therefore can grow and evolve more easily, especially in environments where data or client needs are dynamic. Using yesterday’s RDBMS software with today’s object-oriented applications requires a lot of learning, frustration, and/or a glue layer between the two programs which significantly degrades application performance. That’s where object databases come in; they’re designed specifically for object-oriented programs, and make things easier and faster in many ways.

db4objects is the most popular and widely-used object database framework, with nearly a million deployments and more than 20,000 registered Java and .NET developers. You can download it for free and use it in any way you wish, but if you plan on selling it as part of a commercial product that you don’t want to be at all open source, you can enter into a commercial distribution agreement with db4objects whereby you pay it between 3%-5% of the bill of materials price of your product.

Explaining the dOCL

The db4objects Opensource Compatibility License is designed to allow free redistribution for non-commercial use. Previously the company had a dual-license scheme by which the software was developed and distributed under the GNU General Public License and offered for free download, but was also sold under a commercial license that required payment for each program or product sold with db4objects embedded in it. This is still the current approach, but there is now a third option: the dOCL.

The GNU GPL accounts for a large percentage of open source software (and a larger percentage of free software, which has stricter terms than the open source definition), but is not backwards-compatible with GPL-incompatible free software or open source licenses. In other words, there are many projects under, for instance, the BSD or Apache licenses that can’t distribute GPL-licensed software. The dOCL is the solution to the distribution problem presented by the GPL in such instances.

“Dual licensing is a well-understood model in the industry and is already used by companies like MySQL. It makes it easy to download, use, and evaluate db4objects,” Christof Wittig, the db4objects CEO told me in an interview.

The terms of the dOCL are documented on the db4objects site, and are thus generally explained:

  • In addition to the dOCL, db4objects is licensed under both a commercial, royalty-based license agreement, and the GNU General Public License v2.0. You may choose to license the software under any of the three agreements.
  • You can create derivative works of db4objects, but if you do, you must license them under the GPL unless they were previously governed by one of the following licenses: LGPL versions 2.0 and 2.1; Apache Software License version 1.0, 1.1., or 2.0; BSD as published on July 22, 1999; Eclipse Public License version 1.0. If your program was previously published under the terms of one of those agreements before you incorporated db4objects into it, you can publish your derivative work under the same.
  • You must register in the ProjectSpaces section of the db4o Developer Community.
  • db4objects retains ownership of the software, including all patents and copyrights therein.
  • You cannot delete or in any way alter the copyright, trademark, or other proprietary rights notices in db4objects.
  • db4objects may publicize your use of the software for marketing purposes.

Many of the above terms and restrictions prevent the dOCL from being classified as a free software license. The licensing of derivative works clause also precludes db4objects from being considered open source by the official open source definition, which requires that derivative works be able to be licensed under the same terms as the original. Still, the license serves its purpose: to allow db4objects to be incorporated into non-GPL open source software projects under reasonably non-restrictive terms.

The best of both worlds?

“Open source software is not only a ‘commoditizer’ of well-understood product categories, but also a force to disrupt markets with new technologies by mitigating vendor lock-in from the Oracles and Microsofts of this world,” Wittig said. “It’s less disruptive for developers, though, because it’s free to try it out and very easy to use. You can have this running in 10 minutes.”

db4objects differs from many other dual-licensed software packages in that the open source edition is materially and functionally the same as the proprietary edition. Other companies — like MySQL — offer an improved commercial product and a reduced open source edition. Still others offer a totally free product, but complicate its interface in such a way that a support contract is necessary to install, customize, and maintain it. Wittig told me, “We believe charging for services on free products encourages the creation of difficult-to-use software. Our commercial license creates our revenue stream.”

Heather Meeker of the Greenberg Traurig law firm and co-chair of the Open Source Software subcommittee of the Science and Technology Section of the American Bar Association analyzed this situation in depth in a 6-page whitepaper, released today as part of the db4objects official announcement. In it, Meeker provides an honest perspective on the market’s need for dual licensing schemes, and how db4objects approached the situation while still honoring the GNU General Public License.

Discuss this article or get technical support on our forum.

Copyright 2007 JEM Electronic Media, Inc. No reprints without written permission.

January 17, 2007

Google Analytics book review

Filed under: Tech Book Reviews — @ 5:10 pm

Much hype accompanied Google’s takeover of the Urchin Web analytics package and its subsequent free offering of a low-end version of Urchin to anyone who wanted to sign up. There’s a lot to dislike about Google Analytics, but its quality and availability have improved somewhat since its initial release, and for those who can’t afford a high-end analytics package that can cost hundreds or even thousands of dollars per month, there are few reasonable alternatives. Wiley Publishing’s Google Analytics is a good, in-depth guide to this service and all of its various settings.


Writing analysis

Google Analytics starts out with a brief explanation of what this service is and how it can be useful to webmasters and managers of all kinds. The next two sections are, oddly enough, on the AWStats Web log analysis package. Since log analysis tools like AWStats and Webalizer collect and compile Web site visitor data in a fundamentally different way than JavaScript-and-cookie-tracking tools like Google Analytics, the results they show can be useful in different ways. By giving a decent run-through of AWStats, the authors are encouraging readers to use a variety of tools to measure the success of entire sites and individual pages.

The rest of the book is just like the introduction, except redesigned with specific Google Analytics topics. You’re given a brief explanation of a feature in Analytics, then the authors explain how and to whom it may be useful, and then show you how to use it. There are plenty of screen shots, sidebars with appropriate explanations of related topics, and even a beginning lesson on how to use regular expressions in Analytics.

The book’s written in an entertaining, somewhat comical, occasionally goofy style, but it never loses focus or drifts off topic. The language is inconsistent, though, which can be chalked up to both the perils of using multiple authors and lax editing. Web sites are referred to alternately as Web sites, web-sites, and websites, and information is occasionally restated unnecessarily. These are minor errors and don’t at all ruin the book or make it inaccurate, but I’d like to see the editors take a little more care with language style in future books.

Putting the book to the test

The only real problem with Google Analytics is that the information it provides is frequently obvious or easily figured out just by using the service. As a Web application, Google Analytics can hardly be any easier to use. If you have already signed up for Analytics and had no trouble implementing it and benefiting from the data it compiles, this book will be of little use to you.

The real value of Google Analytics (the book) is to people who need to measure and analyze the effectiveness of their Web sites, but don’t have the technical experience or time to figure out the Google Analytics service on their own. Web sites — somewhat unfortunately for those of us who have been publishing online for a long time — are increasingly being published and maintained by people who know how to write, sell, market, or advertise, but don’t know any of the technical details behind the sites they are working with. To this growing market of pseudo-technical people, a book like this is as necessary as the service it explains.

Summary and conclusions

If you’ve already got a Google Analytics account, know how to use it, and aren’t concerned that you’re getting the most from it, I can’t see any reason to recommend this book to you. If, however, you are at all confused by any part of the service, this Google Analytics book is undoubtedly the best resource for you.

Title Google Analytics
Publisher Wiley
Authors Mary E. Tyler and Jerri L. Ledford
ISBN 0470053852
Pages Paperback, 316 pages
Rating 7 out of 10
Tagline Discover where your site visitors come from, what pages they visit, how long they stay, what they buy, what makes them give up, and where they go.
Price (retail) U.S. $20. Buy it from Amazon.com

Discuss this article or get technical support on our forum.

Copyright 2007 JEM Electronic Media, Inc. No reprints without written permission.

January 16, 2007

The World of Warcraft: Burning Crusade launch

Filed under: News Stories — @ 3:21 am

Midnight on January 16 marked the official release of The Burning Crusade, the first official major add-on for the blockbuster massively multiplayer online roleplaying game World of Warcraft. Computer stores across the country re-opened at the stroke of midnight to sell the expansion pack to Warcraft die-hards. The really big events hosted by the game’s manufacturer, Blizzard Entertainment, are all in California, complete with signings by some of the game’s developers. Here in Orlando, FL the launch didn’t arrive with quite as much heraldry, but crowds gathered and lines formed at every GameStop and EBGames store in the area. Read on for the full report.


The Burning Crusade

A few days ago Blizzard announced that it had reached the 8 million subscriber mark for World of Warcraft, putting them above many of the world’s top Internet service providers in terms of sheer number of customers.

World of Warcraft — or WoW for short — is an online roleplaying game where players choose a faction, race, profession class, and skilled trades and build their characters up by completing quests and fighting players of the opposing faction. The game world is divided up into the Horde (which encompasses the undead, tauren, troll, and orc races) and the Alliance (humans, night elves, dwarves, and gnomes), which are perpetually at war with one another in a gigantic world where at any given time you could be playing with hundreds of other characters, both computer- and human-controlled. A subscriber may join as many servers as he likes, and have up to ten characters on each server.

WoW is built on years of game lore introduced by the fighting/strategy Warcraft game series, and has an in-depth storyline that has spilled over into books and card games, and even a music CD of the game’s soundtrack. Although it has its own storyline, like nearly all modern-day “sword and sorcery” fantasy stories, the WoW backstory, universe, and music are clearly based on Lord of the Rings.

The Burning Crusade expansion pack adds another world to explore, flying creatures to help explore it, new trade skills, a new level cap (you can now go as high as level 70, whereas the maximum level in World of Warcraft is 60), and one new player race for each faction — blood elves for the Horde, and alien-like draenei for the Alliance. There is also a new player-versus-player battleground called The Eye of the Storm, only available to players above level 60.

EBGames Michigan St.

Even at 11:30PM, there were more than a dozen people waiting at the door to the EBGames franchise on Michigan St. in Orlando. Before the last customer was served, at least 50 people had lined up to buy a copy of The Burning Crusade, and none were turned away. A police car seemed to keep watch over the store’s late night opening in light of pre-Christmas PlayStation 3 violence in waiting lines, but it turned out that one of Orlando’s finest was not just there to make sure we were safe — he’d preordered the game and was there to pick it up.

Most of the people waiting for the midnight release had preordered the game from the store and were divided into two lines: those who had already paid, and those who had yet to pay but had made a reservation. Only a handful of people showed up without a reservation, and had to wait until all of the other customers had been served to make sure that there were enough copies of the game. As it turned out, a number of people who’d reserved a copy did not show up at midnight to pick it up.

The people waiting in line were clearly excited not just about The Burning Crusade, but about meeting other WoW players and being able to talk to them about their adventures. Most had multiple characters and had been playing for more than a year. One man who’d preordered the game and was among the first few people in line claimed to have been a beta tester not only for The Burning Crusade (which had a closed, secretive group of testers), but for the original WoW itself. He goes by the name Asheru on the Deathkiss server, and most often plays on his level 19 “twink” (a word that identifies a character that has spent a great deal of time and game money to obtain the most powerful weapons, armor, potions, and enchantments that are possible for that level so that they can do well in level-restricted battlegrounds). He could hardly wait to get home and start a draenei warrior character, and to level up his druid so that he could get the new flying form that the druid class can assume. He actually ran out of the store with his copy of the game in hand.

Another of the front-liners goes by the name Raelsmar on the Bloodelf server, though he has characters on the Hellscream server as well. It took him about six months after the initial WoW release to get into the game, but once his friends and family members got him hooked, he was in the WoW world of Azeroth to stay. He was looking forward to The Burning Crusade’s new flying mounts (mounts are horses or other animals that you can ride by spending a lot of game money after you reach a certain level), and planned on creating a paladin of the new draenei race as soon as he got the expansion pack installed.

A guy who goes by the name Jais on the Mugthol WoW server and has played WoW almost from the very beginning was at the midnight opening as well, and said he probably wouldn’t immediately create a new character — he’d rather level up his current cast of characters to the new level 70 limit and get some new high-end gear for them. He was definitely looking forward to the new jewelcrafting skill and some additions and modifications to the existing skills and abilities that his characters have. “A lot of people in my guild are professionals,” he told me. “Some are lawyers, doctors — one’s even a judge. Everyone’s an equal in World of Warcraft, and there’s a lot of camaraderie without the sexism and racism that you might see outside of it. It’s a great community where you can feel comfortable and let off stress,” he told me. He was also interested in seeing more real-world gatherings of WoW players than just midnight lines at EBGames so that he could meet and connect with more WoW players.

Then the wait was over — the rolling fence came up from in front of the door and the two EBGames employees who were working the launch shift came out and announced that the pre-paid, pre-ordered customers needed to form a line and would be served first. Everyone else lined up on the other side of the door and waited. A few of the people in the non-preorder line had been discouraged by long lines at other EBGames and GameStop locations and came over to the Michigan St. store because they figured it was out of the way and would have few people waiting in line.

While in line, the excited gamers told stories of their WoW adventures — especially the pre-launch world event of a difficult boss character named Kruul that terrorized the most populous WoW cities — and lamented expected problems with The Burning Crusade, chiefly increased network lag and concerns about being able to wake up to go to work the next morning after being up all night playing WoW. Everyone I spoke with or overheard was on the Alliance faction — the Horde did not come out in force during The Burning Crusade launch for reasons yet to be determined.

The man in charge of the store for the brief midnight event was, not surprisingly, also a WoW player. He goes by the handle Deathizhere on the Burning Blade server, where he mostly plays as a level 60 warlock. He’s been playing for more than a year, and looks forward to creating a “twink” paladin draenei character, but not immediately — he’d rather get his current characters to level 70 first.

But does it run on Linux?

I bought my copy of The Burning Crusade last, after everyone had left. Unfortunately since I play through TransGaming Cedega on Mandriva Linux, the add-on won’t immediately install because it can’t find a current WoW installation. Unbelievably, in the time it took me to return home and write this article, the issue has already been resolved on the TransGaming forum. Oh — and you can look for me as Valour the human rogue or Aponius the night elf priest on the Bloodscalp server. Yes, like more than 8 million other people around the world, I’m hooked too.

Discuss this article or get technical support on our forum.

Copyright 2007 JEM Electronic Media, Inc. No reprints without written permission.

January 15, 2007

The OpenBSD 4.0 Crash Course

Filed under: Tech Book Reviews — @ 5:15 pm

I’ve spent the last several weeks writing, revising, and editing a project called The OpenBSD 4.0 Crash Course for O’Reilly Media. It is designed to quickly teach you the basics of how to install, configure, use, and upgrade the OpenBSD operating system as a desktop or server. It’s specific to version 4.0, and I plan on writing a new version for each future OpenBSD release. If you’ve wanted to learn OpenBSD or are anxious to get into the BSDs in general, this is your best starting point. I decided to pitch it as an electronic guide because it doesn’t need to be particularly long, it’s possible to copy-and-paste commands from it to your terminal window, and you can print out a hard copy if you want. It’s now available for download for U.S. $9.99 from O’Reilly, and I plan on donating a portion of my royalties to the OpenBSD Project so that it can continue to produce great software. Each section is designed to be like my how-to articles — concise and easy to understand. There are no preambles or politics; just good information. Below is a sample from the book to show you what you can expect from it.


Server Installation and Service Configuration

OpenBSD comes with some services available through the base system, and many others available through Ports or packages. Special notes concerning each kind of server are detailed below. Remember that this guide is only here to familiarize you with these services as they apply to OpenBSD; actually configuring, running, and managing the services is well beyond the scope of this Short Cut.

It goes without saying that security is the primary focus of outward-facing servers. Even on OpenBSD, you will want to remove (or simply not install) unnecessary components, disable unused services, and disconnect unused devices.

The inetd Internet Super-Server

All Internet and local network services on OpenBSD can be started manually from the command line, or you can add a line to /etc/rc.local to start them at boot time. Some already have default entries in /etc/rc.conf, and others can have their own configuration lines in rc.conf.local. There is nothing inherently wrong with starting each daemon individually and letting it do its own thing quietly in the background. There could be a performance advantage to using the inetd Internet super-server, however. This program acts as a sort of router, monitoring incoming network requests and directing them to the proper services. Be careful that you don’t try to use more than one method to start services at boot time, or else you could run into strange problems.

inetd is itself started through /etc/rc.conf, and it’s configured through /etc/inetd.conf. Each inetd entry must be listed as a service in /etc/services and use a protocol listed in /etc/protocols. If your server is not doing well under heavy network loads, you may want to experiment with using inetd to start and manage some or all of your services.

For the most part, the rest of this guide will cover only the rc.conf and rc.local methods of starting services, as they are the easiest and probably most oft-used methods to start the servers outlined below. That doesn’t mean that you should totally ignore inetd, though. At the very least, you may want to look through /etc/inetd.conf to make sure that it isn’t running any unnecessary services. If you’re configuring OpenBSD as some kind of specialized network server, inetd is almost certainly running services that you can and should disable.

Apache

Apache 1.3.29 is installed by default as part of the OpenBSD 4.0 base system and includes many extra patches to enhance its performance and security. Apache 2 cannot be included with OpenBSD because of some unacceptable terms in version 2 of the Apache software license. Because of this limitation, the OpenBSD Project has concentrated on doing more with Apache 1.3, to the point that it is almost a different web server in its own right. However, some people may have a specific need for Apache 2 because of the requirements of other software. Those people can download the Apache 2 source code from the Apache web site and compile it on OpenBSD without any extra concern.
The OpenBSD-modified Apache 1.3 comes with the following modules installed by default:

  • mod_cern_meta
  • mod_info
  • mod_rewrite
  • mod_auth_anon
  • mod_define
  • mod_log_agent
  • mod_speling
  • mod_auth_db
  • mod_digest
  • mod_log_referer
  • mod_unique_id
  • mod_auth_dbm
  • mod_expires
  • mod_mime_magic
  • mod_usertrack
  • mod_auth_digest
  • mod_headers
  • mod_mmap_static
  • mod_vhost_alias
  • mod_ssl

If you need to add more modules, you can do so through the Ports tree, generally in the /usr/ports/www directory.

You can start the Apache HTTP daemon manually by typing apachectl start and pressing Enter. If you’d like to start it at boot time automatically, edit the /etc/rc.conf file and replace the NO with “” in this line:

httpd_flags=NO # for normal use: "" (or "-DSSL" after reading ssl(8))

Obviously if you need to use mod_ssl, you need to use the -DSSL flag inside the quotes. See the httpd manpage for more information on loading extra modules here. Specific Apache modules may have their own manpages as well.

By default Apache runs in a chrooted environment — in other words, Apache operates as though nothing exists outside of the ServerRoot, which is by default /var/www. So if you have extra Apache modules installed that need to use programs or configuration files in any directory outside of /var/www and its subdirectories, then they will not be able to function properly. More details are available in the httpd manpage, but if you just need to get this working right now by eliminating the chroot jail, start Apache with the -u flag, either from the command line, or in the quotes in the previously mentioned Apache section of /etc/rc.conf. Circumventing the chroot jail will make your system less secure if Apache is compromised. For optimal security, the www user should not be able to write to any files or directories in ServerRoot.

The Apache 1.3 configuration files are kept not in /etc, but in /var/www/conf/. You should look over httpd.conf and adjust it for optimal performance on your computer. By default, the settings may be a little too limited for web sites that get thousands of visitors per day.

Databases

No databases are installed by default in OpenBSD, but you can find MySQL, SQLite, and PostgreSQL in /usr/ports/databases along with several database-specific Perl modules and other extras and add-ons.

MySQL

Once installed, you can find the global MySQL configuration in /etc/my.cnf, but if you want to set server-specific configuration options, you can create an override my.cnf in /var/mysql. User-specific configurations can be stored in each user’s home directory.

Be warned that the default my.cnf is designed for old, low-power, low-memory servers and does not scale well under moderately heavy loads. This is more or less the standard default configuration for MySQL, though, so if you’ve configured it before, you should already know what you’re doing.

To make mysqld start automatically at boot time, add these lines (or something similar that fits your needs) to /etc/rc.local:

if [ -x /usr/local/bin/mysqld_safe ]; then
    echo -n ' mysql'; /usr/local/bin/mysqld_safe &
fi

SQLite

There are two versions of SQLite available for OpenBSD: 2.8.17 and 3.3.6, and they can be installed from /usr/ports/sqlite and /usr/ports/sqlite3, respectively. The sqlite or sqlite3 executable is located in /usr/local/bin, and there is no configuration file because SQLite is by definition “zero-configuration.”

PostgreSQL

You can install the PostgreSQL client via Ports from /usr/ports/databases/postgresql, but if you want the server and documentation, you’ll have to add them yourself:

pkg_add postgresql-server postgresql-docs

Automatically starting and stopping PostgreSQL is not quite as easy. Add these lines to /etc/rc.local to start it at boot time (that’s one line between the if and the fi, not two, so be careful when you copy and paste this text):

if [ -x /usr/local/bin/pg_ctl ]; then
    su -l _postgresql -c "nohup /usr/local/bin/pg_ctl start -D /var/postgresql/data -l /var/postgresql/logfile -o '-D /var/postgresql/data'" echo -n ' postgresql'
fi

And to automatically shut it down cleanly when the system shuts down, add these lines (this time it’s two lines between the if and the fi) to /etc/rc.shutdown:

if [ -f /var/postgresql/data/postmaster.pid ]; then
    su -l _postgresql -c "/usr/local/bin/pg_ctl stop -m fast -D /var/postgresql/data"
    rm -f /var/postgresql/data/postmaster.pid
fi

You can find the PostgreSQL configuration files in /var/postgresql/data/. By default, the system is not tuned to accept a large number of database connections, so you’ll have to modify some kernel parameters if you’re expecting a fair amount of database usage. Check out the documentation in the /usr/local/share/doc/postgresql directory for more details. Of particular interest is the README.OpenBSD file, which has the aforementioned advice on system tuning for PostgreSQL.

The OpenBSD 4.0 Crash Course

That concludes the sample from the book. The rest of the PDF is just like this — concise explanations that will get your computer up and running quickly, with proper resources and references for you to learn more if necessary. You can download it for $10 directly from O’Reilly.

Discuss this article or get technical support on our forum.

Copyright 2007 Jem Matzan. This article is comprised of a book excerpt, and may be reprinted on Web sites and in newspapers or magazines without royalty, provided the content is not modified, this notice is preserved, and proper attribution is given.

| Contact Us | About Us | RSS FAQ |
Copyright 2008. All content items belong to their respective authors.