本地运行大数据工程

拉取仓库

  1. 打开应用商店搜索Visual Studio Code,找到vscode 并安装,之后建议安装c++和cmake的插件
  2. mkdir Work
  3. chmod 777 Work/
  4. cd Work/
  5. sudo apt install git
    {
    如果报了这个错:
    E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
    则执行:
    sudo rm /var/lib/dpkg/lock-frontend
    sudo rm /var/lib/dpkg/lock
    sudo apt install git
    }
  6. git clone https://gitlab.landmark-shcx.com:1080/lei.zhang/ap_incubator.git
  7. mv ap_incubator/ AP_Incubator
  8. cd AP_Incubator/4_Autosar_App/
  9. git clone https://gitlab.landmark-shcx.com:1080/bigdata-taskforce/bigdata_collection.git
  10. mv bigdata_collection BigDataCollect
  11. code ./
  12. 解开最后一行的注释,如下


    1653643738(1).jpg

编译代码(也可参考AP的readme)

  1. sudo apt-get upgrade
  2. sudo apt-get update
  3. sudo apt install gcc
  4. sudo apt install g++
  5. sudo apt install make
  6. wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -
  7. sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
  8. sudo apt-get update
  9. sudo apt install cmake
  10. cd /home/osboxes/Work/AP_Incubator/2_Build/script
  11. sudo apt-get install libssl-dev
    (12到27步也可参考磊哥的攻略)
  12. ./build.sh all
  13. sudo apt install python
  14. ./build.sh install
  15. cd /usr/local/lib
  16. sudo cp ~/Work/AP_Incubator/1_Prebuilt/boost/lib/* ./ -rf
  17. sudo cp ~/Work/AP_Incubator/1_Prebuilt/gtest/lib/* ./ -rf
  18. sudo cp ~/Work/AP_Incubator/1_Prebuilt/vector/AUTOSAR_MIDDLEWARE_SDK/lib/* ./ -rf
  19. cd ~/Work/AP_Incubator/1_Prebuilt/vector/AUTOSAR_MIDDLEWARE_SDK/opt
  20. cp ~/Work/AP_Incubator/1_Prebuilt/application/BigDataCollect ./ -rf
  21. cd BigDataCollect/bin
  22. sudo chmod 777 *
  23. 删除不需要的包
  • amsr_vector_fs_passthroughmanager
  • amsr_vector_fs_phm_healthmanager
  1. 修改someipd配置文件 someipd-posix.json


    1653653303(1).jpg
  2. 主要修改someip监听的ip地址相关信息:建议用本机loopback地址(ifconfig 查看)或是以太网网卡地址。


    1653653360(1).jpg
  3. 修改AA的执行配置文件 exec_config.json


    1653653407(1).jpg
  4. export LD_LIBRARY_PATH=/home/osboxes/Work/AP_Incubator/1_Prebuilt/vector/AUTOSAR_MIDDLEWARE_SDK/lib:$LD_LIBRARY_PATH
  5. sudo ldconfig
  6. cd ~/Work/AP_Incubator/1_Prebuilt/vector/AUTOSAR_MIDDLEWARE_SDK/
  7. sudo ./sbin/amsr_vector_fs_em_executionmanager -a ./opt -m ./etc/machine_exec_config.json -l ./etc/logging_config.json

你可能感兴趣的:(本地运行大数据工程)