Skip to content

Instantly share code, notes, and snippets.

@Allan-Gong
Last active July 29, 2018 15:26
Show Gist options
  • Save Allan-Gong/a44ba793beb5a3f362d2 to your computer and use it in GitHub Desktop.
Save Allan-Gong/a44ba793beb5a3f362d2 to your computer and use it in GitHub Desktop.
An example of installing Perl via perlbrew, Apache with mod_perl and a bunch of perl modules on AWS EC2 Red Hat Linux Enterprise
sodo yum install perl
sudo yum install bzip2
sudo yum install patch
sudo yum groupinstall 'Development Tools'
\curl -L http://install.perlbrew.pl | bash
source ${PERLBREW_ROOT}/etc/bashrc
perlbrew install-cpanm
perlbrew available
perlbrew install perl-5.16.0 -Dusethreads -Duseshrplib -fPIC
perlbrew list
perlbrew switch perl-5.16.0
sudo yum update -y
sudo yum install -y httpd
sudo service httpd start
sudo chkconfig httpd on
sudo httpd -k stop
sudo httpd -k start
sudo httpd -k restart
ps -ef | grep httpd
sudo yum install wget
sudo yum install httpd-devel
yum list installed
sudo cpanm install HTML::HeadParser
# Edit httpd.conf
sudo vi /etc/httpd/conf/httpd.conf
# Apache Root Document directory: /var/www/html
# Apache Root Document directory (Monash): /var/www/htdocs
# Install mod_perl
sudo perl Makefile.PL MP_APXS=/usr/bin/apxs
sudo make test
sudo make install
# Update /etc/httpd/conf/httpd.conf to include mod_perl modules:
Include conf.modules.d/*.conf
LoadModule perl_module modules/mod_perl.so
LoadModule ssl_module modules/mod_ssl.so
# Install Oracle instant client
sudo yum install libaio
# rpm find out if a package is successfully installed:
sudo rpm -ivh [package.rpm]
cpanm install DBI
sudo yum install openssl-devel
sudo yum install libxml2 libxml2-devel
change
$r->connection->remote_ip()
to
$r->connection->client_ip()
http://aa-app15-v02-its.monash.edu/wes/
http://130.194.22.71/wes/
killall -TERM /net/apache/bin/httpd
ps aux|grep httpd
/net/apache/bin/apachectl sslstart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment