Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
HOWTO: Installing Scoop with Apache2 on Debian New Code
By theantix , Section Code []
Posted on Fri Mar 10, 2006 at 12:00:00 PM PST
Something I did for myself, but I've noticed a couple other people wanting to do the same or similar thing so here is a HOWTO on the steps I used to accomplish this purpose.

(Note: every use of "example.com" in the following steps should be replaced by your desired hostname.  This should be obvious, but sometimes it's not.)

Step 1: Install Apache2, MySQL

This is the easiest part, run: "sudo apt-get install apache2 mysql-server".  This is not an Apache2 or MySQL tutorial though, so get that configured the way you like to and move on to the next step.  Make sure you get and remember the administration password for mysql because you'll need that later.  Hint:  If you do forget (shame on you), you can always check /etc/mysql/debian.cnf and reset the password based on what is in there.

Step 2: Prepare our build environment

Lots of people have different ways to build, if you don't have one already just follow these instructions.

run:

sudo mkdir -p /usr/local/src/
sudo chown `whoami` /usr/local/src/
sudo mkdir -p /var/www/example.com
sudo chown `whoami` /var/www/example.com

The "normal" installation grabs source from CPAN and compiles the modules for you, which can sometimes be a frustrating for installing scoop.  Since you're using Debian though, you don't have to as most of what you need is conveniently available in precompiled package form.

run:
"sudo apt get install build-essential libcrypt-cbc-perl libcrypt-rijndael-perl wwwconfig-common libdbi-perl libdata-showtable-perl libmd5-perl libterm-readkey-perl libdbd-mysql-perl  libapache-dbi-perl libapache-mod-perl libclass-singleton-perl libcrypt-unixcrypt-perl libcrypt-blowfish-perl  libmail-sendmail-perl  libstring-random-perl libtime-modules-perl libimage-size-perl  liburi-perl  libhtml-tagset-perl  libhtml-parser-perl libwww-perl libxml-parser-perl libxml-rss-perl libextutils-xsbuilder-perl libapache2-mod-perl2-dev apache2-dev wget checkinstall cvs apt-file"

It's a mouthful, but it should install everything you need in my experience.  If I missed something, please let me know in a comment and I'll try to get an admin to edit the article accordingly.

Step 3: Install Apache2::Request

Unfortunately as of this time Debian has yet to package Apache2::Request, which we need to run scoop on Apache2.  So we'll download and compile that now:

as a normal user account, run:

cd /usr/local/src
wget http://apache.oregonstate.edu/httpd/libapreq/libapreq2-2.07.tar.gz
tar xzvf libapreq2-2.07.tar.gz
cd libapreq2-2.07
./configure --with-apache2-apxs=`which apxs2` --enable-perl-glue
make
sudo checkinstall --nodoc
(follow checkinstall instructions, defaults are ok)

Step 4: Grab Scoop from CVS

run:

cd /usr/local/src
cvs -d:pserver:anonymous@scoop.versionhost.com:/cvs/scoop login
(password: 'anonymous')
cvs -z3 -d:pserver:anonymous@scoop.versionhost.com:/cvs/scoop co scoop

Step 5: Configure Scoop

run:

cd /usr/local/src/scoop
scripts/install.pl
(yes to continue)
(yes to continue)
(enter to default path suggestion)
(yes to configure database)
(follow the steps to configure your database according to your local settings)
(enter to default apache server suggestion)
(enter to default mysql server suggestion)
(enter to default mysql port suggestion)
(1 to create a new database)
(your preferred database name goes here)
(enter to default DB Dump)
(follow the instructions to set your URL path)
(your preferred scoop administration account name, password, email address)
(No to configure apache)
cp -r /usr/local/src/scoop/html/* /var/www/example.com

Step 6: Configure and install Apache2/Scoop file

The process to configure apache we declined in Step 5 is something we have to do manually now.  In your favourite text editor, paste the following text:


NameVirtualHost *
<VirtualHost *>
  ServerName example.com
  ServerAlias www.example.com
  DocumentRoot /var/www/example.com

  UserDir disabled

  PerlModule mod_perl2
  PerlModule Bundle::Apache2
  <Perl>
    use lib qw( /usr/local/src/scoop/lib );
    require "/usr/local/src/scoop/etc/startup.pl";
    $Location{"/"} = {
        SetHandler => "perl-script",
        PerlHandler => "Scoop::ApacheHandler",
        Options => "ExecCGI",
    };
  </Perl>

    PerlSetVar DBType mySQL
    PerlSetVar mysql_version 3.23
    PerlSetVar db_name example     #your database name, usually "scoop"
    PerlSetVar db_host localhost
    PerlSetVar db_user example     #your mysql username, usually "scoop"
    PerlSetVar db_pass example     #your mysql password
    PerlSetVar cookie_host .example.com    #notice the preceding dot, it's important
    PerlSetVar SMTP localhost
    PerlSetVar site_id myscoopsite
    PerlSetVar site_key 94abb6d940dc52d6a6409f30038d8c5ca59493e2c5544d95d74342bb  #needs to be unique
     PerlSetVar dbdown_page /pages/dbdown.html

  PerlRequire /usr/local/src/scoop/etc/startup.pl

  # If you're running scoop in a subdirectory, what you answered in (enter to default path suggestion) in step 5, the following <Location> tags need to be be updated as well.

  <Location />
    SetHandler perl-script
    PerlHandler Scoop::ApacheHandler
  </Location>

  <Location /images>
    SetHandler default-handler
  </Location>

  <Location /pages>
    SetHandler default-handler
  </Location>

  <Location ~ "^/(robots.txt|favicon.ico)$">
    SetHandler default-handler
  </Location>

</VirtualHost>

Whew.  Now save/upload that to /etc/apache2/sites-available/example.com and run:
"sudo ln -s /etc/apache2/sites-available/example.com /etc/apache2/sites-enabled/example.com"

Step 7: Patch Scoop for Apache2

Now you're going to need to patch your scoop files to run on Apache2 instead of the Apache1 that scoop expects.  I've done the work already and created a patch against the current scoop cvs, but if you don't trust me I explain what needs to be done in a postscript and you can re-write it yourself.
run:

cd /usr/local/scoop/
wget http://www.ryanthiessen.com/uploads/ryanthiessen-apache2-c.diff
patch -p0 < ryanthiessen-apache2-c.diff

Step 8: restart Apache2

run:
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start

That's it!  You should be up and running with scoop on Apache2 now.  Please let me know if these instructions fail in any way, and I'll try to update them accordingly.

Notes:

This HOWTO suggests that you do certain things that other people have different ideas about and some administrators do things different ways.  I suggest using "sudo command" instead of "su root; command" and so adjust your system accordingly.  I also use "checkinstall" instead of "make install", but again that's a judgement call so if you know what you're doing and prefer that just substitute that and it's ok.  I suggest "/usr/local/src" as your compile directory, but if you have another one that is fine.  I suggest you place your html files (Apache2 DocumentRoot) at /var/www/example.com but if you've got another scheme already use that instead and adjust accordingly.

Finally, these were all tested on Ubuntu, but any debian or debian-derived distribution should work the same.

Troubleshooting:

  • If the Apache log tells you that you are missing a file "Example::Example.pm", try running "sudo apt-file update; apt-file search Example/Example.pm" and see what package that file exists in and then install the appropriate package with apt-get.
  • If you're having trouble installing libapreq2, it's possible that a build tool is required that I didn't mention in the prerequisites.
  • If you're having trouble with checkinstall, just use "make install" instead.  checkinstall is just a front-end that creates a .deb package so you can easily remove it later, but it's not required.
  • This is a kludge, hopefully there will be a smoother way to install scoop on apache2 using default installation procedures.  Until that time though, I hope this guide is helpful to those who need it.

    PS: Scoop Patch explanation

    (this is only for people who want to know what the patch does:)

    As you can see, there were some minor changes to startup.pl that I
    could not track down: I could not figure out how that was supposed to
    work with mod_perl2 and so I just commented it out.

    The biggest change follows in the different from the way that
    Apache::Request and Apache2::Request work.  Unlike the older version,
    Apache2::Request needs the object directly from the handler to
    construct the request object that scoop needs.  But once it does in
    ApacheHandler and Scoop it handles fine.

    The majority of the patch is adjusting for that change in variable
    passing and in simply renaming from apache::request to
    apache2::request.

    And finally, I have to note that I have not yet tested file uploads
    but they will most likely not work at all but will be pretty trivial
    to rewrite for apache2::Request if need be.

  • < What should we use in 425 HM? | The mailing list archives have returned >

    Menu
    · create account
    · faq
    · search
    · report bugs
    · Scoop Administrators Guide
    · Scoop Box Exchange

    Login
    Make a new account
    Username:
    Password:

    Poll
    Scoop on Apache2.X?
    · w00t 33%
    · I'll wait until I don't have to use this kludge, thanks 33%
    · get file uploads working too while you're at it, lazy you theantix bastard 0%
    · - 0%
    · theantix was here 33%

    Votes: 3
    Results | Other Polls

    Related Links
    · Scoop
    · More on New Code
    · Also by theantix

    Story Views
      163 Scoop users have viewed this story.

    Display: Sort:
    HOWTO: Installing Scoop with Apache2 on Debian | 22 comments (22 topical, 0 hidden)
    Notes, Part 1 of a series (5.00 / 1) (#1)
    by theantix on Fri Mar 10, 2006 at 11:56:58 PM PST

    The comments in your http config file (Step 6) should be removed otherwise you'll get a perlsetvar error.



    Rock on! (none / 0) (#2)
    by Vladinator on Mon Mar 13, 2006 at 05:36:33 PM PST

    Excellent! When will file uploads work??? :-D

    "Even Marylin Monroe was a man, but this tends to get overlooked by our motherfixated overweight sexist media." -- Robyn Hitchcock and the Egyptians


    'nother mod_perl 2.0 change (none / 0) (#3)
    by gem on Sun Apr 02, 2006 at 10:53:25 PM PST

    Thank you for this! Getting Scoop on Apache 2 has been driving me nuts. A few lose ends send_http_header() from mod_perl 1.0 does not exist in mod_perl 2.0. If the DB is down then this patch does not display the Scoop error pages, instead I get an Apache double error page. Not exactly sure the proper fix but the mod_perl 2.0 doc implies these changes work: send_http_header( $s) to: content_type( $s) Or load Apache::compat Not being a perl coder I found it easier to get the DB password right...



    'nother mod_perl 2.0 change (none / 0) (#4)
    by gem on Sun Apr 02, 2006 at 11:36:02 PM PST

    Take 2. In the config file. After this: PerlModule mod_perl2 PerlModule Bundle::Apache2. I added this, which defined some of the obsolete mod_perl funcs like send_http_headers: PerlModule Apache2::compat



    Another nit (none / 0) (#5)
    by gem on Mon Apr 03, 2006 at 02:19:18 AM PST

    I was still getting error messages in my logs. The fix was in this file: scoop/lib/Scoop/ApacheHandler.pm. Change this line: return $Scoop::MP2 ? &Apache::DECLINED : &Apache::Constants::DECLINED; to this: return Apache2::Const::DECLINED;



    Installing on debian stable (sarge) (none / 0) (#7)
    by TomR on Mon Mar 05, 2007 at 05:10:06 AM PST

    Thanks for the helpful guide. I am up against a small snag. On debian stable (sarge), the module supplied is Apache2::Apache::Request and not Apache2::Request. They seem to work in slightly different ways, although I have not delved into it any further than to attempt to fix by replacing occurances of one with the other in the source code. :)

    The module is provided by the libapache2-request-perl package, which in later versions of debian actually provides Apache2::Request as your patch uses. Would it be possible to have a look and see if it could be made to work with debian stable as well as debian unstable? Thanks.



    Excellent! When will file uploads work??? :-D (none / 0) (#9)
    by GrafikerBurak on Tue Dec 30, 2008 at 04:10:22 AM PST

    Excellent! When will file uploads work??? :-D O Benim Başkanım Yerel Seçimler Tiga Karadeniz Nettim.Net Skibbe Sınav Sonuçları Renkli Müzik Pursaklar



    jewelry (none / 0) (#10)
    by Briace0422 on Wed Jan 21, 2009 at 07:31:32 PM PST

    wholesale jewelry handmade jewelry jewelry wholesale handcrafted jewelry crystal jewelry wholesale pearl



    jewelry (none / 0) (#11)
    by Briace0422 on Wed Jan 21, 2009 at 07:35:43 PM PST

    wholesale jewelry fashion jewelry jewelry wholesale handmade jewelry pearl jewelry wholesale crystal jewelry discount jewelry



    Some Scoop Powered links (none / 0) (#12)
    by jackcooper on Mon Feb 16, 2009 at 10:06:56 AM PST

    LUXUS 2 SCHEIBEN SANDWICHTOASTER MIT 750 WATT MIT EDELSTAHL EINLAGE INKL. BACKAMPEL FÃoeR PERFEKTEN TOASTGENUSS PANASONIC ET-RM300 Vollfunktions Fernbedienung fuer PT-LC56/76/80 PT-LB10/LB20 Serie JBL GTO 937 Auto-Lautsprecher Optoma DS306 Daten-Video-Projektor SVGA KEF Standlautsprecher IQ 90 esche schwarz -Paar- Olympus LSH-1326 Objektivtasche (35-100 mm 1:2.0) Designjet Z2100 1.118 mm Fotodrucker PC-72 Thermopaperroll USB WEBCAM MIT BEWEGUNGSERKENNUNG Nikon AF-S DX 4,0-5,6/55-200 VR Sharp AL 1644 G Digitaler Kopierer Nokia E90 black Handy ohne Branding DVP390 DVD-Radio + FUN8 TFT DISPLAY SET: Canon PIXMA iP100w Tintenstrahldrucker + Akku Blaupunkt GTX 662 2-Wege-Autolautsprecher Fujitsu Siemens Amilo Pi 2515 15,4 Zoll WXGA Notebook (Intel Core 2 Duo T5250, 1,5 GHz, 2GB RAM, 160GB HDD, IX3100, DVD+-RW DL, Vista Premium) Hewlett-Packard 38 Tintenpatrone magenta hell mit pigmentierter Tinte, 440 Fotos Krups F 893-41 Nespresso Espressomaschine Grau Siemens Gigaset C450 colour, Schnurloses DECT-Telefon mit Farbdisplay, weiß doro PhoneEasy dect 315, Schnurlostelefon mit einfachster Bedienung und extra großen Tasten, weiß Hewlett Packard w19b 19 Zoll wide screen TFT-Monitor silber DVI (Kontrast 700:1, 5ms Reaktionszeit) Gerätehalter Becker Traffic Assist Pro 7916 BenQ-Siemens CL71 Black Handy ohne Branding Nokia 7600 grau Handy ohne Branding



    Nhà &#273;&#7845;t H&#7841; Long (none / 0) (#14)
    by doanthean on Sat Apr 09, 2016 at 08:43:53 PM PST

    Nhà đất Hạ Long, rao vặt nhà đất , bất động sản chuyên biệt tại tp. Hạ Long , bat dong san Quang Ninh , rao vat quang ninh , nha dat ha long



    thank you (none / 0) (#15)
    by lynnlibbrecht on Fri Dec 15, 2017 at 02:46:32 AM PST

    Your article is good and meaningful .* Gmail login



    payday loans (none / 0) (#16)
    by Pervez on Sun Apr 01, 2018 at 09:17:49 PM PST

    This can be the superb eye-catching information. I am delighted in relation to your existing top notch runs. Everyone located sincerely rewarding facts. Go on. Keep publishing some sort of blog site. Currently simply click here payday loans Going to thinking about the subsequent document.



    Thank you (none / 0) (#17)
    by scdobre on Wed May 23, 2018 at 01:26:45 AM PST

    Thank you for sharing! I'm looking for this code. gmail account login



    homedepot survey (none / 0) (#18)
    by willams78w on Fri Jun 08, 2018 at 10:22:20 AM PST

    The Home Depot or Home Depot company proved that. Home Depot has always strived to give good quality in their products and services. home depot survey | homedepot survey



    Liam (none / 0) (#20)
    by Scoopista on Fri Oct 05, 2018 at 01:15:44 PM PST

    At first, it was really hard for me to install it on my own. I had asked several people before they also found it confusing. Thanks to this step by step guide! fence installation charlotte nc



    muneer (none / 0) (#21)
    by Muneer1 on Thu Dec 27, 2018 at 03:12:43 AM PST

    I was very impressed by this post, this site has always been pleasant news Thank you very much for such an interesting post, and I meet them more often then I visited this site. Kalendar 2019



    Essay (none / 0) (#22)
    by GageAmber on Tue Jan 01, 2019 at 05:24:53 AM PST

    I did so have fun with perusing content pieces circulated on this internet site. They've been awesome as well as a considerable amount of effective advice. Tax Advisors



    asdas (none / 0) (#23)
    by Muneer1 on Mon Jan 07, 2019 at 05:10:57 AM PST

    I can set up my new idea from this post. It gives in depth information. Thanks for this valuable information for all,.. Leucocytes bas



    HOWTO: Installing Scoop with Apache2 on Debian | 22 comments (22 topical, 0 hidden)
    Display: Sort:

    Hosted by ScoopHost.com Powered by Scoop
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

    create account | faq | search