-
-
Save rysk92/356324 to your computer and use it in GitHub Desktop.
CentOS5にOpenPNE3の稼働環境を作る手順
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 --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka | |
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 | |
cat > /etc/yum.repos.d/utterramblings.repo <<EOF | |
[utterramblings] | |
name=Jason's Utter Ramblings Repo | |
baseurl=http://www.jasonlitka.com/media/EL\$releasever/\$basearch/ | |
enabled=0 | |
gpgcheck=1 | |
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka | |
EOF | |
yum -y install httpd-devel | |
yum -y install memcached | |
yum -y --enablerepo=utterramblings install php php-cli php-devel php-pear php-mbstring php-pdo php-mysql php-gd php-mcrypt php-xml php-apc php-memcache | |
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/web | |
</VirtualHost> | |
<Directory "/var/www/sites"> | |
AllowOverride All | |
</Directory> | |
EOF | |
/sbin/chkconfig httpd on | |
/etc/init.d/httpd start | |
/sbin/chkconfig memcached on | |
/etc/init.d/memcached start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment