Mirror of github.com/ppy/osu-web, in case ppy decides to take the original down for some reason.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bootstrap.sh 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/bin/sh
  2. # setup repositories
  3. apt-get update -q
  4. apt-get install \
  5. curl \
  6. software-properties-common \
  7. -q -y --force-yes
  8. add-apt-repository -y ppa:ondrej/php
  9. _release="$(lsb_release -cs)"
  10. apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 5072E1F5
  11. add-apt-repository "deb http://repo.mysql.com/apt/ubuntu/ ${_release} mysql-5.7"
  12. curl -sL https://deb.nodesource.com/setup_4.x > setup-nodejs && bash setup-nodejs
  13. rm -f setup-nodejs
  14. apt-get update
  15. # install needed tools and daemons
  16. export DEBIAN_FRONTEND=noninteractive
  17. apt-get install \
  18. git \
  19. mysql-community-server \
  20. nginx \
  21. nodejs \
  22. php7.1-curl \
  23. php7.1-fpm \
  24. php7.1-gd \
  25. php7.1-intl \
  26. php7.1-json \
  27. php7.1-mbstring \
  28. php7.1-mcrypt \
  29. php7.1-mysql \
  30. php7.1-xml \
  31. php7.1-zip \
  32. redis-server \
  33. tmux \
  34. vim \
  35. wget \
  36. -q -y --force-yes
  37. npm install -g yarn
  38. update-rc.d php7.1-fpm defaults
  39. rm /etc/nginx/sites-enabled/default
  40. ln -s /vagrant/conf/nginx-osu-next /etc/nginx/sites-available/nginx-osu-next
  41. ln -s /etc/nginx/sites-available/nginx-osu-next /etc/nginx/sites-enabled/nginx-osu-next
  42. cd /data/osu\!web/
  43. mkdir -p "public/uploads"
  44. chmod 777 "public/uploads"
  45. # replace mysql config vars to be reachable from vm host
  46. sed -i 's/bind-address/#bind-address/' /etc/mysql/my.cnf
  47. #this shouldn't be applied to live servers, but is required for a shitty virtualbox bug (https://www.virtualbox.org/ticket/9069)
  48. sed -i 's/sendfile on/sendfile off/' /etc/nginx/nginx.conf
  49. service mysql restart
  50. service php7.1-fpm restart
  51. service nginx restart
  52. ./bin/db_setup.sh
  53. echo "Finished setup of daemons and servers"