一
安装 conda, 类似于 maven , 安装 sh 插件, 模块
wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh chmod 777 Miniconda3-latest-Linux-x86_64.sh sh Miniconda3-latest-Linux-x86_64.sh conda source ~/.bashrc rm -rf /root/miniconda3/ conda deactivate conda env list python conda install sh vim test.py chmod 777 test.py python test.py
二
脚本
#!/usr/bin/python
# vim: set fileencoding=utf-8
# : 例如,可添加# vim: set fileencoding=utf-8 :
import sys
args = sys.argv
if len(args) < 2:
print('参数不足')
sys.exit()
if args[1]=='start':
print('====启动 hadoop ====')
print('====启动 hdfs ====')
原创文章,作者:Carrie001128,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/270775.html