From f8474e860301564c229cc8358bdc0411afe57165 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sun, 19 Aug 2018 16:40:43 +0900 Subject: [PATCH] add Makefile --- Makefile | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8f501c7..3bf8dd8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,27 @@ -build-isupam: - tools/build_isupam.sh +.PHONY: main sysctl mysql nginx ctrl bench -.PHONY: build-isupam +main: sysctl mysql nginx ctrl link_init bench + echo "OK" + +sysctl: + sudo ln -sf $(PWD)/sysctl.conf /etc/sysctl.conf + sudo sysctl -a + +mysql: + sudo systemctl restart mysql + +nginx: + sudo rm -f /var/log/nginx/access.log /var/log/nginx/error.log + sudo touch /var/log/nginx/access.log /var/log/nginx/error.log + sudo systemctl reload nginx + +app: + cd /home/isucon/isucon6-qualify/webapp/go && make + sudo systemctl restart isutar.go + sudo systemctl restart isuda.go + +link_init: + sudo su - isucon -c 'ln -sf $(PWD)/init.sh init.sh' + +bench: + cd /home/isucon/gocode/src/github.com/isucon/isucon6-qualify/bench && ./bench --datadir=data -target=http://localhost