문서의 이전 판입니다!
미니 서버 운영 문서
서버 모델과 사양
모델: ZOTAC ZBOX CI320 nano ( 홈페이지)
- CPU: Intel Celeron N2930
- RAM: 8GB
- HDD: WD 1TB
lspci -v
00:00.0 Host bridge: Intel Corporation Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register (rev 0e) Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register Flags: bus master, fast devsel, latency 0 Kernel modules: iosf_mbi 00:02.0 VGA compatible controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display (rev 0e) (prog-if 00 [VGA controller]) DeviceName: Onboard IGD Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/Z37xxx Series Graphics & Display 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 <unassigned> [disabled] Capabilities: [d0] Power Management version 2 Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit- Capabilities: [b0] Vendor Specific Information: Len=07 <?> 00:12.0 SD Host controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series SDIO Controller (rev 0e) (prog-if 01) Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/Z37xxx Series SDIO Controller 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: [80] Power Management version 3 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) [size=2K] Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit- Capabilities: [70] Power Management version 3 Capabilities: [a8] SATA HBA v1.0 Kernel driver in use: ahci Kernel modules: ahci 00:14.0 USB controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series USB xHCI (rev 0e) (prog-if 30 [XHCI]) Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/Z37xxx Series USB xHCI Flags: bus master, medium devsel, latency 0, IRQ 88 Memory at d0800000 (64-bit, non-prefetchable) [size=64K] Capabilities: [70] Power Management version 2 Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+ 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: [80] Power Management version 3 00:1a.0 Encryption controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Trusted Execution Engine (rev 0e) Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/Z37xxx Series Trusted Execution Engine 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: [80] Power Management version 3 Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit- 00:1b.0 Audio device: Intel Corporation Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller (rev 0e) Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller Flags: bus master, fast devsel, latency 0, IRQ 22 Memory at d0810000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+ 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, subordinate=01, sec-latency=0 I/O behind bridge: 0000e000-0000efff Memory behind bridge: d0700000-d07fffff Capabilities: [40] Express Root Port (Slot+), MSI 00 Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit- Capabilities: [90] Subsystem: ZOTAC International (MCO) Ltd. Device b219 Capabilities: [a0] Power Management version 3 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, subordinate=02, sec-latency=0 I/O behind bridge: 00001000-00001fff Capabilities: [40] Express Root Port (Slot+), MSI 00 Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit- Capabilities: [90] Subsystem: ZOTAC International (MCO) Ltd. Device b219 Capabilities: [a0] Power Management version 3 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, subordinate=03, sec-latency=0 I/O behind bridge: 00002000-00002fff Memory behind bridge: d0600000-d06fffff Capabilities: [40] Express Root Port (Slot+), MSI 00 Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit- Capabilities: [90] Subsystem: ZOTAC International (MCO) Ltd. Device b219 Capabilities: [a0] Power Management version 3 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, sec-latency=0 I/O behind bridge: 00003000-00003fff Capabilities: [40] Express Root Port (Slot+), MSI 00 Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit- Capabilities: [90] Subsystem: ZOTAC International (MCO) Ltd. Device b219 Capabilities: [a0] Power Management version 3 Kernel driver in use: pcieport 00:1d.0 USB controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series USB EHCI (rev 0e) (prog-if 20 [EHCI]) Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/Z37xxx Series USB EHCI Flags: bus master, medium devsel, latency 0, IRQ 23 Memory at d0815000 (32-bit, non-prefetchable) [size=1K] Capabilities: [50] Power Management version 3 Capabilities: [58] Debug port: BAR=1 offset=00a0 Capabilities: [98] PCI Advanced Features Kernel driver in use: ehci-pci Kernel modules: ehci_pci 00:1f.0 ISA bridge: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Power Control Unit (rev 0e) Subsystem: ZOTAC International (MCO) Ltd. Atom Processor Z36xxx/Z37xxx Series Power Control Unit Flags: bus master, medium devsel, latency 0 Capabilities: [e0] Vendor Specific Information: Len=0c <?> 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: [50] Power Management version 3 Kernel modules: i2c_i801 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07) Subsystem: ZOTAC International (MCO) Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller 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: [40] Power Management version 3 Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [70] Express Endpoint, MSI 01 Capabilities: [b0] MSI-X: Enable- Count=4 Masked- Capabilities: [d0] Vital Product Data Capabilities: [100] Advanced Error Reporting Capabilities: [140] Virtual Channel Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00 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: [c8] Power Management version 3 Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [40] Express Endpoint, MSI 00 Capabilities: [100] Advanced Error Reporting Capabilities: [140] Device Serial Number 30-3a-64-ff-ff-4f-b9-38 Capabilities: [14c] Latency Tolerance Reporting Capabilities: [154] Vendor Specific Information: ID=cafe Rev=1 Len=014 <?> Kernel driver in use: iwlwifi Kernel modules: iwlwifi
현재 젠투 리눅스 설치하여 사용 중이다. gentooserver에 이전에 아주 약간의 기록이 있긴 한데 그다지 많은 내용은 아니나 참고하시라.
서비스 목록은 다음과 같다.
- 아파치 서버
- PHP, wsgi (flask)
- Wordpress (http://changwoo.pe.kr)
- Dokuwiki (http://wiki.changwoo.pe.kr)
- ownCloud (http://cloud.changwoo.pe.kr)
- 토렌트 서버: transmission (http://changwoo.pe.kr:8112)
아파치2 SSL 구축
# apt-get install apache2 # a2enmod ssl # service apache2 restart # mkdir /etc/apache2/ssl # openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt # Common Name 에서 도메인 이름을 제대로 적어줄 것.
default-ssl 파일 조정. ServerAdmin, ServerName 올바르게 조정하고 바로 아래에,
SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.crt SSLCertificateKeyFile /etc/apache2/ssl/apache.key
그리고 사이트 열기.
# a2ensite default-ssl # service apache2 restart
여기서 서버가 제대로 동작하지 않으면, 에러 로그를 살펴 보자. Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile]
이런 로그를 발견한다면 제대로 설정이 안 된 것이다.
가상 호스트 설정 또한 위와 마찬가지로 각각의 ServerName 마다 SSLEngine/SSLCertificateFile/SSLCertificateKeyFile 항목을 설정한다. 마지막으로 SSL에서도 VirtualHost를 하도록
NameVirtualHost *:443 Listen 443
설정도 추가한다.
이건 우분투 관련 설정이므로 적당히 고쳐서 써야 한다는 점 주의.
사운드 설정
$ sudo apt-get remove --purge alsa-base pulseaudio $ sudo apt-get install alsa-base pulseaudio $ sudo alsa force-reload
alsamixer 에서 MUTED 해제. 'MM'이라고 써져 있음 안됨.
블루투스 사용
# apt-get install bluez python-gobject python-dbus
블루투스 스피커를 사용해 보고 싶어 작업을 진행해 보았다. bluez, bluez-tools 패키지 설치. 설치 후 장비 검색 명령
$ hcitool scan Scanning ... 40:EF:4C:15:DF:B2 IA160 28:E3:47:83:C2:0A laptop
40:EF:4C:15:DF:B2
주소의 'IA160'이 내가 연결하고 싶은 블루투스 스피커이다.
서버에 사운드 설정을 하지 않아서 pulseaudio를 설치했다.
$ sudo apt-get install pulseaudio bluez-alsa $ sudo update-rc.d pulseaudio defaults $ sudo update-rc.d bluetooth defaults