21. NeoVim配置

  1. $ mkdir ~/.config/nvim
  2. $ touch ~/.config/nvim/init.vim
  3. $ curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://gitee.com/c4pr1c3/vim-plug/raw/master/plug.vim

在 init.vim 添加如下内容:
打开一个 nvim 窗口,输入:PlugInstall。安装完成后,输入 :checkhealth

[coc.nvim] build/index.js not found, please install dependencies and compile coc.nvim by: yarn install

在 ~/.vim/plugged/coc.nvim 下执行 yarn install(yarn 使用 npm install -g yarn),如果使用 sdkman 安装了 hadoop,将会使用 hadoop 中的 yarn。

安装 Coc 插件:

  1. :CocInstall coc-clangd # C++环境插件
  2. :CocInstall coc-cmake # Cmake 支持
  3. :CocInstall coc-emmet
  4. :CocInstall coc-git # git 支持
  5. :CocInstall coc-highlight # 高亮支持
  6. :CocInstall coc-jedi # jedi
  7. :CocInstall coc-json # json 文件支持
  8. # :CocInstall coc-python # python 环境支持
  9. :CocInstall coc-sh # bash 环境支持
  10. :CocInstall coc-snippets # python提供 snippets
  11. :CocInstall coc-vimlsp # lsp
  12. :CocInstall coc-yaml # yaml
  13. :CocInstall coc-syntax
  14. :CocInstall coc-pairs
  15. :CocInstall coc-bookmark
  16. # 一行安装
  17. :CocInstall coc-clangd coc-cmake coc-emmet coc-git coc-highlight coc-pairs
  18. :CocInstall coc-jedi coc-json coc-sh coc-snippets coc-vimlsp coc-yaml coc-syntax

参考文档:https://www.cnblogs.com/cniwoq/p/13272746.html
报错:https://www.cnblogs.com/sober-orange/p/cocnvim-build-indexjs.html

[coc.nvim] build/index.js not found, please install dependencies and compile coc.nvim by: yarn install

  • Unknown function: SemshiBufWipeout,解决办法::UpdateRemotePlugins,会看见具体报错
  • No module named pynvim:pip install pynvim

    ```bash $ sh -c “$(curl -fsSL https://starship.rs/install.sh)”

$ echo -e ‘eval “$(starship init bash)”‘ >> ~/.bashrc

$ echo -e ‘eval “$(starship init zsh)”‘ >> ~/.zshrc

  1. 对于 Nu Shell,使用 `config path` 找到配置文件,添加以下内容:
  2. ```bash
  3. startup = [
  4. "mkdir ~/.cache/starship",
  5. "starship init nu | save ~/.cache/starship/init.nu",
  6. "source ~/.cache/starship/init.nu"
  7. ]
  8. prompt = "starship_prompt"







28. 安装R

https://www.yuque.com/yumingmin/dash/ym8fwr

20. 启动脚本

  1. #!/bin/zsh
  2. local_ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
  3. # >>> conda initialize >>>
  4. # !! Contents within this block are managed by 'conda init' !!
  5. __conda_setup="$('/home/yumingmin/bigdata/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
  6. if [ $? -eq 0 ]; then
  7. eval "$__conda_setup"
  8. else
  9. if [ -f "/home/yumingmin/bigdata/miniconda3/etc/profile.d/conda.sh" ]; then
  10. . "/home/yumingmin/bigdata/miniconda3/etc/profile.d/conda.sh"
  11. else
  12. export PATH="/home/yumingmin/bigdata/miniconda3/bin:$PATH"
  13. fi
  14. fi
  15. unset __conda_setup
  16. # <<< conda initialize <<<
  17. while true
  18. do
  19. echo -e "\n\033[40;32m=====================🔎任务管理🔎==================== \033[0m\n"
  20. echo -e " 🚀 "1\)启动 Jupyter Notebook
  21. echo -e " 🚀 "2\)启动 Redis Server
  22. echo -e " 🚀 "3\)启动 MySQL
  23. echo -e " 🚀 "4\)启动 Airflow
  24. echo -e " 🚀 "5\)启动 Superset
  25. echo -e " 🚀 "6\)启动 Zeppelin
  26. echo -e " 🚀 "7\)启动 RStudio Server
  27. echo -e " 🚀 "8\)启动 DolphinScheduler
  28. echo -e " 🚀 "9\)启动 挂载阿里云盘
  29. echo -e " ❌ "40\)关闭 Airflow
  30. echo -e " ❌ "90\)关闭阿里云盘
  31. echo -e " ❌ "0\)退出
  32. echo -e "请选择(单选): \c"
  33. read choice
  34. case $choice in
  35. 0 )
  36. conda activate zeppelin_py37
  37. break
  38. cd
  39. ;;
  40. 1 )
  41. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳正在启动 Jupyter Notebook..."
  42. nohup jupyter notebook --ip='*' --port=8888 --no-browser --notebook_dir=~/notebooks >> ~/.logs/jupyter-notebook.run.log 2>&1 &
  43. sleep 1s
  44. head -n 30 ~/.logs/jupyter-notebook.run.log
  45. echo "😁 Jupyter Notebook 启动成功!\n"
  46. echo "🚀 请访问 http://${local_ip}:8888"
  47. continue;;
  48. 2 )
  49. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳ 正在启动 Redis Server..."
  50. echo -e "\n Executing the command: \033[40;31m redis-server ~/.redis/redis.conf \033[0m \n"
  51. nohup redis-server ~/.redis/redis.conf >> ~/.logs/redis.run.log 2>&1 &
  52. sleep 1s
  53. head -n 30 ~/.logs/redis.log
  54. echo "😁 Redis Server 启动成功!"
  55. continue;;
  56. 3 )
  57. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳ 正在启动 MySQL..."
  58. echo -e "\n Executing the command: \033[40;31m service mysql start \033[0m \n"
  59. sudo mkdir -p /var/run/mysqld
  60. sudo chown mysql:mysql /var/run/mysqld
  61. sudo service mysql start
  62. sudo service mysql status
  63. echo "😁 MySQL 启动成功!"
  64. continue;;
  65. 4 )
  66. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳ 正在启动 Airflow..."
  67. # conda activate airflow_py38
  68. echo -e "\n Executing the command: \033[40;31m airflow webserver \033[0m \n"
  69. nohup airflow webserver >> ~/.logs/airflow-webserver.log 2>&1 &
  70. sleep 1s
  71. head -n 30 ~/.logs/airflow-webserver.log
  72. echo -e "\n Executing the command: \033[40;31m airflow scheduler \033[0m \n"
  73. nohup airflow scheduler >> ~/.logs/airflow-scheduler.log 2>&1 &
  74. sleep 1s
  75. head -n 30 ~/.logs/airflow-scheduler.log
  76. # Celery 方式需要启动
  77. echo -e "\n Executing the command: \033[40;31m airflow celery flower \033[0m \n"
  78. nohup airflow celery flower >> ~/.logs/airflow-celery-flower.log 2>&1 &
  79. sleep 1s
  80. head -n 30 ~/.logs/airflow-celery-flower.log
  81. echo -e "\n Executing the command: \033[40;31m airflow celery worker \033[0m \n"
  82. nohup airflow celery worker >> ~/.logs/airflow-celery-worker.log 2>&1 &
  83. sleep 1s
  84. head -n 30 ~/.logs/airflow-celery-worker.log
  85. echo "😁 Airflow 启动完成!"
  86. echo "🚀 请访问 http://${local_ip}:9000"
  87. continue;;
  88. 5 )
  89. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳ 正在启动 Superset..."
  90. conda activate superset_py38
  91. echo -e "\n Executing the command: \033[40;31m superset run -h 0.0.0.0 -p 8088 --with-threads --reload --debugger \033[0m \n"
  92. nohup superset run -h 0.0.0.0 -p 8088 --with-threads --reload --debugger >> ~/.logs/superset.run.log 2>&1 &
  93. sleep 1s
  94. head -n 30 ~/.logs/superset.run.log
  95. echo "😁 Superset 启动成功!\n"
  96. echo "🚀 请访问 http://${local_ip}:8088"
  97. continue;;
  98. 6 )
  99. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳ 正在启动 Zeppelin..."
  100. conda activate zeppelin_py37
  101. echo -e "\n Executing the command: \033[40;31m zeppelin restart \033[0m \n"
  102. /home/yumingmin/bigdata/zeppelin-0.10.0/bin/zeppelin-daemon.sh restart
  103. sleep 1s
  104. echo "😁 Zeppelin 启动成功!\n"
  105. echo "🚀 请访问 http://${local_ip}:8080"
  106. conda deactivate
  107. continue;;
  108. 7 )
  109. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳ 正在启动 RStudio Server..."
  110. echo -e "\n Executing the command: \033[40;31m sudo rstudio-server stop\033[0m \n"
  111. sudo rstudio-server stop
  112. sudo rstudio-server start
  113. sleep 1s
  114. echo "😁 RStudio Server 启动成功!\n"
  115. echo "🚀 请访问 http://${local_ip}:8787"
  116. continue;;
  117. 8 )
  118. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳ 正在启动 Dolphin Scheduler..."
  119. echo -e "\n Executing the command: \033[40;31m sudo rstudio-server stop\033[0m \n"
  120. # sudo rstudio-server stop
  121. # sudo rstudio-server start
  122. sleep 1s
  123. echo "😁 Dolphin Scheduler 启动成功!\n"
  124. # echo "🚀 请访问 http://${local_ip}:8787"
  125. continue;;
  126. 9 )
  127. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳ 正在挂载阿里云盘..."
  128. cd ~/bigdata/aliyun-driver
  129. if [ -z $aliyun_token ]; then
  130. echo -e "请登录Web端阿里云盘,获取Refresh Token,并输入:\c"
  131. read aliyun_token
  132. export aliyun_token=$aliyun_token
  133. fi
  134. nohup java -jar webdav-2.4.1.jar \
  135. --aliyundrive.refresh-token=${aliyun_token} \
  136. --server.port=5553 \
  137. --aliyundrive.auth.enable=true \
  138. --aliyundrive.auth.user-name=admin \
  139. --aliyundrive.auth.password=admin >> ~/.logs/aliyun.run.log 2>&1 &
  140. sudo mount -t davfs -o noexec http://127.0.0.1:5553/ /home/yumingmin/data/aliyunpan
  141. sleep 2s
  142. head -n 30 ~/.logs/aliyun.run.log
  143. echo "😁 阿里云盘挂载成功!\n"
  144. echo "🚀 数据存放在 ~/data/aliyunpan 目录下,可直接访问 http://${local_ip}:5553/"
  145. cd
  146. continue;;
  147. 40 )
  148. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳ 正在关闭Airflow..."
  149. ps -ef | grep -Ei '(airflow webserver)' | grep -v "grep" | awk '{print $2}' | xargs -i kill {}
  150. ps -ef | grep -Ei '(airflow webserver)' | grep -v "grep" | awk '{print $2}' | xargs -i kill {}
  151. ps -ef | grep -Ei '(airflow-webserver)' | grep -v "grep" | awk '{print $2}' | xargs -i kill {}
  152. ps -ef | grep -Ei '(airflow scheduler)' | grep -v "grep" | awk '{print $2}' | xargs -i kill {}
  153. ps -ef | grep -Ei '(airflow-scheduler)' | grep -v "grep" | awk '{print $2}' | xargs -i kill {}
  154. ps -ef | grep -Ei '(airflow serve)' | grep -v "grep" | awk '{print $2}' | xargs -i kill {}
  155. ps -ef | grep -Ei '(airflow celery)' | grep -v "grep" | awk '{print $2}' | xargs -i kill {}
  156. echo "😁 Airflow 关闭完成!"
  157. continue;;
  158. 90 )
  159. echo `date +%EY-%m-%d-%H:%M:%S`: "⏳ 正在关闭阿里云盘..."
  160. ps -ef | grep -Ei '(webdav)' | grep -v "grep" | awk '{print $2}' | xargs -i kill {}
  161. sudo umount /mnt/aliyunpan aliyunpan
  162. sleep 2s
  163. echo "😁 阿里云盘关闭成功!\n"
  164. continue;;
  165. esac
  166. done