Hal Fan Hour

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 5 September 2013

gRSShopper Setup Log

Posted on 16:23 by Unknown
This is from another site (more shortly) but I'd like to share he especially for people interested is messing around with gRSShopper but not being able to get it to work. The steps below are actual steps I followed today, warts and all, to set up a new instance of gRSShopper on a clean computer. Perl modules requested had been installed for me (you can see the list below in this post).

1. Test SFTP access to web server - opened Filezilla client and tested SFTP connection to the website with the credentials provided to me. Test succeeded. Located web folders at /var/www/html and /var/www/cgi-bin

2. Test SSH access to web server - opened PuTTY and tested SSH connection to the server with the credentials provided (same as for SFTP). Test succeeded.Test SU with credential provided. Test succeeded.

3. Test mysql access with root password provided. (> mysql -p). Test succeeded.

4. Test Apache server by entering the URL or IP into a web browser. Test succeeded. Test location of web pages by creating a test index page ( in this case, in /var/www/html/index.htm ) using vi. Test succeeded. Changed owner and group to 'apache' and tested again. Test succeeded.

5. Create gRSShopper database on mysql.  > CREATE DATABASE database; 
    Give a user admin privileges: mysql> GRANT ALL PRIVILEGES ON database.* TO user@localhost IDENTIFIED BY 'password'; 

6. Gave my user access to apache group: >usermod -G wheel,apache myusername
and then changed owner and group for /var/www/html and /var/www/cgi-bin from 'root' to 'apache' 
then gave write access to apache to cgi-bin: >chmod 775 cgi-bin

7. Created a UMCourse 'databack' in GRSShopper from the Change 2011 course archive
Ran archive_cgi.sh on downes.ca - this creates an archive of the current version of gRSShopper (which includes the newly created data pack)
 (People who are not me would access the most recent code archive, which includes data packs, from http://sourceforge.net/projects/grsshopper/ or http://grsshopper.downes.ca/code/grsshopper_0.52.tar.gz )

8. Saved grsshopper_0.51.tar.gz from downes.ca and uploaded to UdeM site at /var/www/cgi-bin

9. Used PuTTY to extract the files: tar -zxvf grsshopper_0.51.tar.gz

10. Ran server test script: http://url/cgi-bin/server_test.cgi
This generated an error. Checked error log: > tail /var/log/httpd/error_log
Result was: Exec format error
Downloaded server_test.cgi to my local machine, opened it for editing, and moved the line
    #!/usr/bin/perl
to the very top of the file (even before the comments). Tried it again. This worked. (Went and fixed this in downes.ca so this problem never happens again). 

This script tests for required modules. It's kind of old and told me I was missing  XML::Feed, XML::Feed OPML, XML::LibXML and Net::OpenID::Consumer.

So I rewrote the server environment test to reflect current Perl module requirements (all models are loaded in grsshopper.ph load_modules() if you're interested). I uploaded to downes.ca and also the UdeM site, so in the fulture the server_test.pl script will work a lot better for people. 

I ran the new server_test.cgi script with the following happy results:

gRSShopper web server environment test.

Checking PERL version... OK
Checking for CGI. This module handles form input functions. OK
Checking for CGI::Carp. This module displays error messages. OK
Checking for DBI. This module handles database functions. OK
Checking for LWP. This module connects to other web servers. OK
Checking for LWP::UserAgent. This module emulates a web browser. OK
Checking for LWP::Simple. This module emulates a web browser. OK
Checking for File::Basename. This analyzes file names and is used for file uploads. OK
Checking for File::stat. This examines files and is used for file uploads. OK
Checking for HTML::Entities. This encodes and decodes strings with HTML entities. OK
Checking for Scalar::Util 'blessed'. This is a set of useful utilities. OK
Checking for Text::ParseWords. This is used to extract lists of words from strings (ignoring delimiters insider quotes) OK
Checking for Net::Twitter::Lite::WithAPIv1_1. This connects to Twitter and executes the new Twitter API) OK
Checking for Image::Magick. This connects to Twitter and executes the new Twitter API) OK
Checking for DateTime. This converts dates and times) OK
Checking for DateTime::TimeZone. This manages time zone conversions) OK
Checking for Time::Local. This manages local time) OK
Checking for Digest::SHA1 qw/sha1 sha1_hex sha1_base64/. This excrypts passwords and access tokens) OK

11. I created a secret data directory and placed a file in it called multisite.txt
This file contains the database information for the website. It is a tab delimited file with the following values:
url    database_name    localhost    database_user   user_password
Needless to say it is not included with the gRSShopper distribution. You can edit the top of grsshopper.pl to set the database values, or define the multisite.txt script location at the head of grsshopper.pl (or it defaults to /cgi-bin/data/multisite.txt )
(Note for later use - the capcha table is also located in the data directory)

11. I ran the initialization script by running http://website/cgi-bin/admin.cgi
(this actually redirects to initialize.cgi but I like to run it from admin.cgi just to test admin.cgi and  the redirect).

Result: server error (*rats*). Check the error log again. Error:  Can't locate MIME/Types.pm
Updated server_test.cgi to include MIME::Types  (heh heh)
Used CPAN to install MIME::Types

Once again I ran the initialization script by running http://website/cgi-bin/admin.cgi
This produces, as it should, a large message saying:
gRSShopper Initialization - Unable to Access Database

12. I initialized the database by clicking where it said and got an error:
The requested URL /cgi-bin/initialize.cgi was not found on this server.
I changed the name of the file /cgi-bin/initialize.cgix to /cgi-bin/initialize.cgi
(this is so I don't accidentally run the initialize file on my own site. Heh. You will want to simply remove this file when you're done here.)

12a. Step 1 - database initialization. Check the values in the form. Changed the value of Data Directory to the location of my secret data file. Things like name and tag can be changed later. Clicked submit.

12b. Step 2 - data pack selection. I selected the UMCourse data pack I made earlier. (Note: so long as initialize.cgi remains on your computer, you can switch to any other data pack. You can also create new data packs and switch back and forth. Just be careful - switching data packs will wipe out your existing data, so you must be absolutely sure to save the existing data as a data pack before you switch.) 
The data pack creates directories and database tables for you. It also loads Javascript, Image and CSS files associated with the current install. These sometimes get mixed up and I'll have to fix some stuff below. The installer isn't perfect.

12c. Step 3 - testing the login cookie. It gives me great pleasure to say the cookie has been successfully read.

The installer then creates an admin user ID and anonymous user ID. Note: the default password isn't 'L60iAoNSIza8k' of some such string. It's 'admin'. I need to fix the installer message here.

13. Click the link to be taken back to cgi-bin/admin.cgi where you will be presented with an 'Error' message and a prompt to login.

The link to login was wrong, it's the default http://www.yoururl.ca/cgi-bin/login.cgi at the top of grsshopper.pl  I edited grsshopper.cgi so now if it detects the default (and always wrong) 'yoururl' cgi-bin location, it defaults instead to the (usually right) url/cgi-bin location. If this fix doesn't work for you, you'll have to type the URL of the login.cgi script manually (you can edit the location of your cgi scripts in admin.cgi (though you really shouldn't unless it's messed up, because you'll mess it up)).

Login isn't functioning properly. The problem is that we're using a numerical URL - eg. 123.45.67.89
Normally the system sets the cookie domain by dropping the first part of the URL - eg. www.downes.ca yields a domain of downes.ca -- but this doesn't work for two part domains (like myspace.ca) or for numerical domains. Clearly I need to fix this.

But for now, I edited login.cgi to explicitly set a cookie domain. It's at line 65 --
our ($Site,$dbh) = &get_site("page");        # Get Site Information
$Site->{co_host} = "123.45.67.89";

and this works just fine.

14. I forgot to include the 'boxes' in my UMCourse data pack so there are none. Also, all the URLs for the scripts and CSS in the templates are wrong. Also, the page data wasn't saved. I don't know why. I need to revise this part of the data pack creation script, maybe. Anyhow, I can sort of start from scratch. I can create boxes, pages and other content using the admin screen. In this case, I simply copied the box and page content from the change.mooc.ca site to get us started here.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Blogs in Education
    Submission for a forthcoming STRIDE handbook for The Indira Gandhi National Open University (IGNOU). See related handbooks here . What is a ...
  • Learning and Performance Support Systems
    This post is to introduce you to our Learning and Performance Support Systems program, a new $19 million 5-year initiative at the National R...
  • McLuhan - Understanding Media - Summary of Chapters 11-14
    My contribution to the Understanding Media Reading Group Chapter 11 McLuhan writes, in Chapter 11 of Understanding Media, that "The mys...
  • Making Up Facts
    I think I'll stop reading Willingham if he persists in making stuff up. He writes, "Prior knowledge is vital to comprehension beca...
  • Concepts
    On 2013-10-12 9:02 AM, Matthias Melcher wrote: If we consider, on one hand, all the aggregated connection patterns that make up a simple con...
  • On Populist Social Media, Twitter and Egypt
    Source: For the Right to Look Good observations : the members of the various lists you mention are among the smartest and most attentive peo...
  • Review: The Edupunks' Guide, by Anya Kamenetz
    I have now had the chance to read The Edupunks' Guide and can now form some opinions based on what I've seen. And if I were forced ...
  • The Large Industries, and Development
    Responding to David W. Campbell, Big Fish/Small Fish The small point first: could we have a link to Desjardin where he asserts "a caval...
  • When Words Lose Meaning
    In which I explain what I meant by my comment to this post from Doug Johnson. I commented, "If the word is not the thing, how do you e...
  • Where the Future Lies
    Responding to Durff's Blog In a post today I summarized Bill Cushard in Mindflash as follows: If I had to summarize the best advice I c...

Categories

  • #change11
  • Connectivism
  • http://www.blogger.com/img/gl.link.gif
  • Shakespeare

Blog Archive

  • ▼  2013 (68)
    • ►  December (1)
    • ►  November (5)
    • ►  October (6)
    • ▼  September (7)
      • Foradian Technologies Interview
      • Two Comments on 'Open'
      • Notes from ALT-C
      • gRSShopper Setup (2)
      • gRSShopper Setup Log
      • 'Completely Wrong' but Not In Error
      • Moncton's Downtown Debate
    • ►  July (3)
    • ►  June (5)
    • ►  May (6)
    • ►  April (18)
    • ►  March (8)
    • ►  February (2)
    • ►  January (7)
  • ►  2012 (56)
    • ►  December (3)
    • ►  November (7)
    • ►  October (7)
    • ►  September (7)
    • ►  August (2)
    • ►  July (2)
    • ►  June (3)
    • ►  May (1)
    • ►  April (5)
    • ►  March (6)
    • ►  February (6)
    • ►  January (7)
  • ►  2011 (86)
    • ►  December (7)
    • ►  November (11)
    • ►  October (8)
    • ►  September (6)
    • ►  August (1)
    • ►  July (8)
    • ►  June (7)
    • ►  May (10)
    • ►  April (2)
    • ►  March (4)
    • ►  February (11)
    • ►  January (11)
  • ►  2010 (108)
    • ►  December (9)
    • ►  November (9)
    • ►  October (12)
    • ►  September (4)
    • ►  August (6)
    • ►  July (10)
    • ►  June (9)
    • ►  May (9)
    • ►  April (9)
    • ►  March (12)
    • ►  February (9)
    • ►  January (10)
  • ►  2009 (85)
    • ►  December (3)
    • ►  October (8)
    • ►  September (7)
    • ►  August (4)
    • ►  July (15)
    • ►  June (5)
    • ►  May (7)
    • ►  April (6)
    • ►  March (17)
    • ►  February (7)
    • ►  January (6)
  • ►  2008 (94)
    • ►  December (5)
    • ►  November (7)
    • ►  October (7)
    • ►  September (6)
    • ►  August (16)
    • ►  July (11)
    • ►  June (6)
    • ►  May (6)
    • ►  April (5)
    • ►  March (4)
    • ►  February (7)
    • ►  January (14)
  • ►  2007 (3)
    • ►  December (3)
Powered by Blogger.

About Me

Unknown
View my complete profile