Created
April 5, 2010 10:16
-
-
Save balibali/356216 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum -y update | |
yum -y install screen sysstat vim-enhanced subversion | |
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm | |
yum -y install git | |
# Postfix | |
yum -y install postfix | |
yum -y remove sendmail | |
/etc/init.d/postfix start | |
# MySQL | |
yum -y install mysql-server | |
sed -i.orig -e "s/\[mysqld\]/\[mysqld\]\ndefault-character-set=utf8/" /etc/my.cnf | |
cat >> /etc/my.cnf <<EOF | |
[client] | |
default-character-set=utf8 | |
[mysqldump] | |
default-character-set=utf8 | |
EOF | |
/sbin/chkconfig mysqld on | |
/etc/init.d/mysqld start | |
# Apache & PHP | |
yum -y install httpd | |
yum -y install php php-cli php-pear php-mbstring php-mysql php-gd php-xml php-eaccelerator | |
cat > /etc/php.d/my.ini <<EOF | |
short_open_tag = Off | |
expose_php = Off | |
memory_limit = 256M | |
date.timezone = Asia/Tokyo | |
[mbstring] | |
mbstring.language = Japanese | |
mbstring.internal_encoding = utf-8 | |
EOF | |
mkdir -p /var/www/sites | |
chown uhuser /var/www/sites | |
cat > /etc/httpd/conf.d/virtualhost.conf <<EOF | |
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
VirtualDocumentRoot /var/www/sites/%0/public_html | |
</VirtualHost> | |
<Directory "/var/www/sites"> | |
AllowOverride All | |
</Directory> | |
EOF | |
/sbin/chkconfig httpd on | |
/etc/init.d/httpd start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment