- 이상하게 돌아가는 파일을 퀵타임에서 연다.
- 이 파일을 rotate를 두번 한 다음에 4k로 저장을 한다.
- mp4joiner로 합친다.
Synology의 Let’s Encrypt 인증서 문제 해결법
let's encrypt에서 인증서 갱신을 하라고 메일이 자주 날아왔는데,
무시하고 살았다가 인증서가 만료되었다.
DSM에서 인증서 갱신도 안 되고,
새로 발급도 안 되어서 며칠을 고생하고 있었는데..
방화벽 체크를 없앤 이후에 '확인' 버튼을 눌러서 방화벽을 완벽하게 정지시킨 다음에
인증서를 새로 발급받으면 문제가 없어진다.
Linux: A, www.A, jpt.A
Synology: git.A, webdav.A, dsm.A
몸의 변화
[클리앙 노젓는당에 2020년 3월 8일 오전에 올린 글]
작년 10월 정도까지 약 7년 정도 열심히 수영을 다녔습니다.
한참 수영에 미쳐 있을 때는 밤수영을 마치고 집에 돌아가서 이것저것 처(!!)먹고 자더라도 살이 빠지는 기현상이 있었습니다.
수영할 때 자세에 조금만 신경만 쓰더라도 온몸 이곳저곳에 힘이 살짝살짝 실려서 그런것 같습니다.
그러다가 기록에 신경을 조금씩 쓰기 시작하면서, 자세가 망가지고 살이 슬금슬금 찌기 시작하는 기현상이 발생하더라구요.
결국에는 기록도 안 나오고 자세도 망가져버리기는 했습니다. -_-;;
작년 10월부터 새벽수영으로 시간을 바꿨는데,
아침잠이 많아서 한달에 한두번 갈까 말까로 나태해지고...
연말에 술자리가 많고 혼술을 좋아해서,
몸이 망가질대로 망가진 것 같더라구요.
작년말에 혈압을 재어봤는데,
무려 160 가까이까지 올랐더라구요.
수영 열심히 할 때는 120을 살짝 넘는 수준이었는데....
이러다 비명횡사하겠다고 겁을 먹고,
올해는 다시 운동을 하려고 마음을 다잡았습니다.
1월 중순에 로잉머신을 구입하고,
혼자 한 며칠을 타봐도 힘은 드는데, 효율은 안 나오는 것 같고...
동영상을 찍어서 살펴보니, 흡사 데프콘이 로잉하는 모습이 겹쳐보이더군요.
그래서 주변에 대학조정부 주장 출신인 친구한테 부탁을 해서,
자세와 타는 방법에 대해서 배우고 있습니다.
요새는 제 개인적인 일과 코로나19 때문에 그 친구한테 못 배운지가 거진 한달이 되어가는 것 같네요.
각설하고,
어제 심심해서 혈압을 다시 재 보았는데, 124가 나오더라구요..
혈압계가 고장난 걸까요? -_-;;
몸무게도 수영을 미친 듯이 할 때는 75kg 정도에서 유지를 해서,
그 때는 슬립핏셔츠도 잘 입고 다니고 그랬는데....
언제부터인가 슬림핏셔츠를 입으면 단추가 터질 듯이 아우성을 치고,
하루는 실제로 단추가 아주 자연스럽게 풀려버린 적도 있었습니다.
작년말 순식간에 무너지면서 올초에는 85kg 근처까지 올랐습니다.
어제 몸무게를 재어보니, 요근래 최저 몸무게인 81kg이 나오더군요.
앞으로 4~5kg만 더 뺐으면 좋겠어요.
단지 로잉만으로 인해서 혈압이 내려가고 몸무게가 빠진 것 같지는 않습니다.
요새 갑자기 며칠 동안 일찍 자서 새벽에 일어나기도 했고,
캐틀벨스윙도 100번 정도씩 하루에 한두번 하고,
일주일에 한두번씩 배틀로프도 웨이브 튕겨주거든요.
스트레스도 안 받으려고 노력을 하고 있고,
밤에 야식 처먹거나 폭식하는 습관도 조금씩 고쳐나가고 있습니다.
생활습관과 식습관, 꾸준한 운동이 중요한 것 같습니다.
자기 몸과 성향에 맞는 운동을 찾는 것도 중요한 것 같고요.
저 같은 경우에는 1인/다인 구기운동은 팔다리가 짧아서 질색이고,
격투와 같은 겨루기 종목은 수싸움에 능하지 못하고 순발력이 없어서 시도도 못 해봤습니다.
그래도 혼자 혹은 여러명이 합을 맞춰서 기록을 재는 운동을 좋아합니다.
그래서 저한테는 수영이나 로잉이 딱인 것 같아요.
제 몸의 변화에 대해서 글을 쓰다보니,
수영과 로잉으로 마치게 되네요.
아레나나 컨셉과는 무관한 40대 중반 아재의 주저리였습니다.
쇼핑몰 구축하기
짬짬이 시간날 때마다 어머니 귤이랑 만감류 판매 쇼핑몰 구축하기 프로젝트 시작.
이것저것 하면 머리가 많이 아프니 wordpress와 WooCommerce로 시작할 것.
도메인 구입: gyulim.com 등을 고민 중inongbu.com 으로 구매웹서버 직접 굴리는 것과 외부 업체에 맡기는 것 중에 나은 것 고민우분투에 직접설치로 결정- 해킹에 대비
- 결제 서비스와 세금 문제 알아보기
- 카드 결제 수수료
- 가상계좌 시스템 알아보기
- 환불 시스템 알아보기
- 택배 시스템과의 연계 방법 알아보기
- 고객 관리법 알아보기
Ubuntu 18.04에 JupyterHub 설치 및 설정 완성
Ubuntu 18.04에 설치하며, domain이 있는 경우에 한해서 설치하는 방법을 기술한다.
분명 1~2년 뒤에 ubuntu 갈아엎을 일이 생길텐데, 이 때 까먹어서 시간낭비하는 것을 방지하기 위해서 기록한다.
-
도메인을 구입한다.
- 나는 바보같이 http://hosting.kr 에서 비싼 돈 내고 구입했으나, 구글링을 하면 미국에서 아주 싸게 구입할 수 있다. 아무튼 구입은 해야 한다.
- IP주소 연결과 서브도메인 설정하기. 추가한 서브도메인은 www.ohmycarpenter.com 과 jpt.ohmycarpenter.com 이다.
- hosting.kr에서는 '네임서버(서브도메인) 설정 관리' 메뉴로 들어가서 설정해야 한다.
- 나는 ohmycarpenter.com, www.ohmycarpenter, jpt.ohmycarpenter.com 모두 같은 IP로 밀어넣었다.
-
Let's Encrypt 를 설치한다.
- apt로 설치한다.
sudo -H ./letsencrypt-auto certonly --apache -d ohmycarpenter.com -d www.ohmycarpenter -d jpt.ohmycarpenter.com sudo add-apt-repository ppa:certbot/certbot sudo apt-get install certbot sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096 ## pem 파일들 권한 조정한다. - 다음 명령어로 letsencrypt 인증서를 매월 1일마다 갱신하게 만든다.
sudo crontab -e # 다음 줄을 추가한다. 0 0 1 * * /bin/bash -l -c "certbot renew --quiet"
- apt로 설치한다.
-
Apache2 서버 설정을 한다.
- 다음 명령어로 apache2 설치
sudo apt install apache2 -
/etc/apache2/sites-available에 다음과 같이 네 개의 파일을 생성
# file: http.jpt.ohmycarpenter.com.conf <VirtualHost *:80> ServerName jpt.ohmycarpenter.com Redirect / https://jpt.ohmycarpenter.com/ ServerAlias jpt.ohmycarpenter.com </VirtualHost># file: https.jpt.ohmycarpenter.com.conf <IfModule mod_ssl.c> <VirtualHost *:443> ServerName jpt.ohmycarpenter.com ServerAlias jpt.ohmycarpenter.com # configure SSL SSLEngine on SSLCertificateFile /some/where/ohmycarpenter.com/full_chain.pem SSLCertificateKeyFile /some/where/ohmycarpenter.com/priv_key.pem SSLProtocol All -SSLv2 -SSLv3 SSLOpenSSLConfCmd DHParameters /etc/ssl/certs/dhparam.pem SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH # Use RewriteEngine to handle websocket connection upgrades RewriteEngine On RewriteCond %{HTTP:Connection} Upgrade [NC] RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteRule /(.*) ws://127.0.0.1:8000/$1 [P,L] <Location "/"> # preserve Host header to avoid cross-origin problems ProxyPreserveHost on # proxy to JupyterHub ProxyPass http://127.0.0.1:8000/ ProxyPassReverse http://127.0.0.1:8000/ </Location> </VirtualHost> </IfModule># file: http.www.ohmycarpenter.com.conf <VirtualHost *:80> ServerName www.ohmycarpenter.com ServerAlias www.ohmycarpenter.com ohmycarpenter.com ServerAdmin webmaster@localhost Redirect / https://www.ohmycarpenter.com/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost># file: https.www.ohmycarpenter.com.conf <IfModule mod_ssl.c> # <VirtualHost _default_:443> <VirtualHost *:443> ServerAdmin webmaster@localhost DocumentRoot /home2/www/wordpress ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLEngine on SSLCertificateFile /some/where/ohmycarpenter.com/cert1.pem SSLCertificateKeyFile /some/where/ohmycarpenter.com/priv_key.pem SSLCertificateChainFile /some/where/ohmycarpenter.com/chain1.pem SSLProtocol All -SSLv2 -SSLv3 SSLOpenSSLConfCmd DHParameters /etc/ssl/certs/dhparam.pem SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH ServerAdmin oh.donghyun77@gmail.com ServerName ohmycarpenter.com ServerAlias www.ohmycarpenter.com <Directory /home2/www/wordpress/> AllowOverride All </Directory> <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> </VirtualHost> </IfModule>#위 네개의 파일에 대해 symbolic link를 만든다. ln -s /etc/apache2/sites-available/http.www.ohmycarpenter.com /etc/apache2/sites-enabled/http.www.ohmycarpenter.com ln -s /etc/apache2/sites-available/https.www.ohmycarpenter.com /etc/apache2/sites-enabled/https.www.ohmycarpenter.com ln -s /etc/apache2/sites-available/http.jpt.ohmycarpenter.com /etc/apache2/sites-enabled/httpjpt.ohmycarpenter.com ln -s /etc/apache2/sites-available/https.jpt.ohmycarpenter.com /etc/apache2/sites-enabled/https.jpt.ohmycarpenter.com
- 다음 명령어로 apache2 설치
-
wordpress 를 설치한다.
- 웹사이트 돌아다니면서 가장 간단하게 설명해 놓은 것을 참조해서 설치한다.
- wordpress 루트 디렉토리를 www-data user, group으로 한정 및 755로 권한 조정하고, wp-config.php 파일은 640으로 권한 조정
- 필수 설치 플러그인: all in one wp security, cc-syntax-highlight, easy updates manager, jetpack, really simple ssl (돈 안 내도 됨), 고전 편집기, WP Githuber MD
- All In One WP Security로 보안 테스트 및 설정한다.
-
JupyterHub를 설치한다.
- 다음 명령어로 TLJH를 설치한다.
sudo apt install python3 python3-dev git curl sudo adduser jpthub_admin_id curl https://raw.githubusercontent.com/jupyterhub/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo -E python3 - --admin jpthub_admin_id - 다음 명령어로 아파치 서버와 jupyterhub를 시작한다.
sudo systemctl start apache2 - 다음 명령어로 jupyterhub 설정을 한다.
sudo tljh-config set https.tls.key /some/where//ohmycarpenter.com/priv_key.pem sudo tljh-config set https.tls.cert /some/where/ohmycarpenter.com/chain.pem sudo tljh-config reload proxy sudo tljh-config set user_environment.default_app jupyterlab sudo tljh-config set limits.memory 40G sudo tljh-config add-item users.admin another_admin_id_existed_in_ubuntu sudo tljh-config reload
- 다음 명령어로 TLJH를 설치한다.
-
Tensorflow 설치를 한다.
- NVIDIA GPU driver 410, CUDA toolkit 10.0, cuDNN 7.4 를 매뉴얼을 따라서 설치한다. Tensorflow 버전마다 지원하는 CUDA가 다른 듯 하니 버전을 잘 살펴가면서 설치해야 할 듯. 참고 사이트: https://www.tensorflow.org/install/gpu
apt로 cuda-10-0, cudnn-7-4-2, nvidia-driver-410 설치하면 tensorflow-2.0.0 설치 가능 - pip로 tensorflow-gpu를 설치한다.
sudo apt-get -y install python3-pip sudo pip3 install tensorflow-gpu==2.0.0 # 2.0.0 버전 설치 명기
- NVIDIA GPU driver 410, CUDA toolkit 10.0, cuDNN 7.4 를 매뉴얼을 따라서 설치한다. Tensorflow 버전마다 지원하는 CUDA가 다른 듯 하니 버전을 잘 살펴가면서 설치해야 할 듯. 참고 사이트: https://www.tensorflow.org/install/gpu
-
Jupyterhub에 jpt_admin_id로 로긴을 하고 python 필수 패키지들과 Anaconda, iRkernel을 설치한다.
- New -> Terminal로 들어가서 다음 명령어로 python 패키지들 설치
sudo -E pip3 install packages # keras, coffee, pandas, etc. - 다음 명령어로 Anaconda3 설치: 이미 R이 설치도어 있으면, 사실 iRKernel 설치하는데 Anaconda는 필요하지 않은 듯
cd ~/tmp curl -O https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh bash Anaconda3-2019.10-Linux-x86_64.sh conda update --all - 다음 명령어로 R에서 다음 명령어를 넣어서 iRKernel을 설치
install.packages('IRkernel') IRkernel::installspec() ## remove unnecessary environment settings in $HOME/.Rprofile, such as options(device = "x11").
- New -> Terminal로 들어가서 다음 명령어로 python 패키지들 설치
-
JupyterHub에서 admin -> user 관리는 메뉴가 뜨기도 했다가 안 뜨기도 했다가 하는 듯. 나중에 버전 업데이트 되면서 고쳐지면 좋을 듯 하다.