一、install Apache2
Update and upgrade the Ubuntu distribution.
sudo apt-get update -y
sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
Install a dependencies for LabelMe. This includes “Apache”, “Perl”, and git.
sudo apt-get install -y \
apache2 \
git \
libapache2-mod-perl2 \
libcgi-session-perl \
libapache2-mod-php \
make \
php
Configure Apache.
sudo a2enmod include
sudo a2enmod rewrite
sudo a2enmod cgi
Edit /etc/apache2/sites-available/000-default.conf so that the following is the only element in the file.
sudo tee /etc/apache2/sites-available/000-default.conf <<EOL
<Directory "/var/www/html/LabelMeAnnotationTool">
Options Indexes FollowSymLinks MultiViews Includes ExecCGI
AddHandler c