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
# wrk -c 30 -t 1 -d 30s --latency http://[VPSのIPアドレス]/ | |
Running 30s test @ http://[VPSのIPアドレス]/ | |
1 threads and 30 connections | |
Thread Stats Avg Stdev Max +/- Stdev | |
Latency 797.40ms 96.29ms 1.12s 63.04% | |
Req/Sec 38.20 18.69 110.00 73.45% | |
Latency Distribution | |
50% 778.11ms | |
75% 871.41ms | |
90% 946.57ms |
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/sh | |
CURL_COMMAND="/usr/bin/curl -Ssif" | |
JQ_COMMAND="/usr/bin/jq" | |
CURL_HTTP_METHOD_POST="-X POST" | |
CURL_HTTP_METHOD_GET="-X GET" | |
CURL_HTTP_METHOD_PUT="-X PUT" | |
CURL_HTTP_HEADER_ACCEPT_JSON='-H Accept:application/json' |
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
#--------------------------------------------------------------------- | |
# Example configuration for a possible web application. See the | |
# full configuration options online. | |
# | |
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt | |
# | |
#--------------------------------------------------------------------- | |
#--------------------------------------------------------------------- | |
# Global settings |
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
<?php | |
function h($str) { | |
echo htmlspecialchars($str, ENT_QUOTES, 'UTF-8'); | |
} | |
?> | |
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet"> |
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
DEVICE="eth1" | |
BOOTPROTO="none" | |
ONBOOT="yes" | |
TYPE="Ethernet" | |
IPADDR="192.168.0.13" | |
NETMASK="255.255.255.0" |
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
DEVICE="eth1" | |
BOOTPROTO="none" | |
ONBOOT="yes" | |
TYPE="Ethernet" | |
IPADDR="192.168.0.12" | |
NETMASK="255.255.255.0" |
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
DEVICE="eth1" | |
BOOTPROTO="none" | |
ONBOOT="yes" | |
TYPE="Ethernet" | |
IPADDR="192.168.0.11" | |
NETMASK="255.255.255.0" |
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
# cat <<_EOF_ > /etc/yum.repos.d/webmin.repo | |
[webmin] | |
name=Webmin Distribution Neutral | |
mirrorlist=http://download.webmin.com/download/yum/mirrorlist | |
enabled=0 | |
_EOF_ | |
# rpm --import http://www.webmin.com/jcameron-key.asc | |
# yum --enablerepo=webmin -y install webmin | |
# iptables -I INPUT 1 -p tcp --dport 10000 -j ACCEPT |
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
# yum -y install mysql-server mysql-devel phpMyAdmin php-mysqli | |
# chkconfig mysqld on | |
# service mysqld start | |
# mysql_secure_installation | |
rootのパスワード設定以外Enterで進行 | |
# iptables -I INPUT -j ACCEPT -p tcp --dport 80 | |
# service iptables save && service iptables restart | |
# echo "Alias /phpmyadmin /usr/share/phpMyAdmin" > /etc/httpd/conf.d/phpMyAdmin.conf | |
# chkconfig httpd on | |
# service 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
sed -i.bak -e 's/\(upload_max_filesize.*\) [0-9].*M$/\1 20M/' /etc/php-fpm.d/www.conf | |
sed -i.bak -e 's/\(post_max_size.*\) [0-9].*M$/\1 20M/' /etc/php-fpm.d/www.conf | |
sed -i.bak -e 's/\(client_max_body_size.*\) [0-9].*m\(.*\)$/\1 20m\2/' /etc/nginx/nginx.conf | |
service php-fpm restart && service nginx restart |
NewerOlder