How to install apache and mod_perl on ubuntu
You have to do this stuff alone. I extracted all of the source into the /usr/src directory and changed the ownership of the directories, with this trick I can run configure and make without needing to sudo.
I hope you have installed libc6-dev and libperl-dev. If not just:
- sudo apt-get install libperl-dev libc6-dev
Also. Download from apache the latest apache httpd.apache.org/download.cgi, and the latest mod_perl from perl.apache.org/download/index.html
Unpack both files into /usr/src. You should now have /usr/src/apache_1.4.41 and /usr/src/mod_perl-1.30
Change to the /usr/src/apache_1.4.41 directory and run configure:
./configure
--prefix=/usr/local/apache-perl
--target=apache-perl
--with-perl=/usr/bin/perl
--libexecdir=/usr/lib/apache-perl
--logfiledir=/var/log/apache-perl
--bindir=/usr/bin --sbindir=/usr/sbin
--sysconfdir=/etc/apache-perl
--activate-module=src/modules/perl/libperl.a
--disable-module=auth_db
--disable-module=autoindex
--disable-module=cgi
--enable-module=expires
--enable-module=rewrite
--enable-module=headers
--enable-shared=access
--enable-shared=alias
--enable-shared=auth
--enable-shared=dir
--enable-shared=expires
--enable-shared=headers
--enable-shared=log_config
--enable-shared=mime
--enable-shared=mime_magic
--enable-shared=negotiation
--enable-shared=rewrite
--enable-shared=setenvif
--enable-shared=status
When this has finished running, change to the /usr/src/mod_perl-1.30 and run:
perl Makefile.PL APACHE_SRC=../apache_1.4.41/src NO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1
You can then run :
make; sudo make install
Then change back to /usr/src/apache_1.4.41 and re-run configure:
./configure
--prefix=/usr/local/apache-perl
--target=apache-perl
--with-perl=/usr/bin/perl
--libexecdir=/usr/lib/apache-perl
--logfiledir=/var/log/apache-perl
--bindir=/usr/bin --sbindir=/usr/sbin
--sysconfdir=/etc/apache-perl
--activate-module=src/modules/perl/libperl.a
--disable-module=auth_db
--disable-module=autoindex
--disable-module=cgi
--enable-module=expires
--enable-module=rewrite
--enable-module=headers
--enable-shared=access
--enable-shared=alias
--enable-shared=auth
--enable-shared=dir
--enable-shared=expires
--enable-shared=headers
--enable-shared=log_config
--enable-shared=mime
--enable-shared=mime_magic
--enable-shared=negotiation
--enable-shared=rewrite
--enable-shared=setenvif
--enable-shared=status
You can now run :
$ make ; sudo make install to complete the installation of apache_perl.
After the installation edit the apache-perl configuration located in /etc/apache-perl/apache-perl.conf. Find Port and revert from 8080 to 80.
Now the installation is completed and you can test that it works by starting apache with sudo /usr/sbin/apache-perlctl start.
Go to http://localhost/ and enjoy.