Shell: August 2011 Archives

This LAMP install script install-amp-for-amazon-ec2.sh (Current version 0.9)
tested in Amazon EC2 - Basic 32-bit/64-bit Amazon Linux AMI,
may work in CentOS, RHEL and Fedora Linux.

Apache and PHP using source tarball installation,
MySQL using official RPM installation.

You can change the version number in script header and change configure parameter to fit your needs.
Current settings:
APACHE_VERSION=auto # auto detect latest version
APACHE_VERSION2=2.2.22 # use fix version number if auto failed
PHP_VERSION=auto # auto detect latest version
#PHP_VERSION=5.3.10 # use fix version number if auto failed
MYSQL_VERSION=auto # auto detect latest stable version
#MYSQL_VERSION=5.5.20 # use fix version number if auto failed

Install commands:
wget http://pank.org/scripts/install-amp-for-amazon-ec2.sh
chmod +x install-amp-for-amazon-ec2.sh
sudo ./install-amp-for-amazon-ec2.sh

or just one line command
curl http://pank.org/scripts/install-amp-for-amazon-ec2.sh | sudo sh

Aapache directory /usr/local/apache
Apache config /usr/local/apache/conf/httpd.conf
Apache DocumentRoot /usr/local/apache/htdocs

MySQL client /usr/bin/mysql
MySQL server /usr/sbin/mysqld

PHP config /usr/local/etc/php.ini
PHP module for Apache /usr/local/apache/modules/libphp5.so
PHP CLI /usr/local/bin/php

To check MySQL files location
rpm -ql MySQL-client
rpm -ql MySQL-server

NOTICE: Because the script using source tarball installation except MySQL,
It take time to build, the installation time may over 2 hours in t1.micro machine.

Q: Why using source tarball installation instead of yum ?
A: To use latest version of Apache+MySQL+PHP.

If you intend to use yum installation, it's easy and only one line command:
yum -y groupinstall "Web Server" "MySQL Database" "PHP Support"

2012-02-07 Update: v0.9 add installation log file install-amp-for-amazon-ec2.log for debug.
2012-03-26 Update: v1.0 Apache 2.4.x, PHP 5.4.x support

t1.micro last test time: 2012-03-26
Basic 64-bit Amazon Linux AMI 2011.09, Kernel 2.6.35.14-97.44.amzn1.x86_64
Elapsed time: 113 minutes.

m1.small last test time: 2012-04-14
Amazon Linux AMI 2012.03, Kernel 3.2.12-3.2.4.amzn1.x86_64
Elapsed time: 33 minutes.

install-pptpd-for-amazon-ec2.sh

Tested in Basic 32-bit/64-bit Amazon Linux AMI 2011.02.1 Beta
You need to open TCP 1723 to allow PPTP dial-in

Commands:
wget http://pank.org/scripts/install-pptpd-for-amazon-ec2.sh
chmod +x install-pptpd-for-amazon-ec2.sh
sudo ./install-pptpd-for-amazon-ec2.sh

or just one line command:
wget -qO- http://pank.org/scripts/install-pptpd-for-amazon-ec2.sh | sudo sh

When finished, You'll see something like this:
VPN service is installed and started.

Your public IP is 175.41.206.89
Your pubilc DNS is ec2-175-41-206-89.ap-northeast-1.compute.amazonaws.com.
Your VPN username is vpnuser
Your VPN password is 658ed377

About this Archive

This page is an archive of entries in the Shell category from August 2011.

Shell: February 2011 is the previous archive.

Shell: September 2011 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives