SCFF的安裝
git clone https://github/softscheck/scff.git
cd scff
根據github上的描述,有三種安裝方式
1)Debian
./mkdeb.sh
然後使用生成的deb包進行安裝
2)其他
pip3 install .
# OR
easy_install3
# OR
python3 ./setup.py install
注:此處有坑!
第一個坑!!!
############################################################
因爲SCFF基於python3編寫,所有python版本應爲3.0以上,筆者爲python 3.4
修改ubuntu 14.04系統默認python版本的方法爲:
rm /usr/bin/python
ln -s /usr/bin/python3.4 /usr/bin/python
#############################################################
第二個坑!!!
由於SCFF僅支持AWS雲端框架,所以必須安裝python3-boto3框架
安裝方式爲
sudo pip3 install boto3
# OR
sudo pip3 install --upgrade boto3
############################################################
第三個坑!!!
即使上邊的萬事具備,信心滿滿鍵入
scff-ctrl
得到的卻是:
此時內心是崩潰的,幾乎快要放棄了!
一開始以爲是boto3沒有裝好,幾番搗鼓之後,然並卵。。。
於是乎開始讀SCFF源碼,直到發現了這幾句
# scff/scff/sacf.py
if os.path.exists("/usr/share/scff"):
DATA_DIR = "/usr/share/scff/"
elif os.path.exists("/usr/local/share/scff"):
DATA_DIR = "/usr/local/share/scff/"
elif os.path.exists(os.path.expanduser("~")+"/.local/share/scff"):
DATA_DIR = os.path.expanduser("~")+"/.local/share/scff/"
else:
die("Important scff components missing! Please reinstall!")
檢查完文件夾後確實都不存在,心中一萬隻草泥馬!!!
於是乎
sudo cp -r path/to/scff/data /usr/local/share/scff
再次
scff-ctrl
得到
這是aws配置信息沒有配置的原因
解決辦法待續。。。