절전 모드에서 나오지 못하고 강제 리부팅후에 /var/log/syslog 를 보니 아래의 로그가 있었다.

 

pr 30 13:34:49 pc-linux systemd[1]: anacron.service: Succeeded.
Apr 30 13:34:49 pc-linux systemd[1]: motd-news.service: Succeeded.
Apr 30 13:34:49 pc-linux systemd[1]: Finished Message of the Day.
Apr 30 13:35:30 pc-linux acpid: input device has been disconnected, fd 24


Apr 30 14:08:38 pc-linux kernel: [    0.000000] Linux version 5.8.0-50-generic (buildd@lgw01-amd64-030) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 (Ubuntu 5.8.0-50.56~20.04.1-generic 5.8.18)
Apr 30 14:08:38 pc-linux systemd-modules-load[408]: Inserted module 'parport_pc'
Apr 30 14:08:38 pc-linux kernel: [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.8.0-50-generic root=UUID=9cff6431-fc36-40b9-b47b-a57914ef6d71 ro quiet splash crashkernel=512M-:192M
Apr 30 14:08:38 pc-linux kernel: [    0.000000] KERNEL supported cpus:
Apr 30 14:08:38 pc-linux kernel: [    0.000000]   Intel GenuineIntel
Apr 30 14:08:38 pc-linux kernel: [    0.000000]   AMD AuthenticAMD

저것을 검색해보니 절전모드에서 usb 마우스 키보드가 닫혀 버리는 버그가 있다고 합니다.

 

그래서 해결방법은 usb를 절전모드로 들어가지 않게 하는것이라고 합니다.

 

해결방법은

 

해결방법 1 :

/etc/defaults/grub 에서 GRUB_CMDLINE_LINUX_DEFAULT 끝에

"usbcore.autosuspend=-1" 를 추가하면 됩니다.

 

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"

 

그후  update-grub 를 실했시키고 재부팅합니다.

 

해결방법 2

$ sudo echo "options usbcore autosuspend=-1" > /etc/modprobe.d/disable-usb-autosuspend.conf

 

해당 명령어를 실행후 재부팅한다.

브리츠 BR-1000A를 중고로 총 2만5천원에 사서 개조가 가능하다라는 사실을 안후

앰프만 사서 달았습니다.

 

효과는 조금 나아진것 같은데 이게 플라이보 효과인지 기분탓인지 진짜 좋아진건지는 모르겠네요.

저음이 조금더 풍부해진것 같기도 합니다.

 

m.blog.naver.com/hyuny4858/70014331950

 

PC 스피커 브리츠 BR-1000A 개조과정 1

트위터의 콘덴서부분 원래 붙어있던놈 떼어내고 집에서 굴러다니던 케이블모뎀에서 떼어낸놈으로 붙인모습 ...

blog.naver.com

 

 

앰프칩을 알리에서 배송비 포함 1.03달러로 샀습니다.

 

ko.aliexpress.com/item/32909343752.html

 

US $0.38 11% OFF|1 PC IC 칩 OPA2134PA DIP 8 OPA2134 2134PA 연산 증폭기 IC 원래 집적 회로|반도체 집적회로| -

Smarter Shopping, Better Living! Aliexpress.com

ko.aliexpress.com

 

 

빨간색으로 동그라미 친 부분이 앰프 부품입니다.

 

 

 

import org.slf4j.LoggerFactory;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;


void test() {

    //resultsettable log off 
    LoggerContext loggerContext = (LoggerContext)LoggerFactory.getILoggerFactory();

    loggerContext.getLogger("jdbc.resultsettable").setLevel(Level.OFF);

    examDao.selectList(...);

    loggerContext.getLogger("jdbc.resultsettable").setLevel(Level.INFO);

}

Smartyoutube TV다운로드 받아 usb에 복사하여

 

H3 딜라이브에 USB를 꽂아 설치한다음 실행하면 됩니다.

처음 실행되면 PRO를 선택하고

처음 실행이 아주 오래걸리니 실행시켜놓고 기다리세요.

 

 

 

1. pfx 파일을 crt 및 rsa로 변환 - convert pfx file to crt and rsa.

 $ openssl pkcs12 -in ssl.mysite.com.pfx  -clcerts -nokeys -out ssl.mysite.com.crt
 $ openssl pkcs12 -in ssl.mysite.com.pfx -nocerts -nodes -out ssl.mysite.com.rsa


2. crt rsa파일 복사 - copy crt and rsa file to NGINX_HOME/conf/ssl/

C:\Users\fehead> dir /w C:\nginx\conf\ssl

C:\nginx\conf\ssl
[.]                 [..]                ssl.mysite.com.crt   ssl.mysite.com.rsa
C:\Users\fehead>




3. nginx config 파일 설정 - set nginx config file.

######################################################################################################################################################
### nginx config.

# tomcat

upstream    tomcat {
    server    127.0.0.1:8080    fail_timeout=0;
}

# ssl.mysite.com https setting
server {
        server_name ssl.mysite.com;

        location / {
                proxy_redirect off;
                proxy_pass_header Server;

                proxy_set_header Host $http_host;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Scheme $scheme;
                proxy_pass http://tomcat;
                charset utf-8;
        }

    listen [::]:443 ssl;
    listen 443 ssl;
    ssl on;
    ssl_certificate    ssl/ssl.mysite.com.crt;
    ssl_certificate_key    ssl/ssl.mysite.com.rsa;

}


# ssl.mysite.com SSL redirect
server {
    listen 80;
    listen [::]:80;

    server_name ssl.mysite.com;   

    return 301 https://$host$request_uri;   
}


# Etc Site
server {
    listen 80;
    listen [::]:80;

    server_name etc.mysite.com;   
    ...

}



4. test nginx config

C:\nginx>nginx.exe -t
nginx: the configuration file C:\nginx/conf/nginx.conf syntax is ok
nginx: configuration file C:\nginx/conf/nginx.conf test is successful

C:\nginx>


5. restart nginx


C:\nginx>nginx.exe -s reload


http://fehead.tistory.com/216 참고


1. 여기서  http://freedns.afraid.org/ FREE 동적 DNS를 먼저 구한다.


동적DNS를 무료로 사용해보자 - FreeDNS - 여기를 참고 하라.



2. freedns 에서 키값을 얻는다.

http://freedns.afraid.org/dynamic/ 에 들어가서 중앙 하단 부분에 자기가 등록한 도메인이 있을 것이고 그 아래쪽에 Direct URL 를 클릭하면 새창이 뜬다.



 






여기서 나온 URL부분에

빨간 상자 부분이 키 값이다.


3. Padavan 설정





고급설정 -> WAN ->DDNS 메뉴로 간다음

DDNS 클라이언트 활성화

서버 프로필을 "freedns.afraid.org" 선택

호스트에 "freedns.afraid.org"

토큰에 freedns.afraid.org  에서 얻은 키값을 넣는다.

보안 HTTPS 연결을 사용 하시겠습니까? "아니오" 선택

적용 버튼을 누른다.



라즈베리파이2에 usb 무선동굴이를 설치하고 무선공유기에 접속해서 쓰고 있다.


동굴이는 EFM ipTIME N100mini usb 2.0 를 사다가 끼웠다.


무선공유기 ssid가 myssid 이고 비밀번호가 mypassword이면 아래와 같이 하고 재부팅 하면 된다.


$ sudo -i

# rpi-update

# wpa_passphrase myssid mypassword >>  /etc/wpa_supplicant/wpa_supplicant.conf

# vi /etc/wpa_supplicant/wpa_supplicant.conf


/etc/wpa_supplicant/wpa_supplicant.conf 수정.

# /etc/wpa_supplicant/wpa_supplicant.conf

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1         # 추가
ap_scan=1               # 추가.

network={
        ssid="myssid"
        scan_ssid=1              # 마지막에 추가된 myssid란에 추가.
        #psk="mypassword"
        psk=2f0568b3492812bd56b946dbaf3fd7dd669b9a4602a09aa6462ff057949b025c
}
 


재부팅

# reboot


postfix 메일서버 설치 방법


$ sudo -i

# apt install postfix

# vi /etc/postfix/main.cf

mynetworks = 127.0.0.0/8 192.168.0.0/24  # 192.168.0.0/24 - 메일을 보낼수 있는 ip 대역 추가.

# systemctl enable postfix.service

# systemctl start postfix.service

# mail -s "email title" user@test.com

mail test...

ctrl + d


#

 



tomcat 서버설정
Server.xml을 설정합니다.


[설정방법]
< Connector port="포트번호" protocol="HTTP/1.1" SSLEnabled="true"
               maxThread="150" scheme="https" secure="true"
               keystoreFile="pfx파일경로" keystorePass="pfx패스워드" keystoreType="PKCS12"
               clientAuth="false" sslProtocol="TLS" />


[설정예제]  
< Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThread="150" scheme="https" secure="true"
               keystoreFile="/etc/tomcat/ssl/example.com.pfx" keystorePass="123456" keystoreType="PKCS12"
               clientAuth="false" sslProtocol="TLS" />



URL : https://www.comodossl.co.kr/certificate/ssl-installation-guides/Tomcat-pfx.aspx

가상환경 설정

$ cd /my/working/dir

$ virtualenv -p python3 env35

$ cd env35

$ mkdir run

$ source bin/activate

$ pip install django gunicorn

$ django-admin startproject testproject

$ cd testproject

$ django-admin startapp testapp


디렉토리 구조

/my/working/dir


`-- env35
    |-- bin
    |  
    |-- include
    |   `-- python3.5m -> /usr/include/python3.5m
    |-- lib
    |   `-- python3.5
    |-- testproject
    |   |-- media
    |   |-- testproject
    |   |-- static
    |   |-- templates
    |   `-- testapp
    `-- run



gunicorn systemd 등록

$ sudo mkdir /run/gunicorn

$ sudo chown youurUserName.yourGroup /run/gunicorn

# sudo vi /etc/systemd/system/gunicorn.service

[Unit]
Description=gunicorn daemon
After=network.target

[Service]
PIDFile=/run/gunicorn/pid
User=youurUserName
Group=yourGroup
WorkingDirectory=/my/working/dir/env35/testproject
ExecStart=/my/working/dir/env35/bin/gunicorn \
        --pid /run/gunicorn/pid \
        --workers 2 \
        --bind unix:/run/gunicorn/gunicorn.sock \
        testproject.wsgi:application

ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID

[Install]
WantedBy=multi-user.target


gunicorn 서비스 시작

$ sudo systemctrl enable gunicorn.service

$ sudo systemctl start gunicorn.service



+ Recent posts