Results matching “wiredtree” from Ye Olde Rad Blog III

Feliz año nuevo. Most Content Management Systems (such as Drupal & MODx) work in conjunction with (require) a database. So do blogs (such as Movable Type) & forums (such as SMF).

MySQL is the world's most popular database software for web-based applications (.. such as CMS's & blogs & forums). It's what I use. It's the only database system I've ever used.

cPanel / Web Host ManagerThe Rad VPS (« physically located downtown Chicago) uses the cPanel/WHM control panel to help administer the site. cPanel makes it stupid-easy to create a new MySQL database.

You simply » enter a descriptive name for your new DATABASE (such as » rad_modx) and click the button labeled 'Create Database.' cPanel talks to MySQL and creates the database for you. Viola! Done. Too easy.

To use your new DATABASE, you'll also need to create a USER (such as » rad_modx, conveniently same as the database_name). Give this USER a password and click the button labeled » 'Create User.' Voila! Done creating new USER.

Lastly you need to assign a particular USER to a particular DATABASE. You do this by selecting both from their respective drop-down menus (one lists all available DATABASES, the other all possible USERS) and clicking the button labeled 'Add.'

Then you assign to this USER the appropriate PRIVILEDGES (normally ALL) necessary to perform the database functions. Click the button labeled 'Make Changes' and you're done. Voila! As if this weren't easy enough, cPanel even has a wizard to walk you thru these steps.

MySQL Database ManagementSo, in order to configure a database to work with a particular web application (such as Drupal or MODx), you need 3 pieces of info:

  1. database_name
  2. user_name
  3. user_password

Couldn't be easier. Tho I sometimes forget the final step of actually assigning the USER to the DATABASE (after creating both). Creating new DATABASES is not something I do on a regular basis.

RADIFIED currently uses 5 databases. Three for the blogs » 1-each for the 3 different versions of Movable Type I have installed .. based on v263 (installed 2003), v335 (installed 2007) & v432 (installed 2008). Another for Drupal (2008). And 1 for MODx Revolution (beta5), which I installed a few days ago.

The Rad forum, which uses YaBB, doesn't use a database. (At least not yet.) Might be worth noting here that Movable Type, Drupal, MODx & YaBB are all OPEN SOURCE (better than free) .. as is MySQL.

While installing MODx a few days ago, I noticed they include an option to test your database connection & credentials .. to see if MODx can access it okay.

Created a dedicated 'Guides' page. See here » Radified Guides. Been meaning to do that for .. eons. This will allow me to off-load the guides listed here on the home-page, so I can clean it up.

MODx Content Management System (CMS)I indented & right-aligned every other link .. to make them easier to read. What do you think? When the links were all lined-up together & left-aligned, they seemed too .. similar.

Eventually I'd like to include a representative graphic for each guide/link. But for now, I just wanted to create a page that contains a repository of the links to all our guides.

On a related note, I've been looking more deeply into MODx, the Content Management System (CMS). They are fixin' to release a new version (complete-rewrite, from the ground up, based on PHP5) .. called » REVOLUTION. (Current version is called » EVOLUTION.)

Drupal would be cool, but it's way too sophisticated for what I need. I don't want/need a PhD in CMS's. Here's a MODx site, for example. (I used to live in Lancaster, PA .. the heart of Amish country. Nice people there.)

I'd like to become intimately familiar with a good CMS .. as another skill to add to my digital toolkit. Only way to do that is » use one daily.

The good people at MODx claim a 'Release Candidate' version of REVOLUTION will be coming » "Winter 2009" (.. which is now). [ Notice how the words 'Summer 2009' have been lined-out. ] UPDATE » They just changed the RC date to "Spring 2010". Hmmm.

The MODx site is running REVOLUTION. I'm in no hurry, tho. Rather make a good decision than a hasty one.

Microsoft Fears Linux

|

I'm reluctant to republish the content of others (as so many sites already do), but .. I found it interesting & noteworthy that » Microsoft has acknowledged Linux as a threat .. especially since I spent so many hours in Linux these past few weeks (learning the Unix shell)

Linux PenguinCopy-n-paste snippet (minor Rad-editing for brevity):

"Microsoft acknowledges Linux as the first viable competitor to its Windows client business, due to the use of Linux on netbooks, which are rising in prominence as an alternative to full-sized notebooks.

Microsoft cited Red Hat and Canonical -- the latter of which maintains the Ubuntu Linux distribution -- as competitors to its client business, which includes the desktop version of its Windows OS." </snippet>

Notice how the article said » DESKTOP, and not server. Linux has long been a dominant force in the server market (.. if not the dominant force).

It's difficult to describe why Linux is so cool .. why using it feels so fresh & clean. But I think it has something to do with the good intentions .. that come from thousands of talented programmers donating their time & expertise .. to bring you (for free) an operating system they obviously believe in.

I might be imagining it, but I think you can actually feel these good intentions (while using Linux). Can you feel the difference (in intentions) between someone who genuinely loves you, and someone who is paid to love you?

Moreover, I feel our economy has a lot to do with the Linux threat to the Microsoft desktop. No matter how compelling the product, basic economics suggest it's hard to compete with free. (Which Windows is not.) And in these troubled economic times, free means more than it used to.

Learning the Unix Shell (bash)

|

Last month I mentioned a quest to learn the Unix shell .. specifically » bash (the Bourne Again SHell). Almost done. Currently ~80% complete .. enough to feel reasonably confident at a terminal.

Linux shell terminalThe 'shell' is simply a program that lets you interact with the operating system (actually the kernel, to be more precise) ..

.. by taking your (text-based) commands and passing them on to the kernel. In my case, this kernel happens to be » Linux (which is but one variant of Unix).

The term 'shell' comes from the notion that this software acts like a 'layer' that sits between you and the operating system .. similar to the way an egg-shell sits between you and your hard-boiled breakfast.

The shell can be intimidating, cuz it uses a (text-based) command-line interface (CLI). No intuitive GUI to help you along. You either know the commands or you don't.

Didn't take me long to realize the CLI was where Linux's true power resides. When we upgraded the site, for example, to a Virtual Private Server, the support-techs who helped me with the move all used the command-line to work their mojo.

Most Linux distros do indeed come with an excellent GUI (usually either KDE or Gnome). But (but!) the Rad VPS does not. Which is why it became necessary to learn the Unix shell. (Something I tried to avoid.)

The Rad VPS is based on CentOS (Community ENTerprise Operating System), an off-shoot of Red Hat, which is probably the most popular of all enterprise Linux distros (.. and now a new member of the S&P 500, a development you may find telling).

GUIs (such as KDE or Gnome) require lots of memory/RAM. My laptop, for example, has 2-gigs, but the Rad VPS comes with an allotment of only 512-MB (.. upgraded from 384 just today).

With that limited amount, I need to run not only all the standard web applications .. such as Apache (web server), MySQL (database), Perl (scripting language), etc. but also cPanel/WHM.

So there's not much RAM left to run a GUI. [ Don't think I didn't inquire about installing a GUI. =) ]

Bottom line » if you wanna administer your own VPS, you need to learn the Shell. So that's what I'm doing. (Of course, there have been distractions, making progress uneven.)

Quest to Learn the UNIX Shell (bash)

|

Been learning the UNIX Shell, which uses a command-line interface (from a terminal) .. something I've wanted to do ever since we upgraded to the Virtual Private Server last year. (Linux is a variant of UNIX.)

Linux shell terminalEven basic knowledge of (how to use) the Linux command line makes life administering a VPS much easier.

The Shell is simply a program that allows users (like me) to interact with the operating system (sometimes termed the 'kernel'). It can be conceived of as a 'layer' sitting between you and the operating system .. hence the term » shell.

Several shells exist, but nearly all Linux distributions come with » bash (Bourne Again Shell) .. cuz it's free, powerful and easy to use.

On my laptop I have installed a copy of Ubuntu Linux that I use to learn the shell (practice). Before jumping into learning the Shell, I figured this was a good time to upgrade my 'installation' of Ubuntu .. to the latest release (» v9.04, 'Jaunty Jackalope').

So I downloaded » this virtual machine (1.1 gig, using uTorrent). Had trouble getting it connected to the Internet, but that was due to my own inexperience with VMware, and not due to any short-comings of Ubuntu.

Anyway, I am really digging learning the Shell, cuz it's something I can use right away. For example, yesterday I upgraded the blogging software we use here at Radified (Movable Type) to the latest version (» 4.26). Something that used to take hours to accomplish was done in minutes .. (using a series of Shell commands). Beautiful.

If you view this home page in Firefox (or a browser other than IE or Opera), you'll notice I added some rounded corners.

The rounded corners of this box use graphics to achieve its effect (1 in each corner). Not as cool as pure-CSS. But that's why you can see these rounded corners in IE & all browsers. This box will expand and shrink (down-n-up) as necessary to accommodate text inside, as its width is fixed (to 205 pixels).

Been reluctant to spend much time focusing on site styling, preferring rather to concentrate on generating » content.

In the world of cars, for example, I've always preferred the spartan cockpit of a Porsche to the bells & whistles you find sitting in a corvette. Tho admittedly, that's just my druthers.

My point » function should never take a back seat to form.

I've considered adding rounded corners many times before. Countless techniques exist. But they always seemed a kludge. (Andy agrees.) So I never felt it worth adding the extra markup necessary.

Techniques that use graphics to achieve their effect involve inserting additional HTML elements that are otherwise unnecessary, because current CSS standards (v2.1) allow only 1 background image per element (while each box has 4 corners). Future versions of CSS (v3.0) will support 8 images per element (for this very reason).

This approach has 2 main problems. First, adding (otherwise) unnecessary markup goes against all that is holy to the Web Standards movement, which touts the tenent of 'Semantic Markup' as one of its pillars.

Had a weird problem with my network earlier this week .. where I could not access my site .. which (as you might imagine) suks pretty bad. No problems accessing any other sites. Seemed as tho I was being blocked to my site and my site only.

Access DeniedFirst I called my web host. Can't access my site, I said. No web pages, no email, no FTP, SSH. Nothing. Have no problems accessing any other sites. So it must be a problem with the server.

Hmmm, the tech mutters, I was just checking out your site earlier this morning .. a few hours ago. Lemme try to pull it up.

Your site is loading fine for me, he says.

You must be loading from the browser cache, I argue.

He proceeds to perform his Linux-guru mojo and says, No, your site is fine. These are pages I didn't load this morning.

You sure? I ask.

He then has me check my IP addy and verifies I'm not being blocked .. then suggests I unplug my router (for 30 secs) to reset it before plugging it back in. This trick works! I can again connect to the site. Until...

Upgraded the Rad Community forums .. to » YaBB v2.4 (released a few weeks ago). The boys at YaBB have adopted a new, fast-n-furious (3-month) release cycle, which keeps me hopping.

YaBB = Yet another Bulletin BoardThe 'upgrade' process begins with a new/fresh/clean install of the new version .. to a new/unique directory.

I then configure the new version to make it look like the version currently in-use.

After everything looks hunky dory, and appears to be working correctly, I place both (old & new) forums in Maintenance mode and copy all the member-accounts and posts (» folders labeled /Members and /Messages) .. from old to new directories.

That's always the trickiest part, cuz there are so many files to copy (more than 15,000). Our old Shared hosting server choked on this file-transfer. The forums contain ~5K threads with 40K posts (which I'd hate to lose).

Our new VPS however, seems to be handling the load much better. And I can now work from the (powerful) Linux shell (command line).

Upgraded the Rad Community Forums to the latest version of YaBB (» v2.3.1), which was released in Jan.04. Had to wait until the mods I use were upgraded to Y.231-compatible.

YaBB = Yet another Bulletin Board

No matter how many times I perform this upgrade, I always get antsy .. about the prospect of losing 40,000 posts (which would suk gigantic goose eggs).

A tech from our ISP come out today (to install wired connections, using the home's pre-existing electrical wiring). But I didn't know he was here (cuz he was working over in the main house).

Immediately after transferring some 15,000 files (to complete the upgrade), I launched the forums to test-n-see if everything was working hunky-dory.

At that very moment, the ISP dude here disconected our wireless gateway, which gave me a bizarre error I'd never seen before .. something like » "Dude, your gateway is completely trashed. Better contact your Internet Service Provider for help."

I panicked. The thought ran thru my head » "Oh my God. I screwed up the forums so bad that they trashed my router gateway .. (which is physically impossible, if you think about it) .. but you know how disorienting untimely error messages can be .. when you're already on edge.

Quick shout-out to Peter S. (who lives in Baltimore). He helped me create a Perl script to change permissions (CHangeMODe) for the files-n-folders (located on the Rad server) that pertain to upgrading (actually installing) YaBB .. something that's been occurring with greater frequency.

YaBB: Yet aother Bulletin Board

Peter read where I wrote (on Jan 6th):

The worst part of "upgrading" YaBB (actually » installing) is chmod'ing all the files (setting file permissions .. to either 755 or 666). There are nearly a thousand files which need permissions set. Tedious maximus. Takes a while. (I hate it.)

I say "he helped me," but actually, he did most of the work himself, leaving only enough undone to help me learn some basic Perl scripting techniques.

We've been trading emails off-n-on (as time permits) the past few weeks. Now I have a script that works perfectly. It will save me untold hours of mind-numbing tedium. So I'm pretty stoked.

Ruby on Rad Rails

|

Updated the VPS guide, which is now 20 pages .. tho the last two are incomplete. I can probably finish it in 25 pages. (No hurry.)

Ruby on Rails

Installed Ruby on Rails today, on my laptop, where it seems to be working fine. Also installed RoR on the Rad VPS, but it seems to be having trouble there. (Problems identified.)

Ruby is a programming (scripting) language (not unlike PHP), known to have elegant syntax. Some even call it artistic.

Rails is a Web Application Framework (not unlike the Zend Framework for PHP) which is built with (and based on) the Ruby scripting language.

HTML compression via Apache mod_deflateBeen reading about web site optimization (WSO), which stresses the importance of small, fast-loading web pages, that are lite on graphics.

First thing I did after analyzing some of my web pages in this cool analyzer .. was to remove the Lightbox script (even tho it was way cool), cuz it was costing me nearly 200-KB. (Ouch!)

Never realized Lightbox was so big. Actually Lightbox itself is only 18-KB, but it uses/needs Prototype.js (which is 124-KB) and Effects.js (which is 40-KB).

Didn't take long, once I delved into the world of WSO, before I began hearing about the virtues of » HTML compression.

Like WinZip for web servers, HTML compression squeezes web pages before sending them to you, which saves bandwidth. (Radified uses ~50 gigs monthly.)

Find recent content on the main index or look in the archives to find all content.