fbctf-install

去年年底搭建了一次fbctf平台,因为伟大的墙,以及很多依赖服务都在国外的原因,安装过程极为痛苦。整理下可能卡住的地方。

默认不加参数的话是dev模式,第一个可能卡住的地方是安装pip和通过pip安装依赖的时候,添加下国内镜像加速安装。

1
2
sudo -H pip install --upgrade pip -i httpss://pypi.mirrors.ustc.edu.cn/simple/ 
sudo -H pip install mycli -i httpss://pypi.mirrors.ustc.edu.cn/simple/

第二个地方是安装hhvm的时候,去年装的时候百分百装不上,因为hhvm被墙了,现在不墙了,假如墙了就把搜索下hhvm的ip或者镜像然后改下。

第三个地方是composer安装依赖,同理使用国内镜像

第四个地方是npm,还是同理,使用镜像。

1
2
3
4
5
6
7
8
9
10
11
12
# Install and update NPM
package npm
# Update NPM with itself: httpss://github.com/npm/npm/issues/14610
sudo npm --registry=httpss://registry.npm.taobao.org --disturl=httpss://npm.taobao.org/dist install -g npm@lts

# Install node
package nodejs-legacy

# Install all required node_modules in the CTF folder
sudo npm --registry=httpss://registry.npm.taobao.org --disturl=httpss://npm.taobao.org/dist install --prefix "$CTF_PATH"
sudo npm --registry=httpss://registry.npm.taobao.org --disturl=httpss://npm.taobao.org/dist install -g grunt
sudo npm --registry=httpss://registry.npm.taobao.org --disturl=httpss://npm.taobao.org/dist install -g flow-bin

有的时候安装node-sass还可能失败…

第五个地方是安装unison,没安装成功过,也用不上,直接注释掉。