Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |