26
Fri, Apr
1 New Articles

The Linux Letter: Nuke It!

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

One of the biggest problems I have in writing this column (if you can call it a problem) is selecting a topic for the month. There are just so many from which to choose! Occasionally, the stars align properly, and I get an email or phone call just at the time I'm narrowing my focus. Such is this case with this month's subject.

I'd Like a Web Site, Please...

I recently received a phone call from a long-time client who publishes a high school football newspaper and a high school wrestling newspaper. He and his partner wanted to create a subscription Web site and eventually move their publications to the Web, in a manner similar to MCPressOnline.com. Both of these gentlemen know the basics of HTML and maintain some popular sports Web sites. But the means they use to do it, static HTML via Microsoft FrontPage, is not conducive to a high-traffic Web site with frequent content change. What is required in a situation such as this is a Web site that is database-driven--a member of the genre of software known as "content management systems (CMS)." His phone call was to enlist my assistance with engineering such a site.

The Components

The basic components of any content management system are straightforward. You need a Web server, a database management system, and a Web scripting or CGI language. For an iSeries shop, that equates to the original HTTP server (or the Powered by Apache Web server), DB2 for iSeries, and one or more of the languages available on the iSeries, such as Java or RPG IV. In the open-source world, this combination of server, database, and scripting language is commonly referred to as LAMP, an acronym for Linux, Apache, MySQL, and one of the "P" languages in the list: Perl, Python, or PHP (Hypertext Preprocessor).

Getting back to my clients for a moment, let's review some of their requirements. First, their desired site needs to support a public area as well as a "premium" service, which is accessible only to members who have paid a subscription fee. Payment for the premium service needs to be supported via PayPal. Next, the site must support a forum so that the sports junkies who frequent it can hold life-affirming discussions. A further requirement is to support an image gallery where photos of various events can be posted for the denizens of the site. Finally, all of this has to be done on a relatively small budget.

I don't imagine that many of your companies would have a use for a sports Web site (overtly, anyway), but I'm sure that many of them could make use of a site like this for an intranet. And with today's IT budgets, the last requirement in the aforementioned list (small budget) is probably at the top of your company's list. What to do?

Choose Your Weapon

Obviously, the budgetary requirements of this project preclude any major customized development. So a site built from the ground up is not only out of the question, it's totally unnecessary. A little Google searching in both Web sites and newsgroups pointed me to a wonderful open-source CMS known as PostNuke. PostNuke is built around the Web scripting language PHP (itself an open-source project), which is the open-source equivalent of Microsoft's Active Server Pages (ASP).

Of the LAMP requirements for PostNuke, only MySQL is not normally loaded when installing Red Hat Linux (the distribution I use and the one I'll be discussing in this article). Red Hat favors PostgreSQL (another open-source database management system) and will load it if "database server" is checked during the install process. Not to worry, though; the Red Hat Package Managers (RPMs) for MySQL are provided on the installation CD. Just install the following three packages: mysql-server, mysql, and php-mysql (see last month's article on RPM for instructions). The first two packages provide the database server and client functionality. The third package provides the connectivity between the database server and PHP (think ODBC or JDBC driver, and you'll be in the ballpark).

Spinning Up the Nukes

Once you have the the basics up and running (don't forget to issue the command service mysqld start once you've installed MySQL), you need to acquire the PostNuke software. Point your browser to the PostNuke Web site and download the latest release. The release mentioned on the main site is .726RC3 (as in .726 Release Candidate 3). It seems to work well for me, but if you're squeamish about betas (no matter how solid they appear to be), you can download the latest production release (.723).

While you're in the mood for downloads, I highly recommend Drew Vogel's Official PostNuke Installation & Getting Started Guide which is available in a number of formats. I prefer PDF so that I may view it offline. I'm going to review the steps you'll need for the installation of PostNuke only briefly, since Drew's document provides detailed instructions.

In a nutshell, here are the steps for installing PostNuke:

Create a directory in your Web server's root directory to contain your PostNuke site. For a default Red Hat installation, that would be var/www/html. Whatever you name your site will become part of the URL to access it; thus, I created the directory /var/www/html/postnuke so that my URL would be http://localhost/postnuke.

  1. Extract the PostNuke files in a temporary directory and copy them to the directory you created in step 1.
  2. Change the ownership of the directory and files you created in step 1 to that of the user under which your Web server runs. For Red Hat Linux, that user is Apache. Issue the command chown -R apache.apache /var/www/html/postnuke and that step is completed.
  3. Create the database and database user for your site (see Appendix A of Drew's docs).
  4. Point your browser at the install script and complete the forms provided. To continue our example, the URL is http://localhost/postnuke/install.php.
  5. Customize your site to your preferences.
  6. Once you are satisfied that everything is working properly, delete the install.php file and install/ directory from your Web site. This ensures that it's not rerun by someone else.

Total time to install should be less than one hour if you've never installed the software before. Once you've done it, the process will take less than 15 minutes!

Getting More Bang for Your Buck

After you have experimented with your new site, you may notice that three of the requirements I mentioned earlier (image gallery, PayPal, and forum) are missing. That's because they don't come with PostNuke. Fortunately, PostNuke is meant to be fully extensible--the APIs are easily obtained from the project Web site. The result is that there is a huge volume of add-on modules available. To fulfill the image gallery requirement, I used a module called the Magnish Image Gallery. The PayPal functionality comes from www.postnukemodules.com. For the forum function, the de facto standard is PNphpBB2.

Installation of additional modules is simplicity itself. Just change to the "modules" directory under the PostNuke Web site's root directory and then extract the downloaded files using tar or unzip. Next, log on to your site as the administrator you created during setup, choose the modules link from the Administration link, and then choose Modules from the Administration page. Click on Regenerate, and your modules will appear in the available list. Initialize and activate them (using the provided links), and they will meld right into your nuked site.

Open Source Explodes onto the Web

Even though I have spent many years working with open-source software, I'm continually amazed by the quality that much of the software has achieved. PostNuke (and php-nuke, the project from which the PostNuke code was forked) provides a very easy way to get a professional-looking Web site with outstanding functionality.

As a Web scripting language, PHP is certainly as good as any of the others that are available. I still think that server-side Java has the upper hand in terms of scalability because JSPs are compiled into servlets, not interpreted with every page request. All things being equal, I would expect that, with a Java-based site, performance will remain more consistent as site usage increases. And, of course, if you really want PostNuke but are hard-core Java, you can get Java PostNuke. This link will take you to an article on the PostNuke site that will give you the details.
So how did my clients like their new site? They were delighted. The minor customizations that they wanted were simple for me to implement, since PHP is a simple language to learn. Judge the results and decide for yourself. Once you learn to recognize a nuked site, you'll be surprised by how many popular Web sites are "Powered by PostNuke."

Barry L. Kline is a consultant and has been developing software on various DEC and IBM midrange platforms for over 20 years. Barry discovered Linux back in the days when it was necessary to download diskette images and source code from the Internet. Since then, he has installed Linux on hundreds of machines, where it functions as servers and workstations in iSeries and Windows networks. He recently co-authored the book Understanding Linux Web Hosting with Don Denoncourt. Barry can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..

 

Barry Kline 0

Barry L. Kline is a consultant and has been developing software on various DEC and IBM midrange platforms since the early 1980s. Barry discovered Linux back in the days when it was necessary to download diskette images and source code from the Internet. Since then, he has installed Linux on hundreds of machines, where it functions as servers and workstations in iSeries and Windows networks. He co-authored the book Understanding Web Hosting on Linux with Don Denoncourt. Barry can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: