Skip to content

Commit

Permalink
Add for CentOS6
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Apr 2, 2012
1 parent edc5f98 commit 3e7555d
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 0 deletions.
49 changes: 49 additions & 0 deletions apache-php5.3-centos6.sh
@@ -0,0 +1,49 @@
#!/bin/bash
# yum install httpd & php & mysql & postgresql
wget http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-5.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
yum -y install httpd
yum -y install --enablerepo=remi php php-pear php-devel php-dom php-mbstring php-mysql php-pgsql php-gd httpd-devel

# 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
12 changes: 12 additions & 0 deletions php5.3-centos6-simple.sh
@@ -0,0 +1,12 @@
#!/bin/bash
if [ -z $script_url ];then
export script_url="https://raw.github.com/k1LoW/sakuravps/master/"
fi

#common
curl $script_url/common.sh|bash
#iptables
curl $script_url/iptables-simple.sh|bash
/etc/init.d/iptables save
#apache php
curl $script_url/apache-php5.3-centos6.sh|bash
12 changes: 12 additions & 0 deletions php5.3-lamp-cake-centos6-simple.sh
@@ -0,0 +1,12 @@
#!/bin/bash
if [ -z $script_url ];then
export script_url="https://raw.github.com/k1LoW/sakuravps/master/"
fi

#common
curl $script_url/common.sh|bash
#iptables
curl $script_url/iptables-simple.sh|bash
/etc/init.d/iptables save
#apache php
curl $script_url/apache-php5.3-centos6.sh|bash
24 changes: 24 additions & 0 deletions php5.3-lapp-cake-centos6-simple.sh
@@ -0,0 +1,24 @@
#!/bin/bash
if [ -z $script_url ];then
export script_url="https://raw.github.com/k1LoW/sakuravps/master/"
fi

#common
curl $script_url/common.sh|bash
#iptables
curl $script_url/iptables-simple.sh|bash
/etc/init.d/iptables save
#apache php
curl $script_url/apache-php5.3-centos6.sh|bash

#postgresql yum repogitory
rpm -ivh http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm

# yum install postgresql
yum -y install postgresql-tcl postgresql-server postgresql-contrib postgresql
/etc/init.d/postgresql initdb --no-locale -D /var/lib/pgsql/data/ -E UNICODE
# mkdir /var/log/postgres
# postgres -c "pg_ctl -D /var/lib/pgsql/data -l /var/log/postgres/logfile start"

/sbin/chkconfig postgresql on
/etc/init.d/postgresql start

0 comments on commit 3e7555d

Please sign in to comment.