Installation Manual for 2.16 on Amazon Linux 2

From WeBWorK_wiki
Jump to navigation Jump to search

These instructions cover the installation of WeBWorK 2.16 for Amazon Linux 2. For the prebuilt Amazon Machine Image (AMI), see WeBWorK Amazon Machine Images (AMI's).

Architecture

These instructions assume some familiarity with the Amazon EC2 environment. They also assume that WeBWorK will use an RDS instance and not run the MySQL server locally. Finally, courses and other user-created data are stored on EFS mounts.

Packages

Enable the EPEL repository and install the following packages:

sudo amazon-linux-extras install epel -y
sudo yum install -y dvipng gd-devel texlive texlive-latex tex-preview texlive-epsf texlive-preprint httpd httpd-devel mod_perl netpbm-progs ImageMagick dvisvgm texlive-iftex
sudo amazon-linux-extras install mariadb10.5 -y

This will install Apache, LaTex, ImageMagick, the MariaDB client tools, and various supporting utilities. The texlive-path package must be installed manually:

curl -ksSO https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/27/Everything/x86_64/os/Packages/t/texlive-path-svn22045.3.05-36.fc27.5.noarch.rpm
rpm -ivh --replacepkgs texlive-path-svn22045.3.05-36.fc27.5.noarch.rpm
/usr/bin/texhash

Node

Install Nodejs 16 from source:

yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -
yum install -y nodejs

Perl modules

We use cpanm to install Perl modules:

yum install -y perl-core perl-CPAN
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
cpanm Hash::Merge
cpanm ILMARI/SQL-Abstract-1.87.tar.gz
cpanm mod_perl2
cpanm Archive::Zip Array::Utils Benchmark Carp CGI CGI::Cookie Data::Dumper Data::UUID Date::Format Data::Dump Date::Parse DateTime DBD::MariaDB DBI Digest::MD5 Digest::SHA Email::Address::XS Email::Sender::Simple Email::Sender::Transport::SMTP Email::Simple Errno File::Copy File::Find File::Find::Rule File::Path File::Spec File::stat File::Temp GD Getopt::Long Getopt::Std HTML::Entities HTML::Scrubber HTML::Tagset HTML::Template HTTP::Async IO::File IO::Socket::SSL Iterator Iterator::Util JSON JSON::MaybeXS Locale::Maketext::Lexicon Locale::Maketext::Simple LWP::Protocol::https MIME::Base64 Net::IP Net::LDAPS Net::OAuth Net::SMTP Net::SSLeay Opcode PHP::Serialization Pod::Usage Pod::WSDL Scalar::Util SOAP::Lite Socket Statistics::R::IO String::ShellQuote Template Text::CSV Text::Wrap Tie::IxHash Time::HiRes Time::Zone URI::Escape UUID::Tiny XML::Parser XML::Parser::EasyTree XML::Simple XML::Writer mod_perl2 Apache2::Request YAML Path::Class Statistics::R::IO XML::Simple Apache::Test Apache2:Request
cpanm --force XMLRPC::Lite

The apreq_module needs to be manually loaded:

echo "LoadModule apreq_module modules/mod_apreq2.so" > /etc/httpd/conf.modules.d/10-apreq2.conf