miniserver:start
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판이전 판다음 판 | 이전 판 | ||
miniserver:start [2015/05/22 15:07] – 블루투스 사용 챕터 추가. changwoo | miniserver:start [2017/07/24 00:41] (현재) – [주요 토픽들] changwoo | ||
---|---|---|---|
줄 1: | 줄 1: | ||
- | ====== 미니 서버 | + | ====== 미니 서버 문서 ====== |
- | ===== 서버 모델과 사양 ===== | + | |
- | 모델: ZOTAC ZBOX CI320 nano ([[http:// | + | |
- | * CPU: Intel Celeron N2930 | + | |
- | * RAM: 8GB | + | |
- | * HDD: WD 1TB | + | |
- | lspci -v | + | ===== 주요 토픽들 |
- | < | + | [[miniserver:xenial|Ubuntu |
- | 00:00.0 Host bridge: Intel Corporation Atom Processor Z36xxx/ | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/ | + | |
- | Flags: bus master, fast devsel, latency 0 | + | |
- | Kernel modules: iosf_mbi | + | |
- | + | ||
- | 00:02.0 VGA compatible controller: Intel Corporation Atom Processor Z36xxx/ | + | |
- | DeviceName: | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/ | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 7 | + | |
- | Memory at d0000000 (32-bit, non-prefetchable) [size=4M] | + | |
- | Memory at c0000000 (32-bit, prefetchable) [size=256M] | + | |
- | I/O ports at f080 [size=8] | + | |
- | Expansion ROM at < | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | + | ||
- | 00:12.0 SD Host controller: Intel Corporation Atom Processor Z36xxx/ | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/ | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 47 | + | |
- | Memory at d081a000 (32-bit, non-prefetchable) [size=4K] | + | |
- | Memory at d0819000 (32-bit, non-prefetchable) [size=4K] | + | |
- | Capabilities: | + | |
- | + | ||
- | 00:13.0 SATA controller: Intel Corporation Device 0f23 (rev 0e) (prog-if 01 [AHCI 1.0]) | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. Device b219 | + | |
- | Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 87 | + | |
- | I/O ports at f070 [size=8] | + | |
- | I/O ports at f060 [size=4] | + | |
- | I/O ports at f050 [size=8] | + | |
- | I/O ports at f040 [size=4] | + | |
- | I/O ports at f020 [size=32] | + | |
- | Memory at d0818000 (32-bit, non-prefetchable) | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Kernel driver in use: ahci | + | |
- | Kernel modules: ahci | + | |
- | + | ||
- | 00:14.0 USB controller: Intel Corporation Atom Processor Z36xxx/ | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/ | + | |
- | Flags: bus master, medium devsel, latency 0, IRQ 88 | + | |
- | Memory at d0800000 (64-bit, non-prefetchable) [size=64K] | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Kernel driver in use: xhci_hcd | + | |
- | Kernel modules: xhci_hcd | + | |
- | + | ||
- | 00:17.0 SD Host controller: Intel Corporation Device 0f50 (rev 0e) (prog-if 01) | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 44 | + | |
- | Memory at d0817000 (32-bit, non-prefetchable) [size=4K] | + | |
- | Memory at d0816000 (32-bit, non-prefetchable) [size=4K] | + | |
- | Capabilities: | + | |
- | + | ||
- | 00:1a.0 Encryption controller: Intel Corporation Atom Processor Z36xxx/ | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/ | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 23 | + | |
- | Memory at d0500000 (32-bit, non-prefetchable) [size=1M] | + | |
- | Memory at d0400000 (32-bit, non-prefetchable) [size=1M] | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | + | ||
- | 00:1b.0 Audio device: Intel Corporation Atom Processor Z36xxx/ | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/ | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 22 | + | |
- | Memory at d0810000 (64-bit, non-prefetchable) [size=16K] | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | + | ||
- | 00:1c.0 PCI bridge: Intel Corporation Device 0f48 (rev 0e) (prog-if 00 [Normal decode]) | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 16 | + | |
- | Bus: primary=00, secondary=01, | + | |
- | I/O behind bridge: 0000e000-0000efff | + | |
- | Memory behind bridge: d0700000-d07fffff | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Kernel driver in use: pcieport | + | |
- | + | ||
- | 00:1c.1 PCI bridge: Intel Corporation Device 0f4a (rev 0e) (prog-if 00 [Normal decode]) | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 17 | + | |
- | Bus: primary=00, secondary=02, | + | |
- | I/O behind bridge: 00001000-00001fff | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Kernel driver in use: pcieport | + | |
- | + | ||
- | 00:1c.2 PCI bridge: Intel Corporation Device 0f4c (rev 0e) (prog-if 00 [Normal decode]) | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 18 | + | |
- | Bus: primary=00, secondary=03, | + | |
- | I/O behind bridge: 00002000-00002fff | + | |
- | Memory behind bridge: d0600000-d06fffff | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Kernel driver in use: pcieport | + | |
- | + | ||
- | 00:1c.3 PCI bridge: Intel Corporation Device 0f4e (rev 0e) (prog-if 00 [Normal decode]) | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 19 | + | |
- | Bus: primary=00, secondary=04, subordinate=04, | + | |
- | I/O behind bridge: 00003000-00003fff | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Kernel driver in use: pcieport | + | |
- | + | ||
- | 00:1d.0 USB controller: Intel Corporation Atom Processor Z36xxx/ | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/ | + | |
- | Flags: bus master, medium devsel, latency 0, IRQ 23 | + | |
- | Memory at d0815000 (32-bit, non-prefetchable) [size=1K] | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Kernel driver in use: ehci-pci | + | |
- | Kernel modules: ehci_pci | + | |
- | + | ||
- | 00:1f.0 ISA bridge: Intel Corporation Atom Processor Z36xxx/ | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/ | + | |
- | Flags: bus master, medium devsel, latency 0 | + | |
- | Capabilities: | + | |
- | + | ||
- | 00:1f.3 SMBus: Intel Corporation Device 0f12 (rev 0e) | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. Device b219 | + | |
- | Flags: medium devsel, IRQ 10 | + | |
- | Memory at d0814000 (32-bit, non-prefetchable) [size=32] | + | |
- | I/O ports at f000 [size=32] | + | |
- | Capabilities: | + | |
- | Kernel modules: i2c_i801 | + | |
- | + | ||
- | 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/ | + | |
- | Subsystem: ZOTAC International (MCO) Ltd. RTL8111/ | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 89 | + | |
- | I/O ports at e000 [size=256] | + | |
- | Memory at d0704000 (64-bit, prefetchable) [size=4K] | + | |
- | Memory at d0700000 (64-bit, prefetchable) [size=16K] | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Kernel driver in use: r8169 | + | |
- | Kernel modules: r8169 | + | |
- | + | ||
- | 03:00.0 Network controller: Intel Corporation Wireless 3160 (rev 83) | + | |
- | Subsystem: Intel Corporation Dual Band Wireless-AC 3160 | + | |
- | Flags: bus master, fast devsel, latency 0, IRQ 90 | + | |
- | Memory at d0600000 (64-bit, non-prefetchable) [size=8K] | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Capabilities: | + | |
- | Kernel driver in use: iwlwifi | + | |
- | Kernel modules: iwlwifi | + | |
- | </ | + | |
- | + | ||
- | 현재 젠투 리눅스 | + | |
- | + | ||
- | 서비스 목록은 다음과 같다. | + | |
- | * 아파치 서버 | + | |
- | * PHP, wsgi (flask) | + | |
- | * Wordpress (http:// | + | |
- | * Dokuwiki (http:// | + | |
- | * ownCloud (http:// | + | |
- | * 토렌트 서버: transmission (http:// | + | |
+ | [[miniserver: | ||
===== 아파치2 SSL 구축 ===== | ===== 아파치2 SSL 구축 ===== | ||
줄 222: | 줄 43: | ||
+ | |||
+ | ===== 사운드 설정 ===== | ||
+ | < | ||
+ | $ sudo apt-get remove --purge alsa-base pulseaudio | ||
+ | $ sudo apt-get install alsa-base pulseaudio | ||
+ | $ sudo alsa force-reload | ||
+ | </ | ||
+ | alsamixer 에서 MUTED 해제. ' | ||
===== 블루투스 사용 ===== | ===== 블루투스 사용 ===== | ||
+ | < | ||
+ | # apt-get install bluez python-gobject python-dbus | ||
+ | </ | ||
+ | |||
+ | 블루투스 스피커를 사용해 보고 싶어 작업을 진행해 보았다. | ||
+ | bluez, bluez-tools 패키지 설치. 설치 후 장비 검색 명령 | ||
+ | < | ||
+ | $ hcitool scan | ||
+ | Scanning ... | ||
+ | 40: | ||
+ | 28: | ||
+ | </ | ||
+ | '' | ||
+ | |||
+ | 서버에 사운드 설정을 하지 않아서 pulseaudio를 설치했다. | ||
+ | < | ||
+ | $ sudo apt-get install pulseaudio bluez-alsa | ||
+ | $ sudo update-rc.d pulseaudio defaults | ||
+ | $ sudo update-rc.d bluetooth defaults | ||
+ | </ | ||
+ | |||
+ | |||
+ | [[.: | ||
+ | |||
+ | ====== BitTorrent Sync 사용 ====== | ||
+ | |||
+ | vagrant와 이를 이용한 virtual machine 내역을 공유하기 위하여 NAS에 BitTorrent Sync를 이용해 보았다. 대용량 파일 변화 감지에 매우 유용하므로, | ||
+ | |||
+ | 우선 이전 [[project: | ||
+ | 문서를 작성하는 2015년 11월까지도 리눅스는 별도의 GUI는 제공하지 않으므로, | ||
+ | |||
+ | ===== NAS Config ===== | ||
+ | 별도의 사용자 btsync를 만들고 홈디렉토리에 .sync 디렉토리를 생성하고 여기에 모든 설정 파일등을 집어 넣는 식으로 작성하였다 | ||
+ | 이와 관련해서는 이전 문서를 참고. | ||
+ | |||
+ | < | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | |||
+ | /* storage_path dir contains auxilliary app files if no storage_path field: .sync dir created in the directory | ||
+ | where binary is located. otherwise user-defined directory will be used */ | ||
+ | " | ||
+ | |||
+ | /* set location of pid file */ | ||
+ | " | ||
+ | |||
+ | /* use UPnP for port mapping */ | ||
+ | " | ||
+ | |||
+ | /* limits in kB/s. 0 - no limit */ | ||
+ | " | ||
+ | " | ||
+ | |||
+ | /* proxy configuration */ | ||
+ | // " | ||
+ | // " | ||
+ | // " | ||
+ | // " | ||
+ | // " | ||
+ | // " | ||
+ | |||
+ | " | ||
+ | { | ||
+ | " | ||
+ | |||
+ | /* preset credentials. Use password or password_hash */ | ||
+ | // ," | ||
+ | // ," | ||
+ | // ," | ||
+ | // ," | ||
+ | /* ssl configuration */ | ||
+ | // ," | ||
+ | // ," | ||
+ | // ," | ||
+ | |||
+ | /* directory_root path defines where the WebUI Folder browser starts (linux only). Default value is / */ | ||
+ | // ," | ||
+ | |||
+ | /* directory_root_policy defines how directory_root is used (linux only). | ||
+ | Valid values are: | ||
+ | " | ||
+ | " | ||
+ | but denies attempts to use ' | ||
+ | | ||
+ | // ," | ||
+ | |||
+ | /* dir_whitelist defines which directories can be shown to user or have folders added (linux only) | ||
+ | | ||
+ | // ," | ||
+ | } | ||
+ | |||
+ | /* !!! if you set shared folders in config file WebUI will be DISABLED !!! | ||
+ | | ||
+ | |||
+ | , " | ||
+ | [ | ||
+ | /* { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | [ | ||
+ | " | ||
+ | ] | ||
+ | } */ | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | |||
+ | /* Advanced preferences can be added to config file. Info is available at " | ||
+ | For example see folder_rescan_interval below */ | ||
+ | // " | ||
+ | |||
+ | } | ||
+ | </ | ||
+ | |||
+ | 이 정도 예로 만들면 될 것 같다. | ||
+ | 아래는 우분투에서 쓸 init script | ||
+ | |||
+ | < | ||
+ | #!/bin/sh | ||
+ | ### BEGIN INIT INFO | ||
+ | # Provides: btsync | ||
+ | # Required-Start: | ||
+ | # Required-Stop: | ||
+ | # Should-Start: | ||
+ | # Should-Stop: | ||
+ | # Default-Start: | ||
+ | # Default-Stop: | ||
+ | # Short-Description: | ||
+ | # Description: | ||
+ | ### END INIT INFO | ||
+ | |||
+ | # Replace with linux users you want to run BTSync clients for | ||
+ | BTSYNC_USERS=" | ||
+ | DAEMON=/ | ||
+ | |||
+ | start() { | ||
+ | for btsuser in $BTSYNC_USERS; | ||
+ | HOMEDIR=`getent passwd $btsuser | cut -d: -f6` | ||
+ | config=$HOMEDIR/ | ||
+ | if [ -f $config ]; then | ||
+ | echo " | ||
+ | start-stop-daemon -b -o -c $btsuser -S -u $btsuser -x $DAEMON -- --config $config | ||
+ | else | ||
+ | echo " | ||
+ | fi | ||
+ | done | ||
+ | } | ||
+ | |||
+ | stop() { | ||
+ | for btsuser in $BTSYNC_USERS; | ||
+ | dbpid=`pgrep -fu $btsuser $DAEMON` | ||
+ | if [ ! -z " | ||
+ | echo " | ||
+ | start-stop-daemon -o -c $btsuser -K -u $btsuser -x $DAEMON | ||
+ | fi | ||
+ | done | ||
+ | } | ||
+ | |||
+ | status() { | ||
+ | for btsuser in $BTSYNC_USERS; | ||
+ | dbpid=`pgrep -fu $btsuser $DAEMON` | ||
+ | if [ -z " | ||
+ | echo " | ||
+ | else | ||
+ | echo " | ||
+ | fi | ||
+ | done | ||
+ | } | ||
+ | |||
+ | case " | ||
+ | | ||
+ | start | ||
+ | ;; | ||
+ | stop) | ||
+ | stop | ||
+ | ;; | ||
+ | restart|reload|force-reload) | ||
+ | stop | ||
+ | start | ||
+ | ;; | ||
+ | status) | ||
+ | status | ||
+ | ;; | ||
+ | *) | ||
+ | echo " | ||
+ | exit 1 | ||
+ | esac | ||
+ | |||
+ | exit 0 | ||
+ | </ | ||
miniserver/start.1432307276.txt.gz · 마지막으로 수정됨: 2015/05/22 15:07 저자 changwoo