Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit

  • Loading branch information...
commit fb4cd2ada9bfe415840dec79efb5afebb5d13fcd 0 parents
@k1LoW authored
Showing with 69 additions and 0 deletions.
  1. +2 −0  .gitignore
  2. +45 −0 apache-php.sh
  3. +13 −0 common.sh
  4. +9 −0 lamp-rds-simple.sh
2  .gitignore
@@ -0,0 +1,2 @@
+*~
+*#
45 apache-php.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+# yum install httpd & php & mysql & postgresql
+yum -y install httpd httpd-devel php php-pear php-devel php-dom php-mbstring php-mysql php-gd
+
+# virtual host
+cat <<EOF > /etc/httpd/conf.d/virtualhosts.conf
+NameVirtualHost *:80
+NameVirtualHost *:443
+
+<VirtualHost *:80>
+ DocumentRoot /var/www/html
+ <Directory "/var/www/html/">
+ Options -Indexes FollowSymLinks
+ AllowOverride All
+ DirectoryIndex index.html index.htm index.php
+ </Directory>
+</VirtualHost>
+EOF
+
+# install APC
+yes yes|pecl install apc
+echo "extension=apc.so" > /etc/php.d/apc.ini
+
+# pear/pecl command patch
+sed -i.org -e 's/16M/512M/' /usr/bin/pear
+#chmod +x /usr/bin/pear-extend_memory_limit
+sed -i.org -e 's/16M/512M/' /usr/bin/pecl
+# chmod +x /usr/bin/pecl-extend_memory_limit
+
+# edit /etc/php.d/my.ini
+cat <<EOF > /etc/php.d/my.ini
+memory_limit = 256M
+short_open_tag = Off
+
+[mbstring]
+mbstring.language = Japanese
+mbstring.internal_encoding = utf-8
+EOF
+
+# timezone setting
+echo "[Date]
+date.timezone = Asia/Tokyo" > /etc/php.d/timezone.ini
+
+/sbin/chkconfig httpd on
+/etc/init.d/httpd start
13 common.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+#yum
+yum -y update
+
+#set timezone
+cp /usr/share/zoneinfo/Japan /etc/localtime
+/etc/init.d/crond restart
+
+#/etc/sysconfig/i18n
+sed -i.org -e "s/LANG=\"C\"/LANG=\"ja_JP.UTF-8\"/" /etc/sysconfig/i18n
+
+# gcc
+yum -y install gcc
9 lamp-rds-simple.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+if [ -z $script_url ];then
+ export script_url="https://github.com/k1LoW/amazonlinux/raw/master/"
+fi
+
+#common
+curl $script_url/common.sh|bash
+#apache php
+curl $script_url/apache-php.sh|bash
Please sign in to comment.
Something went wrong with that request. Please try again.