'개발환경'에 해당되는 글 15건

  1. 2016.07.21 Apache server 설정 및 확인
  2. 2015.01.22 실행파일 및 라이브러리 파일의 의존성 파악
  3. 2014.12.19 HLS 개발환경 구축
  4. 2014.12.16 ubuntu 14.04
  5. 2014.12.07 git
  6. 2013.11.05 Cross Compile OpenSSL (MIPS)
  7. 2013.06.09 ubuntu 12.04 NFS 설정
  8. 2013.06.09 ubuntu 12.04 TFTP 설정
  9. 2013.06.03 ubuntu 12.04 후 추가 작업
  10. 2013.06.03 ssh install

Apache server 설정 및 확인

개발환경/mac 2016. 7. 21. 18:40

참고 사이트에서 설명한 것처럼 Mac에서는 이미 아파치 서버가 설치되어서 동작하고 있다.


제가 잘 몰라서 그런지는 모르지만  /etc/apache2/users 에 conf 파일이 존재하지 않아서

그냥 apache 기존 conf 파일에 직접 수정했다.


1. 수정 사항

/etc/apache2/http.conf 파일에서 기존 코드 모두 주석 처리하고 아래 코드로 대체했다.

결국 Directory 테그만 수정한 형태이다.



2. 테스트

동작확인도 참조 사이트에서 사용한 html문서를 사용하였다. 


webbrower에서 

http://localhost/mpeg/index.html로 확인


webserver에서 서비스하는 root directory가 이제 홈 아래 Sites로 변경되었다.


3. 참고 사이트


아래 사이트에 정리가 잘 되어 있는데, 조금 다른점만 다시 정리한다.


http://blog.acronym.co.kr/531

:

실행파일 및 라이브러리 파일의 의존성 파악

개발환경 2015. 1. 22. 13:34

1. ldd 명령어


프로그램 또는 공유 라이브러리 실행에 필요한 공유 라이브러리 목록을 보여준다. 

즉 현재 실행 파일의 동적 의존성 라이브러리를 열거한다.

ldd는 때론 동작하지 않는 경우가 있다. (32bit, 64bit 환경 비매칭으로)


$ldd 실행파일 또는 공유 라이브러리


2. objdump/readelf 명령어


ELF 섹션 헤더로부터 정보를 추출해 화면에 출력해 준다.


$objdump -p 실행파일 또는 공유라이브러리 | grep NEEDED


3. 특정 심볼 정보 검색


라이브러리나 실행파일에 특정 심볼(함수)가 있는지 검색은 아래와 같이 수행한다. 


$nm -A /usr/lib/lib*.so 2> /dev/null | grep ` crypt$`


'개발환경' 카테고리의 다른 글

git  (0) 2014.12.07
:

HLS 개발환경 구축

개발환경/ubuntu 2014. 12. 19. 13:45

1. ffmpeg 설치 


ubuntu 14.04에서 아래와 같이 하면 빌드 안하고 간단히 설치할 수 있음. 


#sudo apt-add-repository ppa:mc3man/trusty-media

#sudo apt-get update

#sudo apt-get install ffmpeg gstreamer0.10-ffmpeg


2. ffmpeg segment muxer를 이용한 HLS 파일 생성


ffmpeg -i [소스파일] [m3u8 파일]

#ffmpeg - test.ts playlist.m3u8


2.1. ffmpeg segment muxer option


 hls_time seconds

 segment length, default 2 second

 hls_list_size size

 playlist 최대 갯수, default 5, 한파일에 모든 playlist 넣기위해서는 '0'을 설정

 hls_ts_options options_list

 이해 안됨

 hls_wrap wrap

 이해 안됨 

 start_number number

 playlist 중에 어떤 값부터 시작할 것인지 설정

 hls_allow_cache allowcache

 쓸일 없어 보임. 

 hls_base_url baseurl

 playlist 파일명 앞에 붙을 url값 

 hls_segment_filename filename

 segment 파일의 이름을 지정

 hls_flags single_file

 segment별로 별도 파일 생성하지 않고 하나의 파일에 모두 집어 넣음. 

 hls_flags delete_segments

 실제 play할 시간에 해당하지 않는 segment 파일은 삭제한다. 


2.2. option example


#ffmpeg -i test.ts -hls_time 1 playlist.m3u8             (segment 파일 길이를 1초로 하겠다. 1초는 안먹는 듯)

#ffmpeg -i test.ts -hls_list_size 0 playlist.m3u8         (옵션 사용하지 않으면 playlist에 5개 밖에 없음)


3. VLC 설치 및 Local에서 확인


#sudo apt-get install vlc

#vlc playlist.m3u8                                                         


3.1. Apache2 Server를 이용해서 Play 확인


#mv playlist*.ts playlist.m3u8 ~$HOME/public_html       (public_html은 Apache 폴더)

#vlc http://localhost/~hskim/playlist.m3u8


위 http://localhost/~hskim 으로 ~hskim이 들어간 이유는 아래 reference에서 개인 폴더에서 Apache2 서비스를 

수행가능하도록 작업을 하였기 때문에 가능하다. 

그렇지 않으면 default 폴더는 /var/www/html 이다. 물론 여기에 넣어도 되는데 여기에 파일을 넣으면 

vlc http://localhost/playlist.m3u8이 될 것이다. 


4. ffmpeg build 시 필요한 resources


위의 1. ~ 3.까지 과정은 ffmpeg가 별도 필요없이 진행하고자 할 경우에 해당하고 아래는 빌드 원하면 

추가적으로 필요한 내용들이다. 


4.1. yasm 설치


#sudo apt-get install yasm


4.2. ffmpeg get and build


#wget http://ffmpeg.org/releases/ffmpeg-2.5.1.tar.bz2

#./configure --prefix=$HOME/ffmpeg_build

#make

#make install


git을 이용해서 받을 수 있지만 그냥 최신 release파일을 받는다. 

기본적으로 unbuntu에서 필요한 library들을 설치해서 configuration이 그냥 되지만 다른 library에 대한 

소스를 받고 싶으면 해당 사이트에 방문해서 받으면 됨. 


5. reference


https://www.ffmpeg.org/ffmpeg-formats.html


* Ubuntu Apache 서버를 개인 HOME으로 설정하기 위해서 필요한 정보가 아래 Link에 존재


http://s2junn.tistory.com/56


'개발환경 > ubuntu' 카테고리의 다른 글

ubuntu 14.04  (0) 2014.12.16
ubuntu 12.04 NFS 설정  (0) 2013.06.09
ubuntu 12.04 TFTP 설정  (0) 2013.06.09
ubuntu 12.04 후 추가 작업  (0) 2013.06.03
ssh install  (0) 2013.06.03
:

ubuntu 14.04

개발환경/ubuntu 2014. 12. 16. 20:28

1. root 권한에 password 설정

 

$hskim@hskim-VirtualBox: sudo su

root@hskim-VirtualBox: passwd

Enter new UNIX password:

Retype new UNIX password:


2. 일반 user sudo 권한 주기


/etc/sudoers 파일에서 아래 빨강색 부분 추가 

$vim /etc/sudoers

# User privilege specification

root    ALL=(ALL:ALL) ALL


# Members of the admin group may gain root privileges

%admin ALL=(ALL) ALL


# Allow members of group sudo to execute any command

%sudo   ALL=(ALL:ALL) ALL

%hskim  ALL=(ALL:ALL) ALL


# See sudoers(5) for more information on "#include" directives:


#includedir /etc/sudoers.d



3. eclipse, eclipse cdt 및 g++ 설치 



#sudo apt-get install eclipse

#sudo apt-get install eclipse-cdt g++


4. display resolution solution 

 

#sudo apt-get install virtualbox-guest-dkms

 

'개발환경 > ubuntu' 카테고리의 다른 글

HLS 개발환경 구축  (0) 2014.12.19
ubuntu 12.04 NFS 설정  (0) 2013.06.09
ubuntu 12.04 TFTP 설정  (0) 2013.06.09
ubuntu 12.04 후 추가 작업  (0) 2013.06.03
ssh install  (0) 2013.06.03
:

git

개발환경 2014. 12. 7. 16:32

1. remote repository 만들기

1
2
3
4
5
6
7
8
9
10
11
# mkdir remote (/home/git/remote 위치)
# pwd
/home/git/remote
# cd ..
# git clone --bare remote remote.git (remote는 폴더 이름)
Cloning into bare repository remote.git ...
done.
# touch remote.git/git-daemon-export-ok
# rm -rf remote (폴더 삭제)
# cd remote.git
# git --bare update-server-info


2. remote repository clone 하기

unbuntu 개발환경의 IP주소가 192.168.0.9라고 가정하면 아래와 같다. 

clone 명령어 : git clone [userID]@[URL]:[저장소위치]

1
2
3
4
5
6
7
8
# mkdir local (/home/git/local 위치)
# cd local
# pwd
/home/git/local
# git clone hskim@192.168.0.9:/home/git/remote
# git remote -v (remote repository 생성 확인)
origin hskim@192.168.0.9:/home/git/remote/remote.git (fetch)
origin hskim@192.168.0.9:/home/git/remote/remote.git (push)


5. reference

http://twipixel.com/blog/2014/03/18/git-%EC%9B%90%EA%B2%A9%EC%A0%80%EC%9E%A5%EC%86%8C-%EB%A7%8C%EB%93%A4%EA%B3%A0-clone-%ED%95%98%EA%B8%B0/

'개발환경' 카테고리의 다른 글

실행파일 및 라이브러리 파일의 의존성 파악  (0) 2015.01.22
:

Cross Compile OpenSSL (MIPS)

개발환경/opensource 2013. 11. 5. 10:33

1. Compile 배경

 

libcurl 7.18.0에서 Invalid easy handle Error 문제 확인.

 

libcurl 7.18.0 depend on OpenSSL-0.9.8k

 

2. OpenSSL-0.9.8k Cross Compile Based on MIPS

 

1] Patch 적용

 

*patch 위치

http://svn.cross-lfs.org/svn/repos/patches/openssl/openssl-0.9.8k-mips_support-1.patch

 

*patch 파일

 

openssl-0.9.8k-mips_support-1.patch


 

cd openssl-0.9.8k

patch -p1 < openssl-0.9.8k-mips_support-1.patch

 

2] Configuration

 

./Configure linux-mipsel shared no-sse2 no-thread no-sam no-zlib

 

OpenSSL은 default로 Shared Library를 만들지 않는다. Shared Library를 만들기 위해서는 위에서처럼

"shared" 옵션을 주어야 한다.

 

3] Makefile 수정

 

INSTALLTOP=/usr/local/ssl                                             [기본설정값]

--> 설치를 원하는 곳을 지정

 

OPENSSLDIR=/usr/local/ssl                                            [기본설정값]

--> 설치를 원하는 곳을 지정, INSTALLTOP과 동일하게 설정하면 된다.

 

CC=gcc                                                                         [기본설정값]

AR=ar $(ARFLAGS) r                                                       [기본설정값] 

ARD=ar $(ARFLAGS) d                                                    [기본설정값]

RANLIB=/usr/bin/ranlib                                                   [기본설정값]

 

위의 컴파일 관련부분을 Cross Compiler에 맞게 수정한다.

 

모든 것이 마무리되면 make하고 make install하면 정상동작할 것이다.

 

 

 

 

 

'개발환경 > opensource' 카테고리의 다른 글

Yaffs Kernel Configuration  (1) 2012.06.04
GTK Cross Compie for ARM  (0) 2012.06.04
basic opensource cross compile for ARM  (0) 2012.06.04
Directfb Cross Compile for ARM  (0) 2012.06.04
:

ubuntu 12.04 NFS 설정

개발환경/ubuntu 2013. 6. 9. 23:26

1. 패키지 설치

 

$ sudo apt-get install nfs-common nfs-kernel-server portmap

 

2. 환경 설정

 

# /etc/exports
/[directory] [Access IP adress](option)
e.g.
/home 192.168.0.11(rw,sync,no_root_squash,no_subtree_check)

 

 It says 'I would like to share /home folder with 192.168.0.11'
* Options
rw: read-write
no_root_squash: set server and client to be same

 

3. Restart server

 

$ sudo /etc/init.d/nfs-kernel-server restart
$ sudo /etc/init.d/portmap restart

 

4. 기타

 

1) Make directory used for NFS in client

 

$ sudo mkdir /export
$ sudo mkdir /export/test
$ sudo chmod 777 /export
$ sudo chmod 777 /export/test


2) Edit /etc/fstab in client

# /etc/fstab
[IP address]:/home /export/test
e.g.
192.168.0.11:/home /export/test nfs rsize=8192,wsize=8192,timeo=14,intr

 

'개발환경 > ubuntu' 카테고리의 다른 글

HLS 개발환경 구축  (0) 2014.12.19
ubuntu 14.04  (0) 2014.12.16
ubuntu 12.04 TFTP 설정  (0) 2013.06.09
ubuntu 12.04 후 추가 작업  (0) 2013.06.03
ssh install  (0) 2013.06.03
:

ubuntu 12.04 TFTP 설정

개발환경/ubuntu 2013. 6. 9. 23:16

1. Package 설치

 

$ sudo apt-get install tftp tftpd
xinetd가 인스톨 되어 있지 않을 경우 xinetd를 인스톨 한다.
$ sudo apt-get install xinetd

 

2. xinetd 설정

 

$ sudo vi /etc/xinetd.d/tftp

 

/etc/xinetd.d/tftp에 이하의 내용을 추가합니다.(있을 경우 수정, disable=no로 바꾸는 것에 주의)

 

# default: off
# description: The tftp server serves files using the Trivial File Transfer \
#    Protocol.  The tftp protocol is often used to boot diskless \
#    workstations, download configuration files to network-aware printers, \
#    and to start the installation process for some operating systems.
service tftp
{
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -s /tftpboot
    disable         = no
}

 

3. xinet 서비스 재 가동

 

$ sudo service xinetd restart
or
$ sudo /etc/init.d/xinetd restart

 

'개발환경 > ubuntu' 카테고리의 다른 글

ubuntu 14.04  (0) 2014.12.16
ubuntu 12.04 NFS 설정  (0) 2013.06.09
ubuntu 12.04 후 추가 작업  (0) 2013.06.03
ssh install  (0) 2013.06.03
samba 설정 - ubuntu 12.04  (0) 2013.06.03
:

ubuntu 12.04 후 추가 작업

개발환경/ubuntu 2013. 6. 3. 11:42

1. Network Interface 설정

 

# sudo vim /etc/network/interface

auto eth0

iface eth0 inet static

address 192.168.0.2

netmask 255.255.255.0

gateway 192.168.0.1

dns-nameservers 156.147.69.133

 

위에서 dns 설정을 해주었는데도 dns 응답이 없다면 아래와 같이 설정

 

# sudo vim /etc/resolv.conf

 nameserver 156.147.69.133

 

2. Software Package List Update & Upgrade

 

# sudo apt-get update & apt-get upgrade

 

3.SSH Server Installation for Remote Connection

 

# dpkg -l | grep ssh

<! -- ssh server package installation --> 

# sudo apt-get install openssh-server

<! -- ssh configuration -->

#sudo vim /etc/ssh/ssh_config

Port 10000

Protocol 2

PermitRootLogin no

 

4. ethtool 및 기타 Network Package Installation

 

# sudo apt-get install ethtool

 

5. Synaptic Package Installastion 

 

# sudo apt-get install synaptic

 

6. 기타

 

언어팩이 정상적으로 설치되지 않는 경우, kr.archive.ubuntu.com 한글 언어팩이 정상적으로 다운되지 않는 것이다.

시냅틱에서 설정>저장소를 실행한 후 다운로드 위치를 ftp.daum.net으로 설정한다.

설정 후, language-pakc-ko를 설치

 

마우스 오른쪽 메뉴에 터미널 나타내기

 

# sudo apt-get install nautilus-open-terminal

 

7. Referenc Site

 

http://blog.boanhack.com/54

 

 

'개발환경 > ubuntu' 카테고리의 다른 글

ubuntu 14.04  (0) 2014.12.16
ubuntu 12.04 NFS 설정  (0) 2013.06.09
ubuntu 12.04 TFTP 설정  (0) 2013.06.09
ssh install  (0) 2013.06.03
samba 설정 - ubuntu 12.04  (0) 2013.06.03
:

ssh install

개발환경/ubuntu 2013. 6. 3. 10:19

1. Package 설치

 

  - sudo apt-get install ssh

 

or

 

  - sudo apt-get install openssh-server

 

 

2. 설정 파일 변경

 

  - sudo leafpad /etc/ssh/sshd_config

 

 

3. Damon Restart

 

  - sudo /etc/init.d/ssh restart

 

or

 

  - sudo service ssh restart

 

4. Referenc Site

 

http://www.liberiangeek.net/2012/03/enable-ssh-secure-shell-in-ubuntu-12-04-precise-pangolin/

 

 

'개발환경 > ubuntu' 카테고리의 다른 글

ubuntu 14.04  (0) 2014.12.16
ubuntu 12.04 NFS 설정  (0) 2013.06.09
ubuntu 12.04 TFTP 설정  (0) 2013.06.09
ubuntu 12.04 후 추가 작업  (0) 2013.06.03
samba 설정 - ubuntu 12.04  (0) 2013.06.03
: