linkchecker/doc/install.txt

136 lines
4.4 KiB
Text
Raw Normal View History

2009-03-11 22:29:50 +00:00
Installation
============
If you are upgrading from older versions of LinkChecker you should
2011-07-25 17:44:12 +00:00
also read the upgrading documentation stored in upgrading.txt.
2009-03-11 22:29:50 +00:00
2014-04-24 17:42:50 +00:00
Setup with pip
------------------
If pip_ is available, this command should install LinkChecker on
the local system:
2020-08-23 16:24:09 +00:00
``pip3 install git+https://github.com/linkchecker/linkchecker.git``
.. _pip: https://pypi.org/project/pip/
2009-03-11 22:29:50 +00:00
2011-04-14 10:21:37 +00:00
Setup for Windows
-----------------
Python from the Microsoft Store does include pip_, but installing
within Windows Subsystem for Linux (WSL) is the preferred option:
https://docs.microsoft.com/en-us/windows/python/beginners
2011-04-14 10:21:37 +00:00
Setup for macOS
2011-04-14 10:21:37 +00:00
------------------
Python from Homebrew includes pip_. Otherwise ``get-pip.py`` can be used to
install pip_ (untested):
https://pip.pypa.io/en/stable/installing/
2011-04-14 10:21:37 +00:00
2011-07-25 17:44:12 +00:00
Setup for GNU/Linux
-------------------
On all major Linux distributions (Debian, Mandriva, Redhat, Suse, Ubuntu),
2020-08-23 16:24:09 +00:00
the ``linkchecker`` package is available for installation. pip_ will be
available, often as a package e.g. ``python3-pip``, to install the latest
LinkChecker.
2011-07-25 17:44:12 +00:00
Manual setup for Unix systems
-----------------------------
2011-04-14 10:21:37 +00:00
First, install the required software.
2009-03-11 22:29:50 +00:00
1. Python >= 3.5.0 from https://www.python.org/
2009-03-11 22:29:50 +00:00
Be sure to also have installed the included distutils module.
On most distributions, the distutils module is included in
an extra ``python-dev`` package.
2. Python requests package from https://pypi.org/project/requests/
3. Python Beautiful Soup package from https://pypi.org/project/beautifulsoup4/
2016-01-23 12:28:15 +00:00
4. *Optional, for bash-completion:*
argcomplete Python module from https://pypi.org/project/argcomplete/
2009-03-11 22:29:50 +00:00
2016-01-23 12:28:15 +00:00
5. *Optional, for displaying country codes:*
GeoIP from https://pypi.org/project/GeoIP/
2009-03-11 22:29:50 +00:00
2016-01-23 12:28:15 +00:00
6. *Optional, used for Virus checking:*
ClamAv from https://www.clamav.net/
2009-03-11 22:29:50 +00:00
2016-01-23 12:28:15 +00:00
7. *Optional, for GNOME proxy setting parsing:*
PyGObject and GIO.
Best installed from your distribution e.g. ``python3-gi``
2009-03-11 22:29:50 +00:00
2016-01-23 12:28:15 +00:00
8. *Optional, to run the WSGI web interface:*
Apache from https://httpd.apache.org/
mod_wsgi from https://pypi.org/project/mod-wsgi/
2009-03-11 22:29:50 +00:00
Note for developers: if you want to regenerate the po/linkchecker.pot template
from the source files, you will need xgettext with Python support. This is
available in gettext >= 0.12.
2009-03-11 22:29:50 +00:00
2011-04-14 10:21:37 +00:00
Now install the application.
2009-03-11 22:29:50 +00:00
2016-01-23 12:28:15 +00:00
1. Compile Python modules
2009-03-11 22:29:50 +00:00
Run ``python setup.py sdist --manifest-only`` to create the MANIFEST
file.
Run ``python setup.py build`` to compile the Python files.
For help about the setup.py script options, run
``python setup.py --help``.
2016-01-23 12:28:15 +00:00
2.
2009-03-11 22:29:50 +00:00
a) Installation as root
2011-04-14 10:21:37 +00:00
Run ``sudo python setup.py install`` to install LinkChecker.
2009-03-11 22:29:50 +00:00
b) Installation as a normal user
Run ``python setup.py install --home $HOME``. Note that you have
to adjust your PATH and PYTHONPATH environment variables, eg. by
adding the commands ``export PYTHONPATH=$HOME/lib/python`` and
``export PATH=$PATH:$HOME/bin`` to your shell configuration
file.
For more information look at the `Modifying Python's search path`_
documentation.
.. _Modifying Python's search path:
2020-08-23 16:24:09 +00:00
https://docs.python.org/3/install/#inst-search-path
2009-03-11 22:29:50 +00:00
After installation
------------------
LinkChecker is now installed. Have fun!
WSGI web interface
2009-03-11 22:29:50 +00:00
-----------------------
The included WSGI script can run LinkChecker with a nice graphical web
2009-03-11 22:29:50 +00:00
interface.
You can use and adjust the example HTML files in the lconline directory
to run the script.
2011-07-25 19:37:35 +00:00
1. Note that running LinkChecker requires CPU and memory resources.
Allowing a WSGI script to execute such a program for possibly a
2009-03-11 22:29:50 +00:00
large number of users might deplete those resources.
Be sure to only allow access from trusted sites to this script.
2. Copy the script lc.wsgi in the WSGI directory.
2009-03-11 22:29:50 +00:00
3. Adjust the "action=..." parameter in lconline/lc_cgi.html
to point to your WSGI script.
2009-03-11 22:29:50 +00:00
4. If you use Apache, copy config/linkchecker.apache2.conf
into your Apache configuration directory (eg. /etc/apache2/conf.d)
and enable it.
5. Load the lconline/index.html file, enter an URL and click on the
2010-07-29 19:04:58 +00:00
check button.
2009-03-11 22:29:50 +00:00
6. If something goes wrong, check the following:
2009-03-11 22:29:50 +00:00
a) look in the error log of your web server
b) be sure that you have enabled WSGI support in your web server,
for example by installing mod_wsgi for Apache
c) be sure that you have enabled the negotiation and versioning
modules for Apache:
a2enmod version
a2enmod negotiation