问题
在 x86_64 的 Linux 系统上一键部署 OpenFogOS 节点时出现问题,安装不成功。
install_args="--platform=PEAR_1900_X64_LINUX --user_id=13900000000 --storage_path=auto --cpu_cores=auto --storage_size=auto --bandwidth=auto --memory=auto" bash -c "$(curl -sS https://download.openfogos.com/linux/openfog_installer.sh)"
问题错误提示如下:
# curl -sS https://download.openfogos.com/linux/openfog_installer.sh
curl: (60) Peer's Certificate has expired.
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
分析
由于 download.openfogos.com 的 SSL 证书过期,导致下载出错,无法下载脚本,并部署 OpenFogOS。
解决方案
curl -sSk https://download.openfogos.com/linux/openfog_installer.sh -o openfog_installer.sh &&
sed -i "s/curl/curl -k/g" openfog_installer.sh &&
install_args="--platform=PEAR_1900_X64_LINUX --user_id=13900000000 --storage_path=auto --cpu_cores=auto --storage_size=auto --bandwidth=auto --memory=auto" bash openfog_installer.sh
注意事项
请注意替换安装参数,尤其是将--user_id=13900000000
替换成你自己注册 OpenFogOS 平台的手机号。