LAMPインストール
### iptables 無効 ###
/sbin/chkconfig iptables off
/etc/init.d/iptables stop
### yum repo追加 ###
### EPEL ###
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm && rpm -ihv epel-release-5-4.noarch.rpm
### Remi ###
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm && rpm -ihv remi-release-5.rpm
### Apache Install ###
yum --enablerepo=remi -y install httpd-devel
/sbin/chkconfig httpd on
/etc/rc.d/init.d/httpd start
### PHP Install ###
yum --enablerepo=remi -y install php php-devel php-mbstring php-mysql php-mcrypt php-gd php-pear php-pecl-apc
### Apache restart ###
/etc/rc.d/init.d/httpd restart
### PHP 確認 ###
cat <<EOF >/var/www/html/index.php
<?php phpinfo(); ?>
EOF
### MySQL Install ###
yum --enablerepo=remi -y install mysql-server
cat <<EOF >>/etc/my.cnf
[mysql]
default-character-set=utf8
EOF
### MySQL 起動 ###
/sbin/chkconfig mysqld on
/etc/rc.d/init.d/mysqld start
### MySQL Set ###
mysqladmin -u root password パスワード
/sbin/chkconfig iptables off
/etc/init.d/iptables stop
### yum repo追加 ###
### EPEL ###
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm && rpm -ihv epel-release-5-4.noarch.rpm
### Remi ###
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm && rpm -ihv remi-release-5.rpm
### Apache Install ###
yum --enablerepo=remi -y install httpd-devel
/sbin/chkconfig httpd on
/etc/rc.d/init.d/httpd start
### PHP Install ###
yum --enablerepo=remi -y install php php-devel php-mbstring php-mysql php-mcrypt php-gd php-pear php-pecl-apc
### Apache restart ###
/etc/rc.d/init.d/httpd restart
### PHP 確認 ###
cat <<EOF >/var/www/html/index.php
<?php phpinfo(); ?>
EOF
### MySQL Install ###
yum --enablerepo=remi -y install mysql-server
cat <<EOF >>/etc/my.cnf
[mysql]
default-character-set=utf8
EOF
### MySQL 起動 ###
/sbin/chkconfig mysqld on
/etc/rc.d/init.d/mysqld start
### MySQL Set ###
mysqladmin -u root password パスワード

