ERROR: Slooooow dooooown... this page load was delayed.


linkchecker - Checks HTML documents for broken links ChangeLog

HOWTO


# linkchecker
# ===========
# Prerequisites:
# Python >= 2.4 (for https support,
#   Python has to have been built against OpenSSL for the socket module)

# As of version 2.3, the path of per-user configuration files have been
# changed from ~/.linkcheckerrc to ~/.linkchecker/linkcheckerrc and the
# blacklist has been changed from ~/.blacklist to ~/.linkchecker/blacklist


# optcomplete 1.2
# ===============
# This Python module is optional and is for bash-completion

cd
test -f installed/optcomplete-1.2.tar.bz2 &&
mv installed/optcomplete-1.2.tar.bz2 .
test ! -f optcomplete-1.2.tar.bz2 &&
wget http://furius.ca/downloads/optcomplete/releases/\
optcomplete-1.2.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "optcomplete-*" -exec rm -r {} \;
tar xjvf ~/optcomplete-1.2.tar.bz2
cd optcomplete-1.2
test $UID = 0 && chown -R root:root .
python setup.py build
su -c "python setup.py install"
cd
mkdir -p -m 0700 installed
rm -f installed/optcomplete-*.tar.*
mv optcomplete-1.2.tar.bz2 installed/


# Psycho
# ======
# This Python module is optional, it provides a speedup for i386
# compatible PCs

cd
test -f installed/psyco-1.5.2-src.tar.gz &&
mv installed/psyco-1.5.2-src.tar.gz .
test ! -f psyco-1.5.2-src.tar.gz &&
wget http://download.sf.net/psyco/psyco-1.5.2-src.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "psyco-*" -exec rm -r {} \;
tar xzvf ~/psyco-1.5.2-src.tar.gz
cd psyco-1.5.2
test $UID = 0 && chown -R root:root .
python setup.py build
su -c "python setup.py install"
cd
mkdir -p -m 0700 installed
rm -f installed/optcomplete-*.tar.*
mv psyco-1.5.2-src.tar.gz installed/


# linkchecker 4.6
# ===============
cd
test -f installed/linkchecker-4.6.tar.gz &&
mv installed/linkchecker-4.6.tar.gz .
test ! -f linkchecker-4.6.tar.gz &&
wget http://download.sf.net/linkchecker/linkchecker-4.6.tar.gz

# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "310a8fce39ef502687d4f6e0d771899d  linkchecker-4.6.tar.gz" | md5sum -c

# Verify tarball w/ sha1sum:
# (this also came from my gpg-verified tarball)
echo "d70a2999458c1700781db66f12c62a67f212d652  linkchecker-4.6.tar.gz" | \
sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 32EC6F3E > /dev/null 2>&1 || gpg --recv-keys 32EC6F3E ) &&
wget -nc http://download.sf.net/linkchecker/linkchecker-4.6.tar.gz.asc &&
  gpg --verify linkchecker-4.6.tar.gz.asc && rm linkchecker-4.6.tar.gz.asc

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "linkchecker-*" -exec rm -r {} \;
tar xzvf ~/linkchecker-4.6.tar.gz
cd linkchecker-4.6
test $UID = 0 && chown -R root:root .

# If it doesn't exist, create the MANIFEST file
test ! -f MANIFEST && python setup.py sdist --manifest-only

# Build it
python setup.py build

# Become root to install it
su

# Back up existing (global) configuration:
test -f /usr/share/linkchecker/linkcheckerrc &&
( mkdir -p -m 0700 ~/backup
   cp /usr/share/linkchecker/linkcheckerrc ~/backup/ )

# To ensure that no files are left around from old versions, I run this to
# blow away everything.  If you'd rather not do something so drastic, make
# sure you read doc/en/index.txt, doc/en/upgrading.txt, etc. and if nothing
# suggests that removing old files is necessary, don't.
rm -f /usr/bin/linkchecker /usr/man/man1/linkchecker.1
find /usr/lib/python*/site-packages -type f -name "_linkchecker_*" \
-exec rm {} \;
find /usr/lib/python*/site-packages -type d -name linkcheck -exec rm -r {} \; \
2> /dev/null
find /usr/man /usr/share/man -type f -name "linkchecker.1" -exec rm {} \;
find /usr/share/locale -type f -name linkchecker.mo -exec rm {} \;
test -d /usr/share/linkchecker && rm -r /usr/share/linkchecker

# Install it
python setup.py install

# Make sure your non-root user owns all of the files in the source
# directory:
chown -R $USER .

# If you want to try the CGI script, this will set it up in
# /usr/local/apache and /usr/local/apache2 (whatever exists).
# There's a FastCGI version in there too (.fcgi).
#
# If you'll be using it remotely, open up the CGI script and change
# ALLOWED_HOSTS and ALLOWED_SERVERS.  http://localhost/ will work as-is
# though, as long as you don't redirect everything to your FQDN...
for dir in /usr/local/apache /usr/local/apache2; do
  test ! -d "$dir" && continue
  ( cd /usr/share/linkchecker/examples
    test -f ${dir}/cgi-bin/lc.cgi &&
     cp -a ${dir}/cgi-bin/lc.cgi ${dir}/cgi-bin/lc.cgi.old
    cp lc.cgi ${dir}/cgi-bin/
    mkdir -p ${dir}/htdocs/linkchecker
    cp check.js *.html* ${dir}/htdocs/linkchecker/
    chown -R root:nobody ${dir}/cgi-bin/lc.cgi ${dir}/htdocs/linkchecker
    chmod 750 ${dir}/cgi-bin/lc.cgi ${dir}/htdocs/linkchecker )
  ( cd ${dir}/htdocs/linkchecker
    cat lc_cgi.html.en | \
     sed 's%/cgi-bin/lconline/lc.cgi%/cgi-bin/lc.cgi%' > \
      lc_cgi.html.en.new
    test -s lc_cgi.html.en.new &&
     mv -f lc_cgi.html.en.new lc_cgi.html.en
    find -type f -exec chown root:nobody {} \;
    find -type f -exec chmod 640 {} \; )
done

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/linkchecker-*.tar.*
mv linkchecker-4.6.tar.gz installed/

# The global config file is /usr/share/linkchecker/linkcheckerrc  If this was
# an upgrade, you'll find your old global config file backed up in ~/backup/

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2007-02-27 11:18am
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]