So, now that I have a Mint Linux installation running off a network drive, I wanted to start learning some of the new web stuff we’re going to be using. In fact, the entire campus will be using it, so while the Web Librarian gets to do this in detail, I just have to get some basics down so I can backstop him (and in the immortal words of Snoopy, “I hope that an emergency will never occur.”). Besides, this is a good way to keep my own 20th-century hand in.
First, I’m starting with Drupal, which is, essentially, a system software for setting up well-integrated websites (well, for our purposes, that’s what we needed it to do). I just need to do this on a local PC for my own practice, not actually have it open on the Internet, so I’m not going to worry much about security while I practice on this (so only do this at home, kids — in the real world, you gotta lock it all up tightly).
Now the apparent method would be to check the Mint Linux Synaptic Package Manager and find the Drupal package, and install it.
But, looking at Drupal for Dummies (Lynn Beighley, 2010), it becomes clear that I need some other stuff first. Mint doesn’t come with all the necessary web server stuff installed, but then again, why should it? You only add that if you need it. Now I do.
Drupal needs, the book says, Apache, MySQL and PHP installed first. I could do that by just using the Linux package installer, but I could also miss parts of what I need. Better if I can get a complete package of all of that together (and trust me, I learned the hard way first).
The book recommends XAMPP (formerly LAMPP) from http://www.apachefriends.org/en/xampp.html so I go there using Firefox in Linux (since I’m going to download it to the Linux system anyway). (If I’d wanted to do it on a Windows system, the book recommends http://www.wampserver.com for WAMP, and there’s a Mac alternative as well.)
Hmmm… XAMPP “distribution for Linux systems (tested for SuSE, RedHat, Mandrake and Debian) contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.” That should do it.
Firefox wants to open it with the Archive Manager (since it is a compressed file). When the download finishes, Archive Manager pops up but it hasn’t got permission to extract it where I need it. Typical Linux. Ignore the Archive Manager and just download it.
Instructions are given at the LAMPP site for installation, however.
The file is in /tmp so I open a terminal (you may as well keep it open, too), become su (superuser) and go into the /tmp and tell it:
tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt
to extract to the /opt directory.
I change to the root directory. Now I use /opt/lampp/lampp start to start the LAMPP installation.
That works. It starts up several things and finishes.
I open another Firefox tab and send it to http://localhost/ and I get a LAMPP screen. Looks good.
One of the choices on the LAMPP site is for English, so I click on that.
On the left, a sidebar of operations… and the phpadmin that I need next. Click on phpadmin.
I have to create a database, so I fill in the name drupal and click on Create for that. No other changes at this point. Important detail to note: the username for the database is root@localhost so make a note of all that.
Now, a new Firefox tab and go to drupal.org for the latest version of that. Turns out to be version 6.19.
Now comes the tricky part. The book gets extremely vague and says to copy it to “your local Web server directory.” And to limit the name to just “drupal.”
I’ll save you the trial-and-error. It goes into /opt/lampp/htdocs and you can use (in Terminal) the move/rename command mv with the before and after versions of the name: mv drupal-6.19 drupal. (You are still in su mode, right?)
(I haven’t worked so heavily with operating system commands since I got past Windows 95. Just keep the Terminal program open through all this.)
Following that, you can use Firefox to go to http://localhost/drupal and get the Drupal install screen.
“Install Drupal in English”. Sounds simple enough. Nope — too simple. I’ll give the trial-and-error here, finishing with the solution.
It first wants me to get back into the /opt/lampp/htdocs/drupal/sites/default directory and rename a file: mv default.settings.php settings.php so Drupal has some starter settings to use.
Still not cooperating. Change the permissions: chmod o+w settings.php so anyone can change it. This is the command in the install.txt file that came with Drupal. So I go back through all the directories and subdirectories, just in case, and do the chmod o+w for all of them.
Now it shows a screen for “Database configuration” and I enter the drupal name that I created earlier. The username is root and the password is blank. (Yes, not good security, but this is only for my training on this and not for general Internet consumption.)
And… it won’t accept it. The advanced options just has the host name which is, of course, localhost. The username will not accept anything with a @ symbol so that’s out. The link for XAMPP to MySQL documentation (which is what the book refers me to) is broken. <sigh>
I checked the web, and found that in an older version of Drupal, the kink was in the settings.php file. Some people just changed the link info for the database in that file.
However, I checked the install.txt file in the drupal directory. It talked about renaming the default.settings.php file — but it also offered the option to simply create a blank file of the proper name.
Solution: So, I created an empty file in the right place named settings.php and gave it a chmod 777 settings.php to open up permissions.
Then I tried to do the “Database configuration”. It worked. Go figure. Apparently, it just needed to do its own thing with that settings file without any previous guessing. It couldn’t create the file, but it could fill it in after that.
Now I got to “Configure site”. The book says change the localhost name to a title that makes sense for your current site. I used (of course!) OverautomatedLibrarian. (I wasn’t sure if it would take a space or a hyphen, and at this point, I just wanted to get past the hurdle.)
I entered an email address, set an administrator name and password, checked the time zone, made sure Clean URLS and update notification were both on.
I got a configuration complete message with a pink warning that it could not send emails. Might be something with being run in VirtualBox?
Now http://localhost/drupal gets me my new site with “OverautomatedLibrarian” displayed at the top. I’m finally up to Chapter 3 in Drupal for Dummies.
Whew! Shadrach, Meshach, and Tobedwego….
Filed under: Drupal, Linux, software | Tagged: Drupal | Leave a comment »