목록Software Engineering/Linux (25)
Pure Software Engineer :)
1. 삼바 설치sudo apt-get updatesudo apt-get install samba 2. 사용자 비밀번호 설정sudo smbpasswd -a 3. 공유 디렉토리 생성 (필요시)mkdir /home// 4. 삼바 설정 추가/etc/samba/smb.conf 파일 맨 아래에 다음과 같이 추가---------------------------------------------[]path = /home//available = yesvalid users = read only = nobrowseable = yespublic = yeswritable = yes--------------------------------------------- 5. 삼바 데몬 재시작sudo service smbd restart ..
Raspberry pi2를 target으로 리눅스 커널 부팅과정을 스터디 중.이 글은 커널 소스의 Documentation/arm/Booting 문서를 참고하여 작성한 글이다. 부트로더는 다음의 5가지 일을 한다.1. RAM 초기화2. 시리얼 포트 초기화3. Detect the machine type4. kernel tagged list 설정5. kernel image 호출 3. Detect the machine typearch/arm/tools/mach-types에 각 machine별 정보를 파일로 제공한다. # Database of machine macros and numbers ... # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number...prima2_evb M..
Ubuntu 12.04 버전에서 ruby dependency가 있는 다른 package를 설치할 일이 있었는데,ruby 버전이 너무 낮아서 에러가 발생했다. ubuntu 12.04에는 기본적으로 ruby1.8버전과 1.9.3버전이 설치되어 있는듯 하다.apt-get으로 설치하면 1.8 or 1.9.3 버전만 계속 설치되기에 2.* 소스를 받아서 직접 빌드해서 설치했다. 1. 먼저 ruby 이전 버전을 삭제하고$ sudo apt-get purge ruby1.8$ sudo apt-get purge ruby1.9.3 2. ruby 소스를 받아서 컴파일$ wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p481.tar.gz$ tar -xvzf ruby-2.0...
아래 명령만 잘 알고 있으면 아주 유용하게 사용할 수 있을 듯 $ ps -ef | grep ssh | grep -v grep | awk '{print $2}' | xargs kill -l$ sort test.txt | uniq | awk '{print $1'} | xargs touch$ export PATH="$PATH:/opt"$ crontab -l$ crontab -e0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ References리눅스와 함께하는 라즈베리 파이
우연히 본 글.UNIX 계열에서 프로세스를 모니터링, 디버깅하는데 아주 유용한 도구인것 같다.덤으로 lsof (list open files)까지 알게되고... Referenceshttp://chadfowler.com/blog/2014/01/26/the-magic-of-strace/
1. Ubuntu// install packages$ sudo apt-get install liblog4cxx10-dev$ sudo apt-get install libjansson-dev$ sudo apt-get install libcppunit-dev // gdal은 소스코드 받아서 인스톨$ wget http://download.osgeo.org/gdal/1.11.2/gdal-1.11.2.tar.gz$ tar xvf gdal-1.11.2.tar.gz$ cd gdal-1.11.2$ ./configure$ make$ sudo make install // build MR4C// build_all에서 native, geospatial, tools/build_yarn 3개를 빌드// native는 빌드 되는데 ..
우분투 패키지 관리자 apt-get 명령어를 통해 node 를 설치했을시 최신버전이 아니라 old 버전이 설치된다. $ apt-get install nodejs // old 버전 node 설치 아무 생각없이 위의 명령으로 node 설치하고, express 설치하려했더니 버전이 안맞다는 에러가 나서 확인해 보니 최신버전이 아니었다. 최신 버전 node를 설치하려면 다음과 같이 한다. 배포판 : Ubuntu 12.04 $ apt-get install python-software-properties $ apt-add-repository ppa:chris-lea/node.js // 이 과정에서 계속 진행할건지 경고 문구가 나오는데 계속 진행하기 위해 ENTER $ apt-get update 위의 2번째 comm..
Xen에서는 guest domain이 PCI 디바이스를 직접 사용할수 있도록 PCI passthrough 를 지원한다. 이를 사용하기 위해 커널 컴파일할때 모듈은 선택해줘야한다. dom0에서는 pci-backend 디바이스가 있어야 하며domU에서는 pci-frontend 디바이스가 있어야 한다. 이제 PCI passthrough를 사용해보자 먼저 dom0에서 domU에게 건내줄 디바이스 번호를 알아야 한다.$ lspci 를 통해 PCI 디바이스 목록을 볼수 있다.아래는 하나의 예이다. 0b:00.0 Power PC: Device eee0:fed0 (rev 01) passthrough하는 방법은 static, dynamic(xl, sysfs) 등 여러가지 방법이 있는데여기서는 dynamic assignm..