사용 우분투버전은 16.04 이다. VERSION="16.04.5 LTS (Xenial Xerus)"


sudo apt-get upgrade



기본툴 vim, openssh-server, git 설치


1. 기본 패키지들 설치

 sudo apt-get install gettext expat vim libtool autoconf libudev-dev libgstreamer-plugins-base1.0-dev \

libdbus-1-dev libgl1-mesa-dev libbluetooth-dev libjpeg-dev libpng++-dev


sudo apt-get install cmake cmake-curses-gui libgtest-dev libre2-dev libicu-dev libtag1-dev

sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev

sudo apt-get install libdbus-1-dev
sudo apt-get install gstreamer1.0-plugins-* libmedia1 gstreamer1.0-libav
sudo apt-get install libexpat1 libexpat1-dev


2. www.qt.io 접속하여 Qt Source 다운로드및 설치


3. CommonAPI 관련 소스를 다운로드 한다. 


$ git clone https://github.com/GENIVI/capicxx-core-runtime.git

$ git clone https://github.com/GENIVI/capicxx-dbus-runtime.git

$ git clone https://github.com/GENIVI/dlt-daemon.git

$ git clone https://github.com/GENIVI/vsomeip.git

$ git clone https://github.com/GENIVI/capicxx-someip-runtime.git


cd capicxx-core-runtime

git checkout 3.1.12.4


cd capicxx-dbus-runtime

git checkout 3.1.12.7


cd capicxx-someip-runtime
git checkout 3.1.12.11



 1) CAN 관련

mkdir can

cd can

git clone https://github.com/GENIVI/CANdevStudio.git

git clone https://github.com/GENIVI/CANdb.git




dbus 버전정보 확인


$ dpkg -l |grep dbus

ii  at-spi2-core                        2.18.3-4ubuntu1                            amd64        Assistive Technology Service Provider Interface (dbus core)
ii  dbus                                 1.10.6-1ubuntu3.3                          amd64        simple interprocess messaging system (daemon and utilities)
ii  dbus-x11                           1.10.6-1ubuntu3.3                          amd64        simple interprocess messaging system (X11 deps)
ii  libdbus-1-3:amd64               1.10.6-1ubuntu3.3                          amd64        simple interprocess messaging system (library)
ii  libdbus-1-dev:amd64            1.10.6-1ubuntu3.3                          amd64        simple interprocess messaging system (development headers)
ii  libdbus-glib-1-2:amd64         0.106-1                                        amd64        simple interprocess messaging system (GLib-based shared library)
ii  libdbusmenu-glib4:amd64      16.04.1+16.04.20160927-0ubuntu1     amd64        library for passing menus over DBus
ii  libdbusmenu-gtk3-4:amd64    16.04.1+16.04.20160927-0ubuntu1     amd64        library for passing menus over DBus - GTK+ version
ii  libdbusmenu-gtk4:amd64       16.04.1+16.04.20160927-0ubuntu1     amd64        library for passing menus over DBus - GTK+ version
ii  libnet-dbus-perl                   1.1.0-3build1                                 amd64        Perl extension for the DBus bindings
ii  libnih-dbus1:amd64              1.0.3-4.3ubuntu1                            amd64        NIH D-Bus Bindings Library
ii  python3-dbus                     1.2.0-3                                          amd64        simple interprocess messaging system (Python 3 interface)



dbus 소스코드를 받아야한다. [링크]


wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/dbus/1.10.6-1ubuntu3.3/dbus_1.10.6.orig.tar.gz

wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/dbus/1.10.6-1ubuntu3.3/dbus_1.10.6-1ubuntu3.3.debian.tar.xz


다운로드후 두폴더 압축해제
$  cp debian/patches/*.patch dbus-1.10.6/
$ cd dbus-1.10.6/
패치 파일을 적용한다.
 patch -p1 format_string.patch
 patch -p1 < format_string.patch
 patch -p1 < Don-t-abort-on-fatal-warnings-by-default.patch
 patch -p1 < make-uid-0-immune-to-timeout.patch
 patch -p1 < dont-stop-dbus.patch
 patch -p1 < session.conf-system.conf-include-legacy-files-as-.dpkg-ba.patch
 patch -p1 < Doxyfile.in-do-not-put-timestamps-in-HTML-for-reprod.patch

capicxx-dbus-runtime/ 폴더로 이동하여 패치파일들을 적용해야한다.
src/dbus-patches

모든패치 적용

./configure --prefix=/opt/GENIVI/new --with-system-socket=/run/dbus/system_bus_socket
make -C dbus
make -C dbus install
make install-pkgconfigDATA

export PKG_CONFIG_PATH=/opt/GENIVI/new/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/opt/GENIVI/new/lib:$LD_LIBRARY_PATH


./configure --prefix=/opt/GENIVI/old--with-system-socket=/run/dbus/system_bus_socket

export PKG_CONFIG_PATH=/opt/GENIVI/old/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/opt/GENIVI/old/lib:$LD_LIBRARY_PATH



 sudo apt-get install libtool autoconf



  • capicxx-core-runtime
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/opt/GENIVI/new ..

make -j8

make install


capicxx-dbus-runtime



 cmake -D CMAKE_INSTALL_PREFIX=/opt/GENIVI/new ..


cmake -D CMAKE_INSTALL_PREFIX=/opt/GENIVI/new ..



VSOMIP 설치하기 는 아래글 참고

2018/12/20 - [Embedded/OpenSourceProject] - [GENIVI] vsomip 설치하기



'Embedded > CommonAPI' 카테고리의 다른 글

[GENIVI] ARA integration project  (0) 2019.01.04
[Franca] 작성하고 코드 생성하기  (0) 2019.01.03
[CommonAPI C++] D-Bus binding  (0) 2019.01.03
[CommonAPI] tool 설치 작성중  (0) 2019.01.02
[Dbus] 사용하기  (0) 2018.12.28


 저장소 링크 : https://github.com/GENIVI


총 83 개의 저장소가 존재한다. 


dlt-daemon

vehicle_signal_specification



'Embedded > OpenSourceProject' 카테고리의 다른 글

[Yocto] minifi-cpp_0.5.0  (0) 2018.12.24
[GENIVI] 그래픽공유와 & HMI 분리  (0) 2018.12.24
[GENIVI]002. meta-ivi 다운로드  (0) 2018.12.21
[GENIVI] vsomip 설치하기  (0) 2018.12.20
[AGL] 릴리즈 노트 정리  (0) 2018.12.20


Wifi 스펙

  • IEEE 802.11
  • Wifi-P2P -> Wifi Direct
  • Wifi-Display-> Miracast

WDS 란?
 Wireless Display Software  약자이다. 

아래의 라이브러리로 구성되어있다.
  • libwds : 
  • network : GLib 메인루프와 GStreamer 간 내부지원
  • p2p : Connman Wifi P2P feature

요구사항 : 
 
  • Wifi adapter from Intel 7260-family or Atheros ath9k
  • wpa_supplicant: version 2.4 or later, built with CONFIG_P2P=yCONFIG_WIFI_DISPLAY=y and CONFIG_CTRL_IFACE_DBUS_NEW=y
  • connman: version 1.28 (released Feb 1st 2015) or later.
  • gstreamer: either master branch more recent than Feb 3rd 2015 (commit d0a50be2), or 1.4 branch more recent than Feb 3rd 2005 (commit 1ce3260a638d or release 1.4.6 or later).


MIRACAST ON LINUX


1. 요구 라이브러리

  connman g++ cmake flex libbison-dev libglib2.0-dev libgstreamer1.0-dev


OpenSource Miracast


오픈 소스 프로젝트 리소스 : https://github.com/intel/wds


빌드 

$ sudo apt-get install flex

 $ sudo apt-get install libbison-dev




참고자료 


'Qt > Network' 카테고리의 다른 글

[WAMP] 설치  (0) 2019.01.03
[QLocalSocket] 도매인 소켓이란  (0) 2018.12.18
[Qt] 4K download 소스  (0) 2018.12.14


오픈소스인 Automotive Grade Linux [AGL]  프로젝트의 릴리즈 노트를 정리 해 보도록 한다.



AGL 사이트의 릴리즈노트 링크 : https://wiki.automotivelinux.org/agl-distro/release-notes#latest_stable_release


현재 최신버전


Grumpy Guppy  개발중인단계




 



'Embedded > OpenSourceProject' 카테고리의 다른 글

[Yocto] minifi-cpp_0.5.0  (0) 2018.12.24
[GENIVI] 그래픽공유와 & HMI 분리  (0) 2018.12.24
[GENIVI]002. meta-ivi 다운로드  (0) 2018.12.21
[GENIVI] vsomip 설치하기  (0) 2018.12.20
[GENIVI] 001.저장소 정리  (0) 2018.12.20

링크 연결

https://yyman.tistory.com/1125?category=743364



링크항목들을 정리해본다. 


1. [MongoDB] 설치하기 (webpage)

 - 웹서비스 등록방법

2. [MongoDB] Ubuntu 18.04 설치하기

 - Server 설치 방법

3. [MongoDB] mongocxx driver 설치

 - MongoDB 를 사용하기위한 API Library 설치방법

4. [MongoDB] API 튜토리얼

 - 기본 API 를 사용하기 위한 Qt 예제(첨부파일)



'Database' 카테고리의 다른 글

[Docker] MySQL 설치하기  (0) 2021.03.22
[MongoDB] API 튜토리얼  (0) 2018.12.19
[MongoDB] mongocxx driver 설치  (0) 2018.12.19
[MongoDB] Ubuntu 18.04 설치하기  (0) 2018.12.19
[MongoDB] 설치하기 (webpage)  (0) 2018.12.19

원문 : http://mongocxx.org/mongocxx-v3/tutorial/

참고하도록 


Qt 프레임워크를 통해 MongoDB API 를 사용해보자``


먼저 QtCreator 를 사용하기전에 환경변수를 추가한다. 


$ vim ~/.bashrc

export PATH=$PATH:/opt/pc_qt5.11.1/bin

export PATH=~/bin:/opt/arm-2013.11/bin:/home/kj/DB/mongodb-linux-x86_64-ubuntu1804-4.0.4/bin:$PATH


1. qt 프로젝트 생성

2. qt Build Environment 에 몽고디비가 설치된 환경변수를 생성한다.

 LD_LIBRARY_PATH  = /home/kj/DB/client/lib

PKG_CONFIG_PATH t=/home/kj/DB/client/lib/pkgconfig


3. Application 작성


1). project.pro 파일 맨 아래에 다음 옵션 추가

CONFIG += link_pkgconfig
PKGCONFIG += libmongocxx libbsoncxx


2). 헤더파일 추가

#include <bsoncxx/json.hpp>
#include <mongocxx/client.hpp>
#include <mongocxx/stdx.hpp>
#include <mongocxx/uri.hpp>
#include <mongocxx/instance.hpp> 
#include <QDebug>
#include <iostream>
#include <bsoncxx/builder/stream/document.hpp>


 

3) 소스 코드 작성


    mongocxx::instance inst{}; mongocxx::client conn{mongocxx::uri{}}; bsoncxx::builder::stream::document document{}; auto collection = conn["testdb1"]["testcollection"]; document << "hello" << "world3"; collection.insert_one(document.view()); auto cursor = collection.find({}); for (auto&& doc : cursor) { qDebug()<< QString::fromStdString(bsoncxx::to_json(doc)); } 

 


실행시 DB 에 데이터가 한개씩 추가되는 것을 알 수 있다.




Qt 에서 API 테스트 끝.

qt 버전 5.10.0


테스트 어플리케이션 첨부

MongoDB.tar.gz



'Database' 카테고리의 다른 글

[Docker] MySQL 설치하기  (0) 2021.03.22
[MongoDB] 관련 정리  (0) 2018.12.19
[MongoDB] mongocxx driver 설치  (0) 2018.12.19
[MongoDB] Ubuntu 18.04 설치하기  (0) 2018.12.19
[MongoDB] 설치하기 (webpage)  (0) 2018.12.19

아쉣더 날라가다니...






 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/kj/DB/client ../


-- Auto-configuring bsoncxx to use MNMLSTC for polyfills since C++17 is inactive

CMake Error at src/bsoncxx/CMakeLists.txt:81 (find_package):

  Could not find a configuration file for package "libbson-1.0" that is

  compatible with requested version "1.13.0".


  The following configuration files were considered but not accepted:


    /usr/lib/x86_64-linux-gnu/cmake/libbson-1.0/libbson-1.0-config.cmake, version: 1.9.2



libbson 버전을 변경해야 될거 같다. 현재 사용버전은 1.9.2  -> 1.13





오 생성됨 

   "/home/kj/DB/Driver/libbson/mongo-c-driver-1.12.0/build/src/libbson/libbson-1.0.so.0.0.0"

  to "/usr/local/lib/libbson-1.0.so.0.0.0".


가보자 이제 다시 젤첨 코드를 빌드한다.


아앗 1.13 이아니라 1.12 를 받았다. ......................

다시 다운로드  

$ wget https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz


빌드진행 설치 ->>>

  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/kj/DB/client ../


서설치가 되었다.!!!



정리해보면 다음과 같다.

mongo-c-driver-1.13.0 설치후 mongo-cxx-driver 를 설치한다.



설치된 경로 확인


/home/kj/DB/client 


패키지 pc 파일 정보 : /home/kj/DB/client/lib/pkgconfig

 - libbsoncxx.pc  libmongocxx.pc



코드 테스트해보도록 하자 : 예제참고링크


환경변수 등록



 

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/kj/DB/client/lib/pkgconfig

c++ --std=c++11 test.cpp -o test $(pkg-config --cflags --libs libmongocxx)

 ./test 

./test: error while loading shared libraries: libmongocxx.so._noabi: cannot open shared object file: No such file or directory



export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/kj/DB/client/lib



./test 

{ "_id" : { "$oid" : "5c19ea2ebdf13c4bca573d92" }, "hello" : "world" }


동작 확인 완료

..



기본환경변수 패스에 추가해 준다. vim ~/.bashrc


export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/kj/DB/client/lib/pkgconfig

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/kj/DB/client/lib



테스트 코드는 아래 링크를 따라가세요.

[MongoDB] API 튜토리얼 



'Database' 카테고리의 다른 글

[Docker] MySQL 설치하기  (0) 2021.03.22
[MongoDB] 관련 정리  (0) 2018.12.19
[MongoDB] API 튜토리얼  (0) 2018.12.19
[MongoDB] Ubuntu 18.04 설치하기  (0) 2018.12.19
[MongoDB] 설치하기 (webpage)  (0) 2018.12.19


몽고DB 설치하기


참고 페이지 : https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu-tarball/



나의 우분투버전은 Ubuntu 18.04 (Bionic 버전이다.)



MongoDB 를 설치하기위해서는 아래 패키지를 설치한다.


 sudo apt-get install libcurl4 openssl



1. 설치 파일 다운로드 :https://www.mongodb.com/download-center/community?jmp=docs



 2. 설치방법


1) 압축 파일 해제

  /home/db  $ tar xvf mongodb-linux-x86_64-ubuntu1804-4.0.4.tgz

2) 실행 폴더 환경변수 등록

export PATH=$PWD: (Mongodb/bin 패스)


나의 경우는 export PATH=$PWD:/home/kj/DB/mongodb-linux-x86_64-ubuntu1804-4.0.4/bin

환경변수 ~/.bashrc 파일안에 설정하였다.

3) data 와 log 디렉토리 생성

 sudo mkdir -p /MongoDB/db

 sudo mkdir -p /var/log/mongodb


4). 실행

sudo ./mongod --dbpath /MongoDB/db --logpath /var/log/mongodb/mongod.log --fork

 2018-12-19T15:06:28.614+0900 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'

about to fork child process, waiting until server is ready for connections.

forked process: 5739

child process started successfully, parent exiting




5.) ./mongo 를 통해 접속가능한지 확인

MongoDB shell version v4.0.4

connecting to: mongodb://127.0.0.1:27017

Implicit session: session { "id" : UUID("d1753a27-7745-47ef-9693-8696ca35a337") }

MongoDB server version: 4.0.4

Server has startup warnings: 

2018-12-19T15:06:28.622+0900 I STORAGE  [initandlisten] 

2018-12-19T15:06:28.622+0900 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine

2018-12-19T15:06:28.622+0900 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] 

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] 

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] ** WARNING: This server is bound to localhost.

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] **          Remote systems will be unable to connect to this server. 

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] **          Start the server with --bind_ip <address> to specify which IP 

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] **          addresses it should serve responses from, or with --bind_ip_all to

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] **          bind to all interfaces. If this behavior is desired, start the

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] **          server with --bind_ip 127.0.0.1 to disable this warning.

2018-12-19T15:06:29.847+0900 I CONTROL  [initandlisten] 

---

Enable MongoDB's free cloud-based monitoring service, which will then receive and display

metrics about your deployment (disk utilization, CPU, operation statistics, etc).


The monitoring data will be available on a MongoDB website with a unique URL accessible to you

and anyone you share the URL with. MongoDB may use this information to make product

improvements and to suggest MongoDB products and deployment options to you.


To enable free monitoring, run the following command: db.enableFreeMonitoring()

To permanently disable this reminder, run the following command: db.disableFreeMonitoring()




사용자 를 등록해준다.

> usb admin

2018-12-19T15:11:15.962+0900 E QUERY    [js] SyntaxError: missing ; before statement @(shell):1:4

> use admin

switched to db admin

> db.createUser({user: "root", pwd: "XXX!",roles:[{role: "root",db:"admin"}]});

Successfully added user: {

"user" : "root",

"roles" : [

{

"role" : "root",

"db" : "admin"

}

]

}



활용 테스트는 나중에. 

'Database' 카테고리의 다른 글

[Docker] MySQL 설치하기  (0) 2021.03.22
[MongoDB] 관련 정리  (0) 2018.12.19
[MongoDB] API 튜토리얼  (0) 2018.12.19
[MongoDB] mongocxx driver 설치  (0) 2018.12.19
[MongoDB] 설치하기 (webpage)  (0) 2018.12.19


Ubuntu 18.04 에 MongoDB 를 설치 해 보기로 한다.


공식사이트에서 회원가입


1. 완료시 다음과 같은 화면이 뜬다.


2. 선택항목들은 다음과 같다.

Cloud Provider & Region

 3가지 항목이 존재한다. 

 AWS , Google Cloud Platform, Azure


Additional Settings : MongoDB4.0 , No Backup  

백업기능을 사용하려면 돈이필요하나 보다. ㅎ


 - Cluster Name 을 설정한다. IVIS 로 설정


3.  클러스터 생성중. 7 ~ 10분정도 소요


4. 완료된 화면





정리는 나중에.. tobe




'Database' 카테고리의 다른 글

[Docker] MySQL 설치하기  (0) 2021.03.22
[MongoDB] 관련 정리  (0) 2018.12.19
[MongoDB] API 튜토리얼  (0) 2018.12.19
[MongoDB] mongocxx driver 설치  (0) 2018.12.19
[MongoDB] Ubuntu 18.04 설치하기  (0) 2018.12.19

+ Recent posts