728x90

출처

Nextcloud 설치

Nextcloud 스냅 패키지를 다운로드하여 Ubuntu에 설치

$ sudo snap install nextcloud

설치 확인

bluesanta@bluesanta-Default-string:~$ snap changes nextcloud
ID   Status  Spawn               Ready               Summary
3    Done    today at 00:18 KST  today at 00:19 KST  Install "nextcloud" snap

Nextcloud Snap에 대한 추가 정보 얻기

bluesanta@bluesanta-Default-string:~$ snap info nextcloud
name:      nextcloud
summary:   Nextcloud Server - A safe home for all your data
publisher: Nextcloud✓
store-url: https://snapcraft.io/nextcloud
contact:   https://github.com/nextcloud/nextcloud-snap
license:   unset
description: |
  Access, share and protect your files, calendars, contacts, communication and
  more at home and in your enterprise.
commands:
  - nextcloud.disable-https
  - nextcloud.enable-https
  - nextcloud.export
  - nextcloud.import
  - nextcloud.manual-install
  - nextcloud.mysql-client
  - nextcloud.mysqldump
  - nextcloud.occ
services:
  nextcloud.apache:          simple, enabled, active
  nextcloud.logrotate:       simple, enabled, inactive
  nextcloud.mdns-publisher:  simple, enabled, active
  nextcloud.mysql:           simple, enabled, active
  nextcloud.nextcloud-cron:  simple, enabled, active
  nextcloud.nextcloud-fixer: simple, enabled, active
  nextcloud.php-fpm:         simple, enabled, active
  nextcloud.redis-server:    simple, enabled, active
  nextcloud.renew-certs:     simple, enabled, active
snap-id:      njObIbGQEaVx1H4nyWxchk1i8opy4h54
tracking:     latest/stable
refresh-date: today at 00:18 KST
channels:
  latest/stable:    24.0.6snap1               2022-10-08 (31751) 244MB -
  latest/candidate: 24.0.6snap2               2022-10-27 (32090) 249MB -
  latest/beta:      24.0.6snap2+git5.9cc018c  2022-11-08 (32250) 250MB -
  latest/edge:      master-2022-11-26         2022-11-26 (32521) 266MB -

connections이 스냅이 정의 하는 스냅 확인

bluesanta@bluesanta-Default-string:~$ snap connections nextcloud
Interface        Plug                       Slot           Notes
network          nextcloud:network          :network       -
network-bind     nextcloud:network-bind     :network-bind  -
network-observe  nextcloud:network-observe  -              -
removable-media  nextcloud:removable-media  -              -

관리 계정 구성

새 관리자 계정으로 Nextcloud를 구성

nextcloud.manual-install [계정명] [암호]
bluesanta@bluesanta-Default-string:~$ sudo nextcloud.manual-install sammy password
Nextcloud was successfully installed

신뢰할 수 있는 도메인 등록

trusted_domains배열 값 확인

bluesanta@bluesanta-Default-string:~$ sudo nextcloud.occ config:system:get trusted_domains
localhost

아이피 확인

bluesanta@bluesanta-Default-string:~$ ifconfig | grep inet
        inet 192.168.0.52  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::a4c8:5bb:89d8:91e4  prefixlen 64  scopeid 0x20<link>
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>

도메인 추가

bluesanta@bluesanta-Default-string:~$ sudo nextcloud.occ config:system:set trusted_domains 1 --value=192.168.0.52
System config value trusted_domains => 1 set to string 192.168.0.52

도메인 추가 확인

bluesanta@bluesanta-Default-string:~$ sudo nextcloud.occ config:system:get trusted_domains
localhost
192.168.0.52
728x90
728x90

출처

패키지 업데이트 진행

$ sudo apt update && sudo apt -y upgrade

kde-plasma-desktop 설치

$ sudo apt-get install kde-plasma-desktop

설치 스크립트 다운로드(install-xrdp.sh)

bluesanta@bluesanta-Default-string:~$ wget -O install-xrdp.sh https://gist.githubusercontent.com/crnisamuraj/49bc667c4c7c788c602bd29e58bbd049/raw/a1978e4720342280e3bc98bd92385f0412f6cb75/install-xrdp.sh

설치 스크립트 실행 가능 하도록 권한 변경

bluesanta@bluesanta-Default-string:~$ chmod 755 install-xrdp.sh

설치 스크립트 실행

bluesanta@bluesanta-Default-string:~$ sudo ./install-xrdp.sh

환경 설정 ( /etc/xrdp/xrdp.ini )

bluesanta@bluesanta-Default-string:~$ vi ~/.xsession

.xsession 내용

startplasma-x11
export XDG_SESSION_DESKTOP=KDE
export XDG_DATA_DIRS=/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop
export XDG_CONFIG_DIRS=/etc/xdg/xdg-plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings

환경 설정 ( /etc/xrdp/xrdp.ini )

 

 

install-xrdp.sh 내용

#!/bin/bash -e

# Install XRDP.
sudo apt install -y xrdp
#sudo sed -e 's/^new_cursors=true/new_cursors=false/g' \
#     -i /etc/xrdp/xrdp.ini
sudo systemctl enable xrdp
sudo systemctl restart xrdp

# Load Ubuntu config.
echo "startplasma-x11" > ~/.xsession
# D=/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop
# C=/etc/xdg/xdg-plasma:/etc/xdg
# C=${C}:/usr/share/kubuntu-default-settings/kf5-settings
# cat <<EOF > ~/.xsessionrc
# export XDG_SESSION_DESKTOP=KDE
# export XDG_DATA_DIRS=${D}
# export XDG_CONFIG_DIRS=${C}
# EOF

# Avoid Authentication Required dialog.
cat <<EOF | \
  sudo tee /etc/polkit-1/localauthority/50-local.d/xrdp-NetworkManager.pkla
[Netowrkmanager]
Identity=unix-group:sudo
Action=org.freedesktop.NetworkManager.network-control
ResultAny=yes
ResultInactive=yes
ResultActive=yes
EOF
cat <<EOF | \
  sudo tee /etc/polkit-1/localauthority/50-local.d/xrdp-packagekit.pkla
[Netowrkmanager]
Identity=unix-group:sudo
Action=org.freedesktop.packagekit.system-sources-refresh
ResultAny=yes
ResultInactive=auth_admin
ResultActive=yes
EOF
sudo systemctl restart polkit
728x90
728x90

Spring MVC : 파일 다운로드

package com.bluexmas.ui.controller;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.bluexmas.util.ConfigUtils;
import com.bluexmas.util.FileUtilsEx;

@Controller
public class ExcelDownloadController {

  private static final Logger logger = LoggerFactory.getLogger(CommonAcountController.class);

  private static final int COMPRESSION_LEVEL = 3;

  private static final int BUFFER_SIZE = 1024 * 2;

  @RequestMapping(value = { "/app/download.do", "/{app}/app/download.do" })
  public void download(HttpServletRequest request, HttpServletResponse response) throws IOException {
    
    // 다운로드 파일명 설정
    this.setDownloadFilename("bluexmas.png", request, response);
    
    InputStream is = null;
    BufferedInputStream fin = null;
    BufferedOutputStream outs = null;

    try {
      File sourceFile = new File(ConfigUtils.getConfigPath(), "bluexmas.png");
      is = new FileInputStream(sourceFile);
      fin = new BufferedInputStream(is);
      outs = new BufferedOutputStream(response.getOutputStream());
      int read = 0;
      
      byte[] buffer = new byte[BUFFER_SIZE];
      while ((read = fin.read(buffer)) != -1) {
        outs.write(buffer, 0, read);
      }
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      if (outs != null) outs.close();
      if (fin != null) fin.close();
      if (is != null) is.close();
    }
  }

  @RequestMapping(value = { "/app/zip_download.do", "/{app}/app/zip_download.do" })
  public void zip_download(HttpServletRequest request, HttpServletResponse response) throws Exception {
    //
    ZipArchiveOutputStream zos = null;
    
    try {
      zos = new ZipArchiveOutputStream(response.getOutputStream());
      zos.setEncoding("UTF-8");
      zos.setLevel(COMPRESSION_LEVEL); // 압축 레벨 - 최대 압축률은 9, 디폴트 8
      
      String zipName = FileUtilsEx.cleanDirName("bluexmas.zip");
      this.setDownloadFilename(zipName, request, response);
      
      File sourceFile = new File(ConfigUtils.getConfigPath(), "bluexmas.png");
      this.compress(zos, sourceFile, "santa.png");
      
      zos.finish();
      int file_size = (int) zos.getBytesWritten();
    } catch (Exception e) {
      logger.error(e.getMessage(), e);
    }
  }

  // 압축파일에 파일 주가
  private void compress(ZipArchiveOutputStream zos, File sourceFile, String zipName) throws IOException {
    BufferedInputStream bis = null;

    try {
      bis = new BufferedInputStream(new FileInputStream(sourceFile));
      ZipArchiveEntry zentry = new ZipArchiveEntry(zipName);
      
      if (sourceFile != null)
        zentry.setTime(sourceFile.lastModified());
      
      zos.putArchiveEntry(zentry);

      byte[] buffer = new byte[BUFFER_SIZE];
      int cnt = 0;
      while ((cnt = bis.read(buffer, 0, BUFFER_SIZE)) != -1) {
        zos.write(buffer, 0, cnt);
      }
      zos.closeArchiveEntry();

    } catch (Exception e) {
      logger.error(e.getMessage(), e);
    } finally {
      if (bis != null) {
        bis.close();
      }
    }
  }

  // 다운로드 파일명 설정
  private void setDownloadFilename(String fileName, HttpServletRequest request, HttpServletResponse response)
      throws UnsupportedEncodingException {
    String header = getBrowser(request);
    if (header.contains("MSIE")) {
      String docName = URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20");
      response.setHeader("Filename-Encoding", "urlencode");
      response.setHeader("Content-Disposition", "attachment;filename=" + docName + ";");
    } else if (header.contains("Firefox")) {
      String docName = new String(fileName.getBytes("UTF-8"), "ISO-8859-1");
      response.setHeader("Content-Disposition", "attachment; filename=\"" + docName + "\"");
    } else if (header.contains("Opera")) {
      String docName = new String(fileName.getBytes("UTF-8"), "ISO-8859-1");
      response.setHeader("Content-Disposition", "attachment; filename=\"" + docName + "\"");
    } else if (header.contains("Chrome")) {
      String docName = new String(fileName.getBytes("UTF-8"), "ISO-8859-1");
      response.setHeader("Content-Disposition", "attachment; filename=\"" + docName + "\"");
    }
    response.setHeader("Content-Type", "application/octet-stream");
    response.setHeader("Content-Transfer-Encoding", "binary;");
    response.setHeader("Pragma", "no-cache;");
    response.setHeader("Expires", "-1;");
    // response.setHeader("filesize", file_size+";");
    response.setHeader("dn_filename", URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20"));
  }

  // 브라우져 확인
  private String getBrowser(HttpServletRequest request) {
    String header = request.getHeader("User-Agent");
    if (header.contains("MSIE") || header.contains("Trident") || header.contains("Dalvik")) {
      return "MSIE";
    } else if (header.contains("Chrome")) {
      return "Chrome";
    } else if (header.contains("Opera")) {
      return "Opera";
    }
    return "Firefox";
  }

}
728x90
728x90

출처

Raspberry PI 시스템 업그레이드

pi@raspberrypi:~$ sudo apt update
pi@raspberrypi:~$ sudo apt upgrade

MongoDB 설치

빌드 도구 맟 관련 패키지 설치

pi@raspberrypi:~$ sudo apt-get install gcc-8 g++-8
pi@raspberrypi:~$ sudo apt-get install libssl-dev libcurl4-openssl-dev

Mongo DB 소스 다운로드

pi@raspberrypi:~$ git clone -b r4.4.0 https://github.com/mongodb/mongo.git
pi@raspberrypi:~$ cd mongo/

MongoDB GPG 서명 키 추가

pi@raspberrypi:~$ wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK

MongoDB에 대한 스토리지 엔진 및 복제를 구성한 다음 MongoDB 서비스를 시작

$ sudo sed -i "s/^#  engine:/  engine: wiredTiger/"  /etc/mongod.conf
$ sudo sed -i "s/^#replication:/replication:\n  replSetName: rs01/" /etc/mongod.conf

MongoDB 서비스 시작 및 활성화

bluesanta@Kubuntu:~$ sudo systemctl daemon-reload
bluesanta@Kubuntu:~$ sudo systemctl enable mongod
Created symlink /etc/systemd/system/multi-user.target.wants/mongod.service → /lib/systemd/system/mongod.service.
bluesanta@Kubuntu:~$ sudo systemctl restart mongod

MongoDB 서비스 확인

bluesanta@Kubuntu:~$ systemctl status mongod
● mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-05-24 01:28:11 KST; 5s ago
       Docs: https://docs.mongodb.org/manual
   Main PID: 287216 (mongod)
     Memory: 65.2M
     CGroup: /system.slice/mongod.service
             └─287216 /usr/bin/mongod --config /etc/mongod.conf
 
 5월 24 01:28:11 Kubuntu systemd[1]: Started MongoDB Database Server.
 5월 24 01:28:11 Kubuntu mongod[287216]: /usr/bin/mongod: /usr/local/lib/libcurl.so.4: no version information available (required by >

MongoDB 테스트

bluesanta@Kubuntu:~$ mongo --eval "printjson(rs.initiate())"
MongoDB shell version v5.0.8
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("63537e3c-d3f1-42df-8158-043e7a759f3c") }
MongoDB server version: 5.0.8
{
        "info2" : "no configuration specified. Using a default configuration for the set",
        "me" : "127.0.0.1:27017",
        "ok" : 1
}

MongoDB 로그 확인

bluesanta@Kubuntu:~$ sudo tail -f /var/log/mongodb/mongod.log

 

 

 

빌드오류

Creating 'build/opt/mongo/resmoke/resmoke.py'
Creating 'build/opt/mongo/config.h'
/usr/bin/python3 src/mongo/base/generate_error_codes.py src/mongo/base/error_codes.yml src/mongo/base/error_codes.tpl.h build/opt/mongo/base/error_codes.h
Install file: "build/opt/mongo/resmoke/resmoke.py" as "build/install/bin/resmoke.py"
Chmod("build/install/bin/resmoke.py", "u+x")
Compiling build/opt/third_party/mozjs-60/extract/mozglue/misc/ConditionVariable_posix.o
cc1plus: fatal error: js-confdefs.h: No such file or directory
compilation terminated.
scons: *** [build/opt/third_party/mozjs-60/extract/mozglue/misc/ConditionVariable_posix.o] Error 1
Generating build/opt/mongo/db/logical_session_id_gen.cpp
/usr/bin/python3 src/mongo/base/generate_error_codes.py src/mongo/base/error_codes.yml src/mongo/base/error_codes.tpl.cpp build/opt/mongo/base/error_codes.cpp
scons: building terminated because of errors.
build/opt/third_party/mozjs-60/extract/mozglue/misc/ConditionVariable_posix.o failed: Error 1

몽고 DB 삭제 방법

bluesanta@Kubuntu:~$ sudo apt-get remove mongodb-org
bluesanta@Kubuntu:~$ sudo apt-get purge mongodb-org*
bluesanta@Kubuntu:~$ sudo rm -rf /var/log/mongodb
bluesanta@Kubuntu:~$ sudo rm -rf /var/lib/mongodb
728x90
728x90

출처

Ubuntu 시스템 업그레이드

bluesanta@Kubuntu:~$ sudo apt update
bluesanta@Kubuntu:~$ sudo apt upgrade

필수 패키지 종속성 설치

MongoDB GPG 서명 키 추가

bluesanta@Kubuntu:~$ wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
OK
bluesanta@Kubuntu:~$ sudo apt update
bluesanta@Kubuntu:~$ sudo apt-get install gnupg

MongoDB 저장소 추가

bluesanta@Kubuntu:~$ echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse

Ubuntu 20.04에 MongoDB 5.0 설치

bluesanta@Kubuntu:~$ sudo apt-get update
bluesanta@Kubuntu:~$ sudo apt-get install -y mongodb-org

Ubuntu 패키지 관리자를 통해 Node.js가 설치되도록 구성

bluesanta@Kubuntu:~$ sudo apt-get update
bluesanta@Kubuntu:~$ sudo apt-get install -y curl && curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -

Node.js, 빌드도구, GraphicsMagick 설치

bluesanta@Kubuntu:~$ sudo apt install -y build-essential nodejs graphicsmagick

Node.js 버전 확인

bluesanta@Kubuntu:~$ node --version
v14.19.3

inherits, n 설치

bluesanta@Kubuntu:~$ sudo npm install -g inherits n
/usr/bin/n -> /usr/lib/node_modules/n/bin/n
+ n@8.2.0
+ inherits@2.0.4
added 2 packages from 2 contributors in 0.323s

node 실행파일 symbolic link

bluesanta@Kubuntu:~$ sudo ln -s /usr/bin/node /usr/local/bin/node

Ubuntu 20.04에 Rocket.Chat 설치

최신 버전의 Rocket.Chat을 다운로드

bluesanta@Kubuntu:~$ curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat.tgz

다운로드한 파일을 /tmp 폴더에 압축 해제

bluesanta@Kubuntu:~$ tar -xzf /tmp/rocket.chat.tgz -C /tmp

Rocket.Chat을 설치(/opt 디렉토리에 설치)

bluesanta@Kubuntu:~$ cd /tmp/bundle/programs/server
bluesanta@Kubuntu:/tmp/bundle/programs/server$ npm install
 
... 생략 ...
 
{
  "npm": "6.14.16",
  "ares": "1.18.1",
  "brotli": "1.0.9",
  "cldr": "37.0",
  "http_parser": "2.9.4",
  "icu": "67.1",
  "llhttp": "2.1.4",
  "modules": "72",
  "napi": "8",
  "nghttp2": "1.41.0",
  "node": "12.22.12",
  "openssl": "1.1.1n",
  "tz": "2021a4",
  "unicode": "13.0",
  "uv": "1.40.0",
  "v8": "7.8.279.23-node.57",
  "zlib": "1.2.11"
}
added 157 packages from 85 contributors and audited 157 packages in 62.738s

4 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

bluesanta@Kubuntu:/tmp/bundle/programs/server$ cd ~/
bluesanta@Kubuntu:~$ sudo mv /tmp/bundle /opt/Rocket.Chat

Rocketchat 시스템 사용자 생성

bluesanta@Kubuntu:~$ sudo useradd -M rocketchat && sudo usermod -L rocketchat
bluesanta@Kubuntu:~$ sudo chown -R rocketchat:rocketchat /opt/Rocket.Chat

Rocket.Chat 서비스 등록

Rocket.Chat 서비스 파일을 생성

bluesanta@Kubuntu:~$ cat << EOF |sudo tee -a /etc/systemd/system/rocketchat.service
[Unit]
Description=The Rocket.Chat server
After=network.target remote-fs.target nss-lookup.target nginx.service mongod.service
[Service]
ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=rocketchat
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=http://localhost:3000/ PORT=3000
[Install]
WantedBy=multi-user.target
EOF

MongoDB에 대한 스토리지 엔진 및 복제를 구성한 다음 MongoDB 서비스를 시작

$ sudo sed -i "s/^#  engine:/  engine: wiredTiger/"  /etc/mongod.conf
$ sudo sed -i "s/^#replication:/replication:\n  replSetName: rs01/" /etc/mongod.conf

MongoDB 서비스 시작 및 활성화

bluesanta@Kubuntu:~$ sudo systemctl daemon-reload
bluesanta@Kubuntu:~$ sudo systemctl enable mongod
Created symlink /etc/systemd/system/multi-user.target.wants/mongod.service → /lib/systemd/system/mongod.service.
bluesanta@Kubuntu:~$ sudo systemctl restart mongod

MongoDB 서비스 확인

bluesanta@Kubuntu:~$ systemctl status mongod
● mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-05-24 01:28:11 KST; 5s ago
       Docs: https://docs.mongodb.org/manual
   Main PID: 287216 (mongod)
     Memory: 65.2M
     CGroup: /system.slice/mongod.service
             └─287216 /usr/bin/mongod --config /etc/mongod.conf
 
 5월 24 01:28:11 Kubuntu systemd[1]: Started MongoDB Database Server.
 5월 24 01:28:11 Kubuntu mongod[287216]: /usr/bin/mongod: /usr/local/lib/libcurl.so.4: no version information available (required by >

MongoDB 테스트

bluesanta@Kubuntu:~$ mongo --eval "printjson(rs.initiate())"
MongoDB shell version v5.0.8
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("63537e3c-d3f1-42df-8158-043e7a759f3c") }
MongoDB server version: 5.0.8
{
        "info2" : "no configuration specified. Using a default configuration for the set",
        "me" : "127.0.0.1:27017",
        "ok" : 1
}

MongoDB 로그 확인

bluesanta@Kubuntu:~$ sudo tail -f /var/log/mongodb/mongod.log

Rocket.Chat 서비스 시작

bluesanta@Kubuntu:~$ sudo systemctl enable rocketchat
Created symlink /etc/systemd/system/multi-user.target.wants/rocketchat.service → /etc/systemd/system/rocketchat.service.
bluesanta@Kubuntu:~$ sudo systemctl start rocketchat

서비스가 실행 중인지 확인

bluesanta@Kubuntu:~$ sudo systemctl status rocketchat
● rocketchat.service - The Rocket.Chat server
     Loaded: loaded (/etc/systemd/system/rocketchat.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-05-24 01:58:11 KST; 6s ago
   Main PID: 291367 (node)
      Tasks: 11 (limit: 18681)
     Memory: 104.0M
     CGroup: /system.slice/rocketchat.service
             └─291367 /usr/local/bin/node /opt/Rocket.Chat/main.js
 
 5월 24 01:58:11 Kubuntu systemd[1]: Started The Rocket.Chat server.

Rocket.Chat 로그 확인

bluesanta@Kubuntu:~$ sudo tail -f syslog
May 24 17:31:52 bluesanta-desktop node[1964]: ufs: temp directory created at "/tmp/ufs"
May 24 17:31:52 bluesanta-desktop node[1964]: Loaded the Apps Framework and loaded a total of 0 Apps!
May 24 17:31:53 bluesanta-desktop node[1964]: +-----------------------------------------------+
May 24 17:31:53 bluesanta-desktop node[1964]: |                 SERVER RUNNING                |
May 24 17:31:53 bluesanta-desktop node[1964]: +-----------------------------------------------+
May 24 17:31:53 bluesanta-desktop node[1964]: |                                               |
May 24 17:31:53 bluesanta-desktop node[1964]: |  Rocket.Chat Version: 4.7.2                   |
May 24 17:31:53 bluesanta-desktop node[1964]: |       NodeJS Version: 14.19.3 - x64           |
May 24 17:31:53 bluesanta-desktop node[1964]: |      MongoDB Version: 5.0.8                   |
May 24 17:31:53 bluesanta-desktop node[1964]: |       MongoDB Engine: wiredTiger              |
May 24 17:31:53 bluesanta-desktop node[1964]: |             Platform: linux                   |
May 24 17:31:53 bluesanta-desktop node[1964]: |         Process Port: 3000                    |
May 24 17:31:53 bluesanta-desktop node[1964]: |             Site URL: http://localhost:3000/  |
May 24 17:31:53 bluesanta-desktop node[1964]: |     ReplicaSet OpLog: Enabled                 |
May 24 17:31:53 bluesanta-desktop node[1964]: |          Commit Hash: 1688633945              |
May 24 17:31:53 bluesanta-desktop node[1964]: |        Commit Branch: HEAD                    |
May 24 17:31:53 bluesanta-desktop node[1964]: |                                               |
May 24 17:31:53 bluesanta-desktop node[1964]: +-----------------------------------------------+

Nginx 리버스 프록시 구성

Nginx 웹 서버 설치

bluesanta@Kubuntu:~$ sudo apt install nginx

Nginx 웹 서버 프록시 설정

bluesanta@Kubuntu:~$ sudo vi /etc/nginx/conf.d/rocketchat.conf

rocketchat.conf 내용

upstream rocket_backend {
  server 127.0.0.1:3000;
}

server {
    listen 80;
    server_name chat.hirebestengineers.com;
    access_log /var/log/nginx/rocketchat-access.log;
    error_log /var/log/nginx/rocketchat-error.log;

    location / {
        proxy_pass http://rocket_backend/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forward-Proto http;
        proxy_set_header X-Nginx-Proxy true;

        proxy_redirect off;
    }
}

Nginx 구성이 올바른지 확인

bluesanta@Kubuntu:~$ sudo nginx  -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Nginx 서비스 다시 시작

bluesanta@Kubuntu:~$ sudo systemctl restart nginx
bluesanta@Kubuntu:~$ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-05-24 02:01:44 KST; 4s ago
       Docs: man:nginx(8)
    Process: 292050 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 292063 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 292070 (nginx)
      Tasks: 5 (limit: 18681)
     Memory: 5.1M
     CGroup: /system.slice/nginx.service
             ├─292070 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
             ├─292071 nginx: worker process
             ├─292072 nginx: worker process
             ├─292073 nginx: worker process
             └─292074 nginx: worker process
 
 5월 24 02:01:44 Kubuntu systemd[1]: Starting A high performance web server and a reverse proxy server...
 5월 24 02:01:44 Kubuntu systemd[1]: Started A high performance web server and a reverse proxy server.

 

 

몽고 DB 삭제 방법

bluesanta@Kubuntu:~$ sudo apt-get remove mongodb-org
bluesanta@Kubuntu:~$ sudo apt-get purge mongodb-org*
bluesanta@Kubuntu:~$ sudo rm -rf /var/log/mongodb
bluesanta@Kubuntu:~$ sudo rm -rf /var/lib/mongodb
728x90
728x90

출처

background-image url 가져오기 1

var css_background = $(".img_area[img_id='"+image_id+"']").css("background");
var protocol = /url\(['"](.+)['"]\)/.exec( css_background );
console.log( protocol[1] );

background-image url 가져오기 2

//var css_background = css_background.replace(/url\(['"](.+)['"]\)/, '$1');
var css_background = css_background.replace(/.+url\(['"](.+)['"]\).+/, '$1');

URL 파라미터 값 추출하기

var paramName = "refresh";
var paramValue = new RegExp('[\?&amp;]' + paramName + '=([^&amp;#]*)').exec(css_background);
console.log(paramValue[1] || 0);

 

728x90
728x90

출처

리눅스 정보 조회

출처 : 리눅스 종류 확인, 리눅스 버전 확인 - 제타위키

# cat /etc/*-release | uniq
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.4 LTS"
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

리눅스 비트 확인

출처 : 리눅스 32비트 64비트 확인 - 제타위키

# getconf LONG_BIT
64

관련패키지 설치

# apt install gcc g++ libncurses5-dev libxml2-dev openssl libssl-dev curl libcurl4-openssl-dev libjpeg-dev libpng-dev libfreetype6-dev libsasl2-dev autoconf libncurses5-dev

MySQL 계정 만들기

# groupadd mysql
# useradd -g mysql -s /bin/bash -m mysql

cmake 설치

# apt install cmake pkg-config

MySQL 소스 다운로드, 압축해제, 컴파일, 설치

# wget https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-5.7.37.tar.gz 
# tar xvf mysql-boost-5.7.37.tar.gz 
# cd mysql-5.7.37
# cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql57 \
-DMYSQL_DATADIR=/usr/local/mysql57/data \
-DMYSQL_UNIX_ADDR=/usr/local/mysql57/mysql.sock \
-DSYSCONFDIR=/usr/local/mysql57 \
-DMYSQL_TCP_PORT=3306 \
-DMYSQL_USER=mysql \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DDOWNLOAD_BOOST=0 -DWITH_BOOST=./boost
# make 
# make install

환경설정

# vi /usr/local/mysql57/my.cnf

my.cnf

[mysqld]
# port=3306
basedir=/usr/local/mysql57
datadir=/usr/local/mysql57/data
# pid-file=/usr/local/mysql57/mysqld.pid
# log_error=/usr/local/mysql57/mysql_error.log
# lc-messages-dir=/usr/local/mysql57/share

init_connect=SET collation_connection = utf8_general_ci
init_connect=SET NAMES utf8
character-set-server=utf8
collation-server=utf8_general_ci
# table_cache=1024
max_connections=2048
max_user_connections=500
max_connect_errors=10000
wait_timeout=300
query_cache_type = 1
query_cache_size = 128M
query_cache_limit = 5M
slow_query_log
long_query_time=3
max_allowed_packet=16M
sort_buffer_size = 2M
# skip-innodb
skip-name-resolve
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

skip_ssl
# disable_ssl

[mysql]
default-character-set=utf8

[client]
default-character-set=utf8

MySQL 설치 디렉토리 mysql 계정으로 권한 수정

# chown -R mysql:mysql /usr/local/mysql57

MySQL 데이터베이스 초기화 (mysql 계정으로 실행)

# su mysql
mysql@bluexmas:~$ cd /usr/local/mysql57
mysql@bluexmas:/usr/local/mysql57$ bin/mysql_install_db --no-defaults --user=mysql --datadir=/usr/local/mysql57/data --basedir=/usr/local/mysql57 -v
2022-04-27 14:34:16 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2022-04-27 14:34:16 [NOTE]    Creating data directory /usr/local/mysql57/data
2022-04-27 14:34:16 [NOTE]    Generating random password to /home/mysql/.mysql_secret...done.
2022-04-27 14:34:16 [NOTE]    Executing /usr/local/mysql57/bin/mysqld --no-defaults --bootstrap --datadir=/usr/local/mysql57/data --lc-messages-dir=/usr/local/mysql57/share --lc-messages=en_US --basedir=/usr/local/mysql57
2022-04-27 14:34:17 [NOTE]    Creating system tables...done.
2022-04-27 14:34:17 [NOTE]    Filling system tables with data...done.
2022-04-27 14:34:18 [NOTE]    Filling help table with data...done.
2022-04-27 14:34:18 [NOTE]    Creating user for internal session service...done.
2022-04-27 14:34:18 [NOTE]    Creating default user root@localhost
2022-04-27 14:34:18 [NOTE]    Creating default proxy root@localhost
2022-04-27 14:34:18 [NOTE]    Creating sys schema
2022-04-27 14:34:18 [NOTE]    done.
2022-04-27 14:34:20 [WARNING] The bootstrap log isn't empty:
2022-04-27 14:34:20 [WARNING] 2022-04-27T05:34:16.108665Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead

MySQL 서비스 등록

서비스 mysqld 파일 복사

# cp /usr/local/mysql57/support-files/mysql.server /etc/init.d/mysqld57

mysqld 수정

# vi /etc/init.d/mysqld57

mysqld파일을 열어서 basedir에 mysql이 설치된 디렉토리와 데이터 디렉토리(datadir)를 설정한다.

basedir=/usr/local/mysql57
datadir=/usr/local/mysql57/data

mysqld 서비스 등록

# sudo update-rc.d mysqld57 defaults

mysqld 서비스 시작

# systemctl status mysqld57.service

mysqld 서비스 확인

[0m mysqld57.service - LSB: start and stop MySQL
     Loaded: loaded (/etc/init.d/mysqld57; generated)
     Active: active (running) since Wed 2022-04-27 14:35:49 KST; 8s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 24814 ExecStart=/etc/init.d/mysqld57 start (code=exited, status=0/SUCCESS)
      Tasks: 28 (limit: 2305)
     Memory: 178.7M
     CGroup: /system.slice/mysqld57.service
             쒋24836 /bin/sh /usr/local/mysql57/bin/mysqld_safe --datadir=/usr/local/mysql57/data --pid>
             붴25223 /usr/local/mysql57/bin/mysqld --basedir=/usr/local/mysql57 --datadir=/usr/local/my>

mysqld 서비스 종료

# systemctl stop mysqld57.service

root 암호 초기화 (mysqld 서비스 종료 후 작업 가능)

권한을 무시하고 mysql 서버 실행

# su mysql
mysql@bluexmas:/root$ cd /usr/local/mysql57
mysql@bluexmas:/usr/local/mysql57$ bin/mysqld_safe --skip-grant-tables &
[1] 25352
mysql@bluexmas:/usr/local/mysql57$ 2022-04-27T05:44:48.564061Z mysqld_safe Logging to '/usr/local/mysql57/data/bluexmas.err'.
2022-04-27T05:44:48.577905Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql57/data

root 암호 설정

mysql@bluexmas:/usr/local/mysql57$ bin/mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.37-log Source distribution
 
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> update user set authentication_string = password('manager!!') where user = 'root';
Query OK, 1 row affected, 1 warning (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 1
 
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
 
mysql> quit
Bye

ERROR 1820 (HY000) 오류 해결

mysql@bluexmas:/usr/local/mysql57$ bin/mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.37-log
 
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> use mysql
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> SET PASSWORD = PASSWORD('B74403530a!!');
Query OK, 0 rows affected, 1 warning (0.00 sec)
 
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> 

사용자 추가

mysql> create user 'user1'@'%' identified by 'userpw'; 
mysql> grant all privileges on *.* to 'user1'@'%' with grant option; 
mysql> flush privileges;

사용자 추가

mysql> create user 'terecal'@'%' identified by '****';
mysql> GRANT ALL privileges ON terecal_db.* TO 'terecal'@'%';
mysql> flush privileges;
728x90
728x90

출처

Orange Pi Zero Plus2 H5 (512MB)

Armbian Linux 초기화

U-Boot SPL 2020.10-armbian (Aug 08 2021 - 16:23:24 +0200)
DRAM: 512 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.5(debug):87311b4-dirty
NOTICE:  BL31: Built : 16:23:20, Aug  8 2021
NOTICE:  BL31: Detected Allwinner H5 SoC (1718)
NOTICE:  BL31: Found U-Boot DTB at 0x2090080, model: OrangePi Zero Plus2
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
NOTICE:  PMIC: Assuming H5 reference regulator design
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
INFO:    BL31: cortex_a53: CPU workaround for 1530924 was applied
INFO:    PSCI: Suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9
alloc space exhausted
 
 
U-Boot 2020.10-armbian (Aug 08 2021 - 16:23:24 +0200) Allwinner Technolog
 
CPU:   Allwinner H5 (SUN50I)
Model: OrangePi Zero Plus2
DRAM:  512 MiB
MMC:   mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from FAT... Unable to use mmc 1:1... In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
** Reading file would overwrite reserved memory **
Failed to load '/boot/boot.bmp'
There is no valid bmp file at the given address
starting USB...
No working controllers found
Autoboot in 1 seconds
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3202 bytes read in 3 ms (1 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
201 bytes read in 2 ms (97.7 KiB/s)
31077 bytes read in 6 ms (4.9 MiB/s)
1020 bytes read in 4 ms (249 KiB/s)
Applying kernel provided DT overlay sun50i-h5-gpio-regulator-1.3v.dtbo
504 bytes read in 4 ms (123 KiB/s)
Applying kernel provided DT overlay sun50i-h5-usbhost2.dtbo
504 bytes read in 3 ms (164.1 KiB/s)
Applying kernel provided DT overlay sun50i-h5-usbhost3.dtbo
4191 bytes read in 4 ms (1022.5 KiB/s)
Applying kernel provided DT fixup script (sun50i-h5-fixup.scr)
## Executing script at 45000000
10048105 bytes read in 481 ms (19.9 MiB/s)
21860360 bytes read in 1043 ms (20 MiB/s)
Moving Image from 0x40080000 to 0x40200000, end=41740000
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    10048041 Bytes = 9.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
   Loading Ramdisk to 4966a000, end 49fff229 ... OK
   Loading Device Tree to 00000000495fa000, end 0000000049669fff ... OK
 
Starting kernel ...
 
 
orangepizeroplus2-h5 login: root (automatic login)
 
  ___  ____  _   _____                ____  _             ____
 / _ \|  _ \(_) |__  /___ _ __ ___   |  _ \| |_   _ ___  |___ \
| | | | |_) | |   / // _ \ '__/ _ \  | |_) | | | | / __|   __) |
| |_| |  __/| |  / /|  __/ | | (_) | |  __/| | |_| \__ \  / __/
 \___/|_|   |_| /____\___|_|  \___/  |_|   |_|\__,_|___/ |_____|
 
Welcome to Armbian 21.08.1 Bullseye with Linux 5.10.60-sunxi64
 
System load:   129%             Up time:       2 min
Memory usage:  24% of 474M      IP:
CPU temp:      30°C             Usage of /:    11% of 15G
 
[ General system configuration (beta): armbian-config ]
 
Last login: Thu Aug 26 10:50:02 UTC 2021 on ttyGS0
 
Waiting for system to finish booting ...
 
New to Armbian? Documentation: https://docs.armbian.com Support: https://forum.armbian.com
 
New root password: pass1234
Repeat password: pass1234

Choose default system command shell:

1) bash
2) zsh

Shell: BASH

Creating a new user account. Press  to abort

Please provide a username (eg. your forename): pi
Create password: pass1234
Repeat password: pass1234
 
Please provide your real name: Pi
 
Dear Pi, your account pi has been created and is sudo enabled.
Please use this account for your daily work from now on.
 
root@orangepizeroplus2-h5:~#

도메인 추가

/etc/resolv.conf 수정

pi@orangepizeroplus2-h5:~$ sudo vi /etc/resolv.conf

8.8.8.8 도메인 서버 추가

nameserver 8.8.8.8

네트워크 서비스 재시작

pi@orangepizeroplus2-h5:~$ sudo systemctl restart networking.service

OS 업데이트 오류 수정

pi@orangepizeroplus2-h5:~$ sudo apt -o Acquire::ForceIPv4=true -o Acquire::CompressionTypes::Order::=gz -o Acquire::http::No-Cache=true -o Acquire::BrokenProxy=true -o Acquire::http::Pipeline-Depth=0 updateh=0 update

Klipper 설치프로그램(KIAUH)

Klipper 설치프로그램(KIAUH) 다운로드

pi@orangepizeroplus2-h5:~$ git clone https://github.com/th33xitus/kiauh

Klipper 설치프로그램(KIAUH) 실행

pi@orangepizeroplus2-h5:~$ cd kiauh/
pi@orangepizeroplus2-h5:~/kiauh$ ./kiauh.sh

Klipper 설치

[1] 메뉴를 선택에서 Klipper 설치 메뉴로 이동
[1] 메뉴를 선택에서 Klipper 설치

/=======================================================\
|     ~~~~~~~~~~~~~~~~~ [ KIAUH ] ~~~~~~~~~~~~~~~~~     |
|        Klipper Installation And Update Helper         |
|     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     |
\=======================================================/
 
###### Initializing Klipper installation ...
 
/=======================================================\
|                    !!! WARNING !!!                    |
|        No Klipper configuration directory set!        |
|-------------------------------------------------------|
|  Before we can continue, KIAUH needs to know where    |
|  you want your printer configuration to be.           |
|                                                       |
|  Please specify a folder where your Klipper configu-  |
|  ration is stored or, if you don't have one yet, in   |
|  which it should be saved after the installation.     |
\=======================================================/
/=======================================================\
|  IMPORTANT:                                           |
|  Please enter the new path in the following format:   |
|  /home/pi/your_config_folder                          |
|                                                       |
|  By default 'klipper_config' is recommended!          |
\=======================================================/
 
###### Please set the Klipper config directory:
/home/pi/klipper_config
 
###### Set config directory to '/home/pi/klipper_config' ? (Y/n): Y
###### > Yes
 
###### Create KIAUH backup directory ...
>>>>>> Directory created!
>>>>>> No config directory found! Skipping backup ...
 
 
###### Directory set to '/home/pi/klipper_config'!

>>>>>> Config directory changed!
/=======================================================\
| Please select the number of Klipper instances to set  |
| up. The number of Klipper instances will determine    |
| the amount of printers you can run from this machine. |
|                                                       |
| WARNING: There is no limit on the number of instances |
| you can set up with this script.                      |
\=======================================================/
###### Number of Klipper instances to set up: 1
 
###### Install 1 instance(s)? (Y/n): Y
###### > Yes
 
###### Installing 1 Klipper instance(s) ...
 
###### Checking for the following dependencies:
● git
>>>>>> Dependencies already met! Continue...
 
###### Downloading Klipper ...
Cloning into 'klipper'...
remote: Enumerating objects: 28750, done.
 
###### Running apt-get update...
 
###### Installing packages...
 
###### Installing python virtual environment...
 
###### Creating Klipper Service  ...
Created symlink /etc/systemd/system/multi-user.target.wants/klipper.service → /etc/systemd/system/klipper.service.
>>>>>> Single Klipper instance created!
 
###### Launching Klipper instance ...
 
#########################################################
 Klipper has been set up!
#########################################################

Moonraker 설치

[4] 메뉴를 선택에서 Moonraker 설치

/=======================================================\
|     ~~~~~~~~~~~~~~~~~ [ KIAUH ] ~~~~~~~~~~~~~~~~~     |
|        Klipper Installation And Update Helper         |
|     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     |
\=======================================================/
 
###### Initializing Moonraker installation ...
 
###### Your Python 3 version is: Python 3.9.2
/=======================================================\
| 1 Klipper instance was found!                         |
| Usually you need one Moonraker instance per Klipper   |
| instance. Though you can install as many as you wish. |
\=======================================================/
 
###### Number of Moonraker instances to set up: 1
 
###### Install 1 instance(s)? (Y/n):
###### > Yes
 
###### Installing Moonraker ...
 
###### Downloading Moonraker ...
  
###### Creating moonraker.conf in /home/pi/klipper_config ...
>>>>>> moonraker.conf created!
 
###### Creating Moonraker Service  ...
 
###### Enabling moonraker.service ...
Created symlink /etc/systemd/system/multi-user.target.wants/moonraker.service → /etc/systemd/system/moonraker.service.
>>>>>> moonraker.service enabled!
>>>>>> Single Moonraker instance created!
 
###### Starting moonraker.service ...
>>>>>> moonraker.service started!
 
 
###### PolicyKit Version 0.105 Detected
 
 
###### Installing Moonraker PolicyKit Rules (Legacy) to /etc/polkit-1/localauthority/50-local.d/10-moonraker.pkla...
 
###### Restarting Moonraker...
 
#########################################################
 Moonraker has been set up!
#########################################################
 
       ● Instance 1: 192.168.1.103:7125

Fluidd 설치

[4] 메뉴를 선택에서 Fluidd 설치

 
###### Downloading MJPG-Streamer ...
 
###### Compiling MJPG-Streamer ...
 
###### Installing MJPG-Streamer ...
 
###### Creating webcam.txt config file ...
 
2022-03-15 04:28:42 (7.30 MB/s) - ‘/home/pi/klipper_config/webcam.txt’ saved [2593/2593]
 
>>>>>> Done!
 
###### Creating MJPG-Streamer service ...
>>>>>> MJPG-Streamer service created!
 
###### Starting MJPG-Streamer service ...
Created symlink /etc/systemd/system/multi-user.target.wants/webcamd.service → /etc/systemd/system/webcamd.service.
>>>>>> MJPG-Streamer service started!
 
###### Create logrotate rule ...
>>>>>> Done!
>>>>>> User pi already in group 'video'!
 
#########################################################
 MJPG-Streamer has been set up!
#########################################################
 
 ● Webcam URL: http://192.168.1.103:8080/?action=stream
 ● Webcam URL: http://192.168.1.103/webcam/?action=stream
 
 
#########################################################
 Fluidd has been set up!
#########################################################

Klipper 설치프로그램(KIAUH) 종료

[B] 메뉴를 선택해서 메인 메뉴로 이동
[Q] 메뉴를 선택해서 Klipper 설치프로그램 종료

 

728x90

+ Recent posts