ISFDB:Personal Linux Website (Fedora Core)

From ISFDB
Jump to navigation Jump to search

Prerequisites

Out of the box, Fedora Core has a minimal configuration, so many packages will need to be installed. Packages on Fedora Core are installed with dnf instead of apt-get, and package names may differ from those on other distros.

  • dnf install gcc
  • dnf install make
  • dnf install tar
  • dnf install zip.x86_64
  • dnf install bzip2.x86_64
  • dnf install wget
  • dnf install mod_dav_svn subversion
  • dnf install telnet
  • dnf install ImageMagick

Apache

  • dnf install httpd
  • firewall-cmd --add-service=http --add-service=https --permanent
  • Add to etc/httpd/httpd.conf: LoadModule dir_module modules/mod_dir.so
  • Change etc/httpd/httpd.conf: DirectoryIndex /cgi-bin/index.cgi index.html index.html.var
  • systemctl enable httpd
  • systemctl start httpd

MySQL

  • dnf update
  • dnf module enable mysql:8.0
  • dnf install @mysql
  • systemctl enable mysqld
  • systemctl start mysqld
  • Issue: mysql
  • While in mysql, issue the command: create database isfdb;
  • While in mysql, issue the command: use isfdb;
  • While in mysql, issue the command: alter database isfdb character set latin1 collate latin1_swedish_ci;
  • While in mysql, issue the command: source <<backupfile>>;'
  • create user isfdb1@localhost identified by <<PASSWORD>>;
  • GRANT ALL PRIVILEGES ON isfdb.* TO 'isfdb1'@'localhost';
  • Add the following to /etc/my.cnf.d/mysql-server.cnf:
    • sql-mode="NO_ENGINE_SUBSTITUTION"

Python 2.7.18

  • dnf install python2
  • dnf install python2-devel
  • dnf install mysql-devel
  • python2 -m ensurepip --no-default-pip
  • pip install --upgrade pip
  • pip2 install mysqlclient
  • alternatives --install /usr/bin/python python /usr/bin/python3.9 2
  • alternatives --install /usr/bin/python python /usr/bin/python2.7 1
  • alternatives --config python
  • Issue: python --version to ensure you are not on python3.

ISFDB

  DBASE           = "isfdb"
  DBASEHOST       = "localhost"
  DO_ANALYTICS    = 0
  HTFAKE          = "/your_host_name/cgi-bin"
  HTMLHOST        = "your_host_name"
  HTMLHOST_ALT    = ""
  HTMLLOC         = "your_host_name"
  PASSWORD        = ""
  PROTOCOL        = "http"
  USERNAME        = "isfdb1"
  LEGACY_PASSWORDS= 1
  UNICODE         = "iso-8859-1"
  WIKILOC         = "your_host_name/wiki"
  • Note that you will want to set LEGACY_PASSWORDS to 1. This will use the old md5 hashing algorithm when logging into your system. This will match the md5 algorithm used by create_user.py to create an account.
  • Note that HTMLHOST_ALT is normally set to an empty string for personal Web sites. You can set it to an alternative host name if using a real domain name as opposed to "localhost", e.g. "isfdb.org" if HTMLHOST is "www.isfdb.org".
  • Issue: make -B

Enable ISFDB Editing

The ISFDB relies on MediaWiki to register users. In the personal Linux setup without MediaWiki's PHP-based software, this is not possible. A Python script is provided to update the appropriate MediWiki tables to allow editing permissions. After everything is installed and you are able to view ISFDB Web pages, run the following command:

isfdb/scripts/create_user.py LoginName password

This will insert the login name and encrypted password into the correct tables. By default, the new user will be a moderator as well as a bureaucrat. If you want to create a non-privileged user, pass "0" as the third parameter.