osu-translate-zh / osu-web

osu-web 中文翻译(现已转移到 Crowdin)
https://crowdin.com/translate/osu-web/all/en-zhcn
GNU Affero General Public License v3.0
3 stars 1 forks source link

How to get your osu-web works locally (without VPS) #6

Open kj415j45 opened 6 years ago

kj415j45 commented 6 years ago

本文适用于非root的Linux用户部署osu-web( @kj415j45 测试通过),也适用于Ubuntu on Win10(bash)( @MegaApplePi 测试通过) These steps are for not-root Linux user deploy their own osu-web (tested by @kj415j45 ). works on Ubuntu on Win10(bash) too (tested by @MegaApplePi ).

kj415j45 commented 6 years ago

Preparing

sudo ​add-apt-repository -y ppa:ondrej/php
sudo apt update
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt install -y php7.2 nginx mysql-server nodejs wget git php7.2-curl php7.2-fpm php7.2-gd php7.2-intl php7.2-json php7.2-mbstring php7.2-mcrypt php7.2-mysql php7.2-xml php7.2-zip mcrypt phpunit

Enter and remember your MySQL root password.

kj415j45 commented 6 years ago

Git

Clone repo and config

git clone https://github.com/ppy/osu-web.git
cd osu-web
​git config --local core.filemode false
kj415j45 commented 6 years ago

Nodejs

Install yarn

sudo npm install -g yarn

kj415j45 commented 6 years ago

Nginx

sudo rm /etc/nginx/sites-enabled/default
sudo cp docker/nginx/nginx-osu-next /etc/nginx/sites-enabled/nginx-osu-next
sudo ln /etc/nginx/sites-enabled/nginx-osu-next /etc/nginx/sites-available/nginx-osu-next
​sudo nano /etc/nginx/sites-enabled/nginx-osu-next

Find the line root, change it to your osu-web path. For me: root /home/kj415j45/osu-web/public; If you are not sure, exit nano temporary then run pwd, it will tell you. Scroll down and: ​fastcgi_pass unix:/run/php/php7.2-fpm.sock;

sudo service nginx restart
chmod 755 -R public/
​mkdir -p public/uploads
​chmod 777 public/uploads
kj415j45 commented 6 years ago

MySQL

nano bin/db_setup.sh Add -p{password} after -u root (it is at Line 10) , for me: -u root -p919815238

sudo service mysql restart
bin/db_setup.sh
​git checkout -- bin/db_setup.sh
​cp .env.example .env
nano .env

Change DB connection settings Add your OSU_API_KEY and GITHUB_TOKEN

kj415j45 commented 6 years ago

Done

./build.sh

Sync

git pull origin master
./build.sh
kj415j45 commented 6 years ago

Clean

finding suitable way...

lslqtz commented 6 years ago

我是不是应该出一个适用于 Windows 的套件。 owo,然而我也没玩过。。

benpigchu commented 6 years ago

【当然我们更推荐 Docker 工作流(】