Posted
Filed under 개발/Linux
LEMP는 Linux + Nginx + MariaDB + PHP7 의 조합을 의미한다. Nginx의 N 대신 발음하기 좋게 EngineX의 E를 쓴다

1. Nginx
Nginx는 Apache와 다르게 비동기서버라서 퍼포먼스가 더 좋고 메모리 소비량도 적다.

* nginx 설치
$ sudo apt install nginx
이 시점에서 서버의 80번 포트로 접속할수 있게 된다.


2. PHP
* Nginx는 PHP를 네이티브로 지원하지 않으므로 Fastcgi Process Manager(FPM)로 구현된 PHP를 설치한다
$ sudo apt install php-fpm
$ sudo nano /etc/nginx/sites-available/default
에서
index index.html index.htm index.nginx-debian.html;
→ index index.html index.htm index.php;
로 수정.

[code]
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
# fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
#}
[/code]
에서

[code]
location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
[/code]
로 수정.

* 서비스 재시작
$ sudo service nginx reload


3. MariaDB 설치
$ sudo apt install mysql-server php-mysql

* 초기셋업
$ sudo mysql_secure_installation

Enter current password for root (enter for none): 엔터
Set root password? [Y/n] y
New password: 패스워드 입력
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

* 로그인
$ sudo mysql -uroot -p

* 워드프레스용 DB 생성
create database wordpress;

* 워드프레스 DB에 접근할 수 있는 유저 생성
create user 사용자이름 identified by '패스워드';

* 생성한 유저에 워드프레스 DB에 대한 모든 권한을 부여
grant all privileges on wordpress.* to '사용자이름'@'localhost' identified by '패스워드';

* 권한변경을 적용
flush privileges;


4. 워드프레스 설치

* html 폴더 안의 모든 파일 삭제
$ cd /var/www/html/
$ sudo rm *

* 워드프레스 다운로드
$ sudo wget http://wordpress.org/latest.tar.gz

* 다운로드한 파일의 압축해제
$ sudo tar xzf latest.tar.gz

* 워드프레스 폴더안의 모든파일을 현재 폴더로 이동
$ sudo mv wordpress/* .

* 압축파일과 빈 워드프레스 폴더를 삭제
$ sudo rm -rf wordpress latest.tar.gz

* 워드프레스 셋업
http://localhost 로 접속하여 웹브라우저 상에서 셋업


5. SSL 설정

* Let's encrypt 설치
$ sudo apt install letsencrypt

* HTTP-based DCV 방식으로 서버 인증
$ sudo letsencrypt certonly --webroot --webroot-path=/var/www/html -d test.com -d www.test.com

* 인증성공시 인증서 발급
/etc/letsencrypt/live/test.com/ 폴더에 인증서가 생성된다.
cert.pem(인증서 파일), chain.pem(인증서 발급자 파일),
fullchain.pem(cert.pem 과 chain.pen 을 하나로 합쳐놓은 파일),
privkey.pem(인증암호를 해독하는 개인키)

Apache2는 cert.pem, chain.pem, privkey.pem 을 사용.
Nginx는 fullchain.pem, privkey.pem 을 사용.

* Nginx 설정
/etc/nginx/sites-available/default를 다음과 같이 수정한다.

[code]
server {
    listen 80 default_server;
    listen [::]:80 default_server;

    server_name www.test.com test.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 default_server;
    listen [::]:443 default_server;

    root /var/www/html;
    index index.html index.htm index.php;
    server_name _;

    location / {
        try_files $uri $uri/ =404;
    }

    ssl                  on;
    ssl_certificate      /etc/letsencrypt/live/test.com/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/test.com/privkey.pem;
    ssl_ciphers  HIGH:!aNULL:!MD5;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
    }
}
[/code]

* 인증서 갱신
$ sudo letsencrypt renew

* 인증서 삭제
$ certbot revoke --cert-path /etc/letsencrypt/live/test.com/cert.pem
$ certbot delete --cert-name test.com
2019/04/09 08:55 2019/04/09 08:55
Posted
Filed under 개발/Linux
* 한글폰트 설치
sudo apt install fonts-unfonts-core

* 한글입력기 설치
sudo apt install ibus-hangul

* 시스템언어 변경
Menu → Preferences → Raspberry Pi Configuration → Localisation → Set Locale → Language: Korean, Country: KR, Character Set: UTF-8 로 설정.
2019/04/09 07:49 2019/04/09 07:49
Posted
Filed under 개발/Linux
* 방화벽 설정확인
sudo ufw status verbose

* 포트개방
sudo ufw allow [port]/[optional: protocol]
 ex) sudo ufw allow 22/tcp
웹사이트 운용을 위해서는 88/443 포트를 개방

* 포트폐쇄
sudo ufw deny [port]/[optional: protocol]
ex) sudo ufw deny 22/tcp

* ufw 활성화
sudo ufw enable

* Gufw 설치 (GUFW를 통해 GUI 방식으로 ufw 설정가능)
sudo apt install gufw

2019/04/09 00:18 2019/04/09 00:18
Posted
Filed under 개발/Linux
* 실행중인 스왑서비스 중지
$ sudo /etc/init.d/dphys-swapfile stop

* 스왑사이즈 변경
$ sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=1024

* 스왑서비스 시작
$ sudo /etc/init.d/dphys-swapfile start

* 변경된 스왑사이즈 확인
$ free -h

2019/04/09 00:04 2019/04/09 00:04
Posted
Filed under 개발/Linux
1. 윈도우에서 원격데스크탑(RDP)로 접속할 경우
$ sudo apt install xrdp

2. VNC로 접속할 경우
$ sudo apt install vncserver
$ sudo raspi-config → 5. Interfacing Options → P3 VNC: Enable
$ sudo reboot

5900 포트가 열렸는지 확인
$ netstat -ant

$ sudo nano /boot/config.txt의 내용을 다음과 같이 수정
[code]
#framebuffer_width=1280
#framebuffer_height=720
[/code]


[code]
framebuffer_width=1280
framebuffer_height=720
[/code]
로 수정

$ sudo reboot
2019/04/08 23:56 2019/04/08 23:56
Posted
Filed under 개발/iOS
사용자 삽입 이미지















잠수함을 타고 끝없는 심해로 들어가세요.

코인 다섯개를 모아 연료탱크를 업그레이드합니다.
50번의 업그레이드 후 연료탱크는 더이상 소모되지 않습니다.
스타 취득시 연료가 증가하고 잠수함이 작아져
장애물을 더욱 손쉽게 빠져나갈 수 있습니다.

10,000 m 잠수에 도전하세요!


https://itunes.apple.com/app/id1457811913
사용자 삽입 이미지





2019/04/04 19:15 2019/04/04 19:15
Posted
Filed under 개발/iOS
Family Model Size
(Inch)
Width (Points) Height (Points) Rendered Width
(Pixel)
Rendered Height
(Pixel)
Points Per Inch Retina Factor Release Date
iPad Pro (3nd gen 12.9") 12.9 1024 1366 2048 2732 264 2 10/30/2018
iPad Pro (2nd gen 12.9") 12.9 1024 1366 2048 2732 264 2 6/13/2017
iPad Pro (1st gen 12.9") 12.9 1024 1366 2048 2732 264 2 11/11/2015
iPad Pro (3nd gen 11") 11 834 1194 1668 2388 264 2 10/30/2018
iPad Pro (2nd gen 10.5") 10.5 834 1112 1668 2224 264 2 6/13/2017
iPad Pro (1st gen 9.7”) 9.7 768 1024 1536 2048 264 2 3/31/2016
iPad Air 3 10.5 834 1112 1668 2224 264 2 3/18/2019
iPad Air 2 9.7 768 1024 1536 2048 326 2 10/22/2014
iPad Air 9.7 768 1024 1536 2048 264 2 11/1/2013
iPad 6th gen 9.7 768 1024 1536 2048 264 2 3/27/2018
iPad 5th gen 9.7 768 1024 1536 2048 264 2 3/24/2017
iPad 4th gen 9.7 768 1024 1536 2048 264 2 11/12/2012
iPad 3rd gen 9.7 768 1024 1536 2048 264 2 3/16/2012
iPad 2 9.7 768 1024 768 1024 132 1 3/11/2011
iPad 1st gen 9.7 768 1024 768 1024 132 1 4/3/2010
iPad mini 5 7.9 768 1024 1536 2048 326 2 3/18/2019
iPad mini 4 7.9 768 1024 1536 2048 326 2 9/9/2015
iPad mini 3 7.9 768 1024 1536 2048 264 2 10/22/2014
iPad mini 2 7.9 768 1024 1536 2048 326 2 11/12/2013
iPad mini 7.9 768 1024 768 1024 163 1 11/2/2012
iPhone XS Max 6.5 414 896 1242 2688 458 3 9/21/2018
iPhone XR 6.1 413 896 826 1792 326 2 10/26/2018
iPhone XS 5.8 375 812 1125 2436 458 3 9/21/2018
iPhone X 5.8 375 812 1125 2436 458 3 11/3/2017
iPhone 8 Plus 5.5 414 736 1242 2208 401 3 9/22/2017
iPhone 7 Plus 5.5 414 736 1242 2208 401 3 9/16/2016
iPhone 6s Plus 5.5 414 736 1242 2208 401 3 9/25/2015
iPhone 6 Plus 5.5 414 736 1242 2208 401 3 9/19/2014
iPhone 8 4.7 375 667 750 1334 326 2 9/22/2017
iPhone 7 4.7 375 667 750 1334 326 2 9/16/2016
iPhone 6s 4.7 375 667 750 1334 326 2 9/25/2015
iPhone 6 4.7 375 667 750 1334 326 2 9/19/2014
iPhone SE 4 320 568 640 1136 326 2 3/31/2016
iPhone 5c 4 320 568 640 1136 326 2 9/20/2013
iPhone 5s 4 320 568 640 1136 326 2 9/20/2013
iPhone 5 4 320 568 640 1136 326 2 9/21/2012
iPhone 4S 3.5 320 480 640 960 326 2 10/14/2011
iPhone 4 3.5 320 480 640 960 326 2 6/21/2010
iPhone 3GS 3.5 320 480 320 480 163 1 6/19/2009
iPhone 3G 3.5 320 480 320 480 163 1 7/11/2008
iPhone 1st 3.5 320 480 320 480 163 1 6/29/2007
iPod touch 6th gen 4 320 568 640 1136 326 2 7/15/2015
iPod touch 5th gen 4 320 568 640 1136 326 2 10/11/2012
iPod touch 4th gen 3.54 320 480 640 960 326 2 9/1/2010
iPod touch 3rd gen 3.54 320 480 320 480 163 1 9/9/2009
iPod touch 2nd gen 3.54 320 480 320 480 163 1 9/9/2008
iPod touch 1st gen 3.54 320 480 320 480 163 1 9/5/2007
2019/03/29 13:10 2019/03/29 13:10
Posted
Filed under 개발/하드웨어

APPLE 맥북프로 2018년형 MR932KH/A (SSD 256GB)

최저가
2,497,000 자세히보기


남다른 클래스와 차이, MacBook Pro 새로운 인텔  고성능 프로세서 넉넉한 용량의 메모리 매혹적인 Retina 디스플레이 효율적인 Touch Bar 강력하고, 뛰어난 성능 고성능 인텔 프로세서와 넉넉한 메모리, 빠른 저장 장치로 무장한  MacBook Pro와 함께 어디서든, 그 어느 때보다 빠르게 작업할 수 있습니다. 차세대 보안 기술의 APPLE T2칩 탑재 Apple이 설계한 2세대 맞춤형 Mac용 칩인 Apple T2 칩을 장착하여, 강력한 MacBook Pro의 보안을 한층 더 강화하였습니다. Apple T2 칩에는 보안 부팅 및 저장 장치 암호화 기능의 기반이 되는 Secure Enclave 보조 프로세서가 내장되어있어, 더 강력하고 뛰어난 보안 기술을 보여줍니다.  2세대 맞춤형 Mac용 T2칩 보안 부팅 및 하드웨어적인 암호화 저장을 즉각적으로  지원하며, 시스템 관리 컨트롤러, 오디오 컨트롤러,  SSD 컨트롤러 등 모든 개별 컨트롤러를 Apple T2칩에서  통합 관리가 가능합니다. 음성인식 비서 Siri 소환 가능 새로 탑재된 Apple T2칩을 통한 음성인식 비서 Siri를 소환할 수 있습니다. MacBook 시리즈 최초로 Siri를 통한  음성 명령 구현이 가능해져 언제든 “Siri야”라고 불러서 다양한 작업들을 수행할 수 있습니다. 놀라운, 생생한 디스플레이 MacBook Pro의 Retina 디스플레이는 역대 최고의 Mac 노트북 디스플레이입니다.  밝은 LED 백라이트와 높은 명암비를 통해 진한 검은색과 밝은 하얀색을 뚜렷하게 표현하고,  넓은 P3 색영역을 지원하여 sRGB보다 더욱더 생생한 초록색과 빨간색을 구현합니다. 놀랍고도 생생한 Retina 디스플레이를 경험해보세요. True Tone 기술 지원 주변 조명의 색온도에 맞게 자동으로 화이트 밸런스를 조절해서 더욱 자연스러운 화면을 구현해주는 기술로, 눈의 피로도 감소 및 디스플레이의 정확한 색표현을 보여줍니다. 효율적인 업무 방법.  직관적인 Touch Bar Touch Bar는 기존에 키보드 상단을 차지하고 있었던 기능키를 대신하여  훨씬 더 다재다능하고 강력한 기능을 선보입니다. 시스템 컨트롤, 인터랙티브  방식의 콘텐츠 정리 및 탐색, 스마트한 타이핑 기능 등, 자동으로 모습을 바꾸며  직관적으로 사용할 수 있도록 관련 도구들을 보여줍니다. 간편한 잠금해제, Touch ID 손가락 터치 한 번에 Mac을 바로 잠금 해제하고,  시스템 설정과 잠금 메모도 빠르게 열어볼 수 있습니다.  첨단 보안 인증 기술인 Touch ID로 더욱 안전하고  빠른 인증 기술을 구현합니다. 다재다능한 포트 Thunderbolt 3 커넥터 하나로 데이터 전송, 충전, 동영상 출력이 모두 가능한, Thunderbolt 3  기존 포트 보다 2배 커진 대역폭으로 최대 40Gb/s의 처리량을 자랑하며 리버서블 디자인으로 어느 쪽에서든 편하게 모든 연결이 가능합니다.  조용한 타이핑,  조용해진 작업 공간 나비식 매커니즘이 적용된 MacBook Pro의 키보드는 기존 가위식 매커니즘에 비해  4배 더 향상된 안정성과 함께 더욱 훌륭한 편안함과 조용한 타이핑을 선사합니다. 넓은 Force Touch 트랙패드는 제스처든 클릭이든 손가락을 움직이기에 넉넉한 공간을 제공합니다


다나와 저작권 안내

2019/03/17 13:01 2019/03/17 13:01
Posted
Filed under 음악감상실
2019/03/06 21:52 2019/03/06 21:52
Posted
Filed under 잡다한정보/정치&사회
##장자연 자살 사건 * [Link](https://namu.wiki/w/%EC%9E%A5%EC%9E%90%EC%97%B0%20%EC%9E%90%EC%82%B4%20%EC%82%AC%EA%B1%B4) ##장자연 2부작 1부 핵심정리 | 故 장자연 문건을 추적하다 * [Link](https://www.youtube.com/watch?v=UoXUJX4H2KI) ##MBC PD수첩 - 고 장자연 2부 선공개영상 (7월 31일 화요일 방송) * [Link](https://www.youtube.com/watch?v=Ju-udikWobc) ##2018 대한민국과 PD수첩 ② 故 장자연 편 미공개 영상 전격 공개 "권재진 전 법무부장관도 술자리에 동석했다" * [Link](https://www.youtube.com/watch?v=0T_jpabKZjc&t=309s) ##[인터뷰] '장자연 성추행' 목격자…육성 증언 (2018.06.28) * [Link](https://www.youtube.com/watch?v=4D66QSHYnCs) ##[이슈 완전정복] 故 장자연 자살 재조사…임우재도 30여 회 통화 (2018.10.12/뉴스외전/MBC) * [Link](https://www.youtube.com/watch?v=bZbIx541QgE) ##[3부] 故장자연 씨 동료의 최초 증언(윤지오) | 김어준의 뉴스공장 * [Link](https://www.youtube.com/watch?v=gS_KHy4akx8) ##故장자연 사건 추가 증언(김남형, 주진우) | 김어준의 뉴스공장 * [Link](https://www.youtube.com/watch?v=w8QdlMVpRoc&t=18s) ##긴급 팩트체크 윤지오 배우 인터뷰 장자연 사건 7년의 취재파일 공개 / "청-국정원 개입 구조적 비리.. 이미숙 입열어야" / 3월5일(화) 이상호의 뉴스비평 107회 * [Link](https://www.youtube.com/watch?v=kEBC1Fxpj7g)
2019/03/06 10:29 2019/03/06 10:29
Posted
Filed under 음악감상실
2019/02/10 22:17 2019/02/10 22:17
Posted
Filed under 음악감상실
2019/02/10 21:29 2019/02/10 21:29
Posted
Filed under 개발/Linux
* 이해하기 쉽게 풀어서 설명해 놓은 git 설명페이지
https://backlog.com/git-tutorial/kr/


* git repositories 관리 툴에는 여러가지가 있는데 github는 프라이빗 저장소에 제한이 있다. gitlab은 시놀로지에 설치는 되는데 Docker를 지원하는 고가의 기종에서만 가능하다.
https://ux.stories.pe.kr/82


* 시놀로지 gitlab 지원모델
https://www.synology.com/ko-kr/dsm/packages/Docker-GitLab

  • 19 시리즈 : RS1619xs+, RS1219+, DS1819+
  • 18 시리즈 : FS1018, RS3618xs, RS2818RP+, RS2418RP+, RS2418+, RS818RP+, RS818+, DS3018xs, DS1618+, DS918+, DS718+, DS218+
  • 17 시리즈 : FS3017, FS2017, RS18017xs+, RS4017xs+, RS3617xs+, RS3617RPxs, RS3617xs, DS3617xs, DS1817+, DS1517+
  • 16 시리즈 : RS18016xs+, RS2416RP+, RS2416+, DS916+, DS716+, DS716+II, DS216+, DS216+II
  • 15 시리즈 : RS815RP+, RS815+, RC18015xs+, DS3615xs, DS2415+, DS1815+, DS1515+, DS415+
  • 14 시리즈 : RS3614xs+, RS3614RPxs, RS3614xs, RS2414RP+, RS2414+, RS814RP+, RS814+
  • 13 시리즈 : RS10613xs+, RS3413xs+, DS2413+, DS1813+, DS1513+, DS713+
  • 12 시리즈 : RS3412RPxs, RS3412xs, RS2212RP+, RS2212+, RS812RP+, RS812+, DS3612xs, DS1812+, DS1512+, DS712+, DS412+
  • 11 시리즈 : RS3411RPxs, RS3411xs, RS2211RP+, RS2211+, DS3611xs, DS2411+, DS1511+, DS411+, DS411+II
  • *10 시리즈 : RS810RP+, RS810+, DS1010+, DS710+


* 어쨌든 프라이빗 소스를 서비스회사에 맡기고 싶진 않아 개인서버에 git을 설치하고 웹매니징을 할수 있게 해 주는 서비스를 찾아보니 gogs와, gogs에서 파생되어 나온 gitea가 있다. 그런데 gogs는 시놀로지 서버에 설치되므로 gogs로 낙점.
https://www.slant.co/versus/1395/19087/~gogs_vs_gitea


* 속도도 다른 서비스들에 비해 충분히 빠르다.
https://gitbucket.github.io/gitbucket-news/gitbucket/2017/03/29/benchmark-of-gitbucket.html


* gogs 사용을 위해 시놀로지에 git server 설치. 유저는 생성하지 않아도 좋다.
https://www.synology.com/ko-kr/knowledgebase/DSM/help/Git/git


* 시놀로지에 gogs 설치하기
https://kimcblog.com/2018/08/28/%EC%8B%9C%EB%86%80%EB%A1%9C%EC%A7%80synology-nas%EC%97%90-github%EC%B2%98%EB%9F%BC-%EC%9A%B4%EC%9A%A9%ED%95%98%EA%B8%B0-feat-gogs-1-2/

https://kimcblog.com/2018/08/28/%ec%8b%9c%eb%86%80%eb%a1%9c%ec%a7%80synology-nas%ec%97%90-github%ec%b2%98%eb%9f%bc-%ec%9a%b4%ec%9a%a9%ed%95%98%ea%b8%b0-feat-gogs-2-2/


* 패키지 다운로드
https://gogs.io/docs/installation/install_from_binary
- gogs_0.11.86_linux_armv5를 풀어서 1_create_package 안에다 넣는다.

- 인증서에 git.주소 추가후, 역방향프록시 설정.

- 시놀로지에서 데몬 사용자 계정은 무조건 root 이다.


* 파일업로드 제한 풀기
https://dymaxionkim.github.io/beautiful-jekyll/2017-02-06-GOGS/

시놀로지 경로는 /volumeX/@appstore/Gogs/gogs/custom/conf/app.ini


* Windows에서의 git 테스트를 위한 bash 설치
- 프로그램 및 기능 -> windows 기능 켜기/끄기 -> Linux용 Windows 하위 시스템 설치 -> window store에서 win10용 ubuntu 설치.

- 각 폴더에서 바로 실행하기 위해 https://github.com/mintty/wsltty/releases 설치.


* 설치하고나서 알게된 문제
- gogs는 시놀로지에서 root 계정으로밖에 설치할수 없다

- 시놀로지는 DSM 6.0이후로 root의 ssh접속을 금한다

- gogs의 ssh 주소는 루트를 기준으로 만들어지는데 시놀로지에서 유저계정을 만들어서 ssh에 접속해도 결국 루트에 액세스할수 없어 ssh를 사용할 수가 없다. 할수없이 https 주소를 써야한다.

- xcode에서는 gogs의 remote주소를 https://도메인:포트/git주소 로 설정한뒤 로그인하는 방식으로는 인증에 실패한다. https://계정:패스워드@도메인:포트/git주소 로 설정하면 인증을 통과할 수 있다. 이때 계정은 @마크를 쓰는 이메일이 아닌 평문으로 해야 한다.
2019/02/08 00:54 2019/02/08 00:54
Posted
Filed under 음악감상실
2019/01/05 19:46 2019/01/05 19:46