Ubuntu/시스템 전원관리

Ubuntu - 시스템 전원관리

우분투 시스템을 명령으로 잠자기, 깨우기가 가능하다. 컴퓨터의 BIOS에서 Wake On Lan이 활성화 되어야한다.

WakeOnLan

wakeonlan을 활성화 하려면 이더넷 인터페이스를 화인한다.

1
2
3
4
5
6
7
8
9
$ ifconfig
enp5s0 Link encap:Ethernet HWaddr 0f:1a:92:51:70:a9
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe20::6595:e3fd:ad6:10f1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:85121 errors:0 dropped:0 overruns:0 frame:0
TX packets:11677 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25916710 (25.9 MB) TX bytes:1481803 (1.4 MB)
자세히 보기

Raspberry Pi 3 64bit OS openSUSE: Build MongoDB 3.4

Raspberry Pi 3 64bit OS openSUSE 는 이글은 4개 글타래로 구성되며, openSUSE 설치 및 사용에 대해 작성한다.

Opensuse 에서 Raspberry Pi 3를 위한 64bit OS openSESE Leap 42.2 을 제공하고 있다.

  1. Install 64bit openSUSE Leap 42.2 / JeOS
  2. openSUSE: Managing Service daemon
  3. openSUSE: Basic OS Security for Server
  4. Install & Configuration - Nginx, Node JS
  5. Build MongoDB 3.4.x
자세히 보기

Raspberry Pi 3 64bit OS openSUSE: Nginx, Node JS, Jupyter

Raspberry Pi 3 64bit OS openSUSE 는 이글은 5개 글타래로 구성되며, openSUSE 설치, 개발도구 구성 및 서버 구축 사용에 대해 작성한다.

Opensuse 에서 Raspberry Pi 3를 위한 64bit OS openSESE Leap 42.2 을 제공하고 있다.

  1. Install 64bit openSUSE Leap 42.3 / JeOS
  2. openSUSE: Managing Service daemon
  3. openSUSE: Basic OS Security for Server
  4. Install & Configuration - Nginx, Node JS, Jupyter
  5. Build MongoDB 3.4.x
자세히 보기

Raspberry Pi 3 64bit OS openSUSE: Basic Security

Raspberry Pi 3 64bit OS openSUSE 는 이글은 3개 글타래로 구성되며, openSUSE 설치 및 사용에 대해 작성한다.

Opensuse 에서 Raspberry Pi 3를 위한 64bit OS openSESE Leap 42.3 을 제공하고 있다.

  1. Install 64bit openSUSE Leap 42.3 / JeOS
  2. openSUSE: Managing Service daemon
  3. openSUSE: Basic OS Security for Server
  4. Install & Configuration - Nginx, Node JS
  5. Build MongoDB 3.4.x
자세히 보기

Raspberry Pi 3 64bit OS openSUSE: Service 관리

Raspberry Pi 3 64bit OS openSUSE 는 이글은 3개 글타래로 구성되며, openSUSE 설치 및 사용에 대해 작성한다.

Opensuse 에서 Raspberry Pi 3를 위한 64bit OS openSESE Leap 42.3 을 제공하고 있다.

  1. Install 64bit openSUSE Leap 42.3 / JeOS
  2. openSUSE: Managing Service daemon
  3. openSUSE: Basic OS Security for Server
  4. Install & Configuration - Nginx, Node JS
  5. Build MongoDB 3.4.x

openSUSE: Basic OS Security for Server

openSUSE는 systemd 를 사용한 서비스/데몬 시작/종료/활성화/비활성화 작업을 할 수 있다. 서비스에 대한 작업은 systemctl CLI 혹은 YaST에서 가능하다.

yast

openSUSE는 yast 로 서비스 데몬도 설치/실행/멈춤 을 할 수 있다.

{:width=”640”}

서비스는
{:width=”640”}

systemd

https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.systemd.html

https://www.digitalocean.com/community/tutorials/systemd-essentials-working-with-services-units-and-the-journal

1
systemctl list-unit-files --type=service #현재 사용 가능한 모든 서비스

이 작업은

1
2
3
4
5
6
7
systemctl stop SuSEfirewall2
systemctl disable SuSEfirewall2
zypper in ufw
ufw default deny
ufw enable
systemctl enable ufw
systemctl start ufw

ssmtp

sSMTP is a simple MTA to deliver mail from a computer to a mail hub (SMTP server). sSMTP is simple and lightweight, there are no daemons or anything hogging up CPU; Just sSMTP. Unlike Exim4, sSMTP does not receive mail, expand aliases, or manage a queue.

https://wiki.debian.org/sSMTP

42.3, 15.0 에 ssmtp가 포함되지 않았다.

https://build.opensuse.org/package/binaries/home:jloehel/ssmtp/openSUSE_Factory_ARM

mail utitlity

1
$ sudo zypper install mail

Then try to send email from command line with:

1
$ echo "Message Body" | mail -s "Message Subject" receiver@example.com

참조

[^1]: systemd: Enable/Disable Services

Raspberry Pi 3 64bit OS openSUSE: Basic Security

Raspberry Pi 3 64bit OS openSUSE 는 이글은 3개 글타래로 구성되며, openSUSE 설치 및 사용에 대해 작성한다.

Opensuse 에서 Raspberry Pi 3를 위한 64bit OS openSESE Leap 42.3 을 제공하고 있다.

  1. Install 64bit openSUSE Leap 42.3 / JeOS
  2. openSUSE: Managing Service daemon
  3. openSUSE: Basic OS Security for Server
  4. Install & Configuration - Nginx, Node JS
  5. Build MongoDB 3.4.x

openSUSE: Basic OS Security for Server

이전 글에서 라즈베리파이 3에 설치한 64bit OS openSUSE LEAP / JeOS를 서버 구성을 위해서 보안 설정을 한다. 이 글은 다음 세가지 내용을 포함하고 있다.

  • ssh와 sshd 설정
  • 방화벽 설정: YaST Firewall 대비 ufw 설치
  • Fail2ban 설치 및 설정

sshd_config

ssh 사용시

sshd securities

방화벽 설정

openSUSE는 SuSEfirewall2 가 기본으로 제공되어 서비스를 활성화 하면 사용할 수 있다. 아직 익숙치 않아서 SuSEFirewall2 을 우분투/데비안에서 익숙한 ufw 를 설치해 사용하겠다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Basic Syntax:
yast2 firewall interactive
yast2 firewall <command> [verbose] [options]
yast2 firewall help
yast2 firewall longhelp
yast2 firewall xmlhelp
yast2 firewall <command> help

Commands:
broadcast Broadcast packet settings
disable Disables firewall
enable Enables firewall
interfaces Network interfaces configuration
logging Logging settings
masqredirect Redirect requests to masqueraded IP
masquerade Masquerading settings
services Allowed services, ports, and protocols
startup Start-up settings
summary Firewall configuration summary
zones Known firewall zones

먼저 SuSEfirewall2 를 멈추고 비활성화 한다.

1
sudo yast firewall disable
1
2
systemctl stop SuSEfirewall2
systemctl disable SuSEfirewall2

그리고 ufw를 설치하고

1
zypper in ufw
1
2
3
4
ufw default deny
ufw enable
systemctl enable ufw
systemctl start ufw

Fail2ban

rsyslog 를 설치한다.

https://en.opensuse.org/SDB:SSH_systematic_attack_protection

https://www.howtoforge.com/fail2ban_opensuse10.3

ssh

ufw

fail2ban

zypper in fail2ban

참조

OpenSSH Public Key Authentication

https://doc.opensuse.org/documentation/leap/security/html/book.security/cha.security.firewall.html

Raspberry Pi 3 64bit OS openSUSE: Install

2017-10-30: swap 추가, timezone 수정
{:.right-history}

Opensuse 에서 Raspberry Pi 3를 위한 64bit OS openSESE Leap 42.2 을 제공하고 있다.

이글은 5개 글타래로 구성되며, openSUSE 설치 및 사용에 대해 작성한다.

  1. Install 64bit openSUSE Leap 42.2 / JeOS
  2. openSUSE: Managing Service daemon
  3. openSUSE: Basic OS Security for Server
  4. Install & Configuration - Nginx, Node JS, Jupyter
  5. openSUSE: Build MongoDB 3.4.x
자세히 보기

Rasberry Pi Camera 개발환경 구성

piCamera 구성

현재 시스템 정보

1
2
$ uname -a
Linux camerapi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

Science modules

1
2
3
sudo apt-get install build-essential python-dev python-distlib python3-dev python3-distlib
sudo apt-get install libzmq3-dev
sudo apt-get install libgdal-dev
1
2
3
4
5
$ sudo apt-get install python-numpy python-decorator python-scipy
$ sudo apt-get install python-matplotlib

$ sudo apt-get install python3-decorator python3-numpy python3-scipy
$ sudo apt-get install python3-matplotlib

Jupyter-notebook

1
2
3
4
5
6
$ mkvirtualenv -p python3 --system-site-packages cv3python3
$
(cv3python3) $ pip install jupyter


(cv3python3) $ jupyter-notebook --no-browser --ip=* --port=8585 jupyterCamera/

Camera

카메라 파이썬 모듈은 pip에서 설치하는 것으로 하자.

패키로 설치시

1
$ sudo apt-get install python-picamera python-numpy python-rpi.gpio python-opencv ffmpeg

cv3

Raspberry Pi 3 64bit OS openSUSE LEAP 15: Install

2017-10-30: swap 추가, timezone 수정
{:.right-history}

Opensuse 에서 Raspberry Pi 3를 위한 64bit OS openSESE Leap 42.2 을 제공하고 있다.

이글은 5개 글타래로 구성되며, openSUSE 설치 및 사용에 대해 작성한다.

  1. Install 64bit openSUSE Leap 42.2 / JeOS
  2. openSUSE: Managing Service daemon
  3. openSUSE: Basic OS Security for Server
  4. Install & Configuration - Nginx, Node JS, Jupyter
  5. openSUSE: Build MongoDB 3.4.x
자세히 보기