git clone https://github.com/fejxc/autoInstall.git 到本地
链接: https://pan.baidu.com/s/1fdy5hkwmI-StqhOrJWOoqQ 密码: 4q5c
cd autoInstall
sudo chmod +x *.sh
./InstallJdkSpark.sh
sudo shutdown -r now
重启后java环境生效
cd /opt/apache-spark/spark-2.4.8-bin-hadoop2.7/bin
./spark-submit ~/autoInstall/word-count.py
people = spark.read.option("header", "true").option("inferSchema", "true")\
.csv("file:///home/happy/Downloads/data")happy改为自己的登录用户名
运行 stu-count.py之前确保安装了python2.7+
sudo apt install python 安装python2.7
