Skip to content

Instantly share code, notes, and snippets.

@saxenap
Last active August 29, 2015 14:07
Show Gist options
  • Save saxenap/bd8676e3f7947d031d47 to your computer and use it in GitHub Desktop.
Save saxenap/bd8676e3f7947d031d47 to your computer and use it in GitHub Desktop.
PHP 55 + Apache 2.4 + Other Packages
#!/bin/bash
yum -y install httpd24-devel
/sbin/chkconfig --levels 235 httpd on
service httpd start
#!/bin/bash
###############################################
# To use:
# rm -rf apache24-php55
# wget https://gist.githubusercontent.com/saxenap/bd8676e3f7947d031d47/raw/apache24-php55
# chmod 777 apache24-php55
# ./apache24-php55
###############################################
BASE_URL="https://gist.githubusercontent.com/saxenap/bd8676e3f7947d031d47/raw"
rm -rf Instance-Settings
wget $BASE_URL/Instance-Settings
chmod 777 Instance-Settings
./Instance-Settings
rm -rf Instance-Settings
rm -rf Dependencies
wget $BASE_URL/Dependencies
chmod 777 Dependencies
./Dependencies
rm -rf Dependencies
rm -rf Php55
wget $BASE_URL/Php55
chmod 777 Php55
./Php55
rm -rf Php55
rm -rf Apache2.4
wget $BASE_URL/Apache2.4
chmod 777 Apache2.4
./Apache2.4
rm -rf Apache2.4
rm -rf Directory-Permissions
wget $BASE_URL/Directory-Permissions
chmod 777 Directory-Permissions
./Directory-Permissions
rm -rf Directory-Permissions
echo "*****************************************"
echo "Instance Initialized with PHP and Apache."
echo "*****************************************"
#!/bin/bash
yum -y install gcc
yum -y install gcc-c++
yum -y install make
yum -y install curl-devel
yum -y install zip
yum -y install zlib-devel
yum -y install libuuid-devel
#!/bin/bash
groupadd www
usermod -a -G www ec2-user
chown -R root:www /var/www
chmod 2775 /var/www
find /var/www -type d -exec sudo chmod 2775 {} +
find /var/www -type f -exec sudo chmod 0664 {} +
#!/bin/bash
yum -y update
ln -sf /usr/share/zoneinfo/America/Indianapolis /etc/localtime
#!/bin/bash
PHP_INI_Location="/etc/php.ini"
yum -y install php55
yum -y install php55-devel
yum -y install php55-mysqlnd
yum -y install php55-pdo
yum -y install php55-mcrypt
yum -y install php55-mbstring
yum -y install pcre-devel
echo "Installing apcu + opcache..."
yum -y install php55-pecl-apcu
yum -y install php55-opcache
# yum -y install php55-pecl-apc
pear config-set php_ini $PHP_INI_Location
pecl config-set php_ini $PHP_INI_Location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment