Deno 서버기술

Deno

node의 창시자가 node가 쓰레기(좋게말하면 장난감)이라는 것을 알리기 위해 native TypeScript로 돌아가는 언어를 만들었다.

  • https://github.com/denoland/deno

웹프레임웤

  • https://github.com/oakserver/oak
  • https://github.com/keroxp/servest
  • https://github.com/drashland/deno-drash
  • https://github.com/zhmushan/abc
  • https://github.com/sholladay/pogo

참고

  • https://dev.to/craigmorten/what-is-the-best-deno-web-framework-2k69

파이썬 서버기술

파이썬으로 제대로된 서버개발을 한 적은 없어서 몇 가지 조사하다가 발견한것들

WebFramework

  • Django
  • Flask
  • Bottle https://bottlepy.org/docs/dev/
  • Pylons
  • Pyramit https://trypyramid.com/
  • Falcon
  • Eve https://github.com/pyeve/eve
  • CherryPy
  • FastAPI https://github.com/tiangolo/fastapi
    https://towardsdatascience.com/why-we-switched-from-flask-to-fastapi-for-production-machine-learning-765aab9b3679
  • https://github.com/juancarlospaco/faster-than-requests

엄청많다

ORM

  • SqlAlchemy
  • https://github.com/python-gino/gino
  • PonyORM
    https://ponyorm.org/
  • DjangoORM

SQL

  • PyPika
    https://pypika.readthedocs.io/en/latest/
  • https://github.com/tmuzzin/PythonSQLGenerator
  • https://github.com/hhyo/mybatis-mapper2sql
  • PyDAL
    https://github.com/web2py/pydal

비동기 기술

  • celery
  • faust
  • async
  • PyKafka
    https://pykafka.readthedocs.io/en/latest/
  • kafka-python
    https://github.com/dpkp/kafka-python
  • Winton Kafka Streams
    https://github.com/wintoncode/winton-kafka-streams

개발환경

  • anaconda
  • miniconda
  • virtualenv
    https://virtualenv.pypa.io/en/latest/
  • virtualenv wrapper
    https://virtualenvwrapper.readthedocs.io/en/latest/
  • pew
    https://github.com/berdario/pew
  • tox
    https://tox.readthedocs.io/en/latest/
  • nox
    https://nox.thea.codes/en/stable/
  • pipenv
    https://pipenv.pypa.io/en/latest/advanced/
    package.json처럼 실행환경을 지정할 수 있게 하는게 낫지 않을까? 커스텀 환경을 사용하려면 sh를 별도로 만드는게 나을 것 같다.
  • poetry
    https://python-poetry.org/docs/

실행환경

  • Gunicorn
  • uWSGI
  • Uvicorn(ASGI)
    https://www.uvicorn.org
  • supervisord
    http://supervisord.org/
  • honcho
    https://github.com/nickstenning/honcho
  • forever
  • pm2
  • unicorn

배포환경

  • zappa – aws lambda (반푼이)
  • serverless – aws lambda
  • https://github.com/GoogleCloudPlatform/functions-framework-python
  • https://github.com/tiangolo/uwsgi-nginx-flask-docker
  • https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker

기타 참고

  • https://dev.to/sm0ke/flask-dashboard-simple-open-source-starters-4noc

Ubuntu – Crontab – Exec format error

우분투 로그인하니까 you’ve got mail..
또 무슨 오류가?

cat /var/mail/root

........
........
..........
run-parts: failed to exec /etc/cron.hourly/readweb: Exec format error
run-parts: /etc/cron.hourly/readweb exited with return code 1

써있는대로… 실행이 안되서 오류가 났다고 하는건데

readweb 스크립트는 curl을 이용해서 특정 웹페이지를 저장하는 역할을 한다

검색을 해 보니

 

http://askubuntu.com/questions/264607/bash-script-not-executing-from-crontab

원인은 cron에는 path를 잡아주지 않기 때문에 실행명령어를 full path로 적어주거나 path를 따로 잡아줘야함

해결책 :

/usr/bin/curl 처럼 full path로 쓰거나

PATH=/usr/bin

를 잡아줘야하는데…

 

그냥 명령어를 full path로 명시하는게 낫지 않을까

 

WIN2008-MSSQL2008 서버 원격접속 가능설정

주의 :  원격접속에 필요없는 설정을 추가했을 수 있음

 

서버 프로토콜 추가

시작 – sql server -> SQL Server Configuration Manager 실행

  • SQL Server Services 메뉴 -> SQL Server Browser 시작시 실행 설정
  • SQL Native Client 메뉴 -> Client Protocols -> TCP/IP, Named Pipes – Enabled
  • SQL Server Network Configuration -> Protocols for MSSQLSERVER  -> TCP/IP, Named Pipes – Enabled

 

방화벽 허용

TCP 1433, UDP 1434

 

사용자 추가

Microsoft SQL Server Management Studio 실행

Security – Logins 오른쪽클릭 -> New Login 해서 사용자 추가

 

 

Ubuntu GPT disk 등록하기

파티션 만들기
2T이상은 gpt로 만들어야된다. fdisk로 안된다는 얘기… 설치할 때 한번에 하는게 편하지만 하드를 중간에 추가할 경우에는 이 작업이 필요하다.

$ sudo fdisk -l
$ sudo parted /dev/sdb
(parted) mklabel gpt
(parted) unit TB
(parted) print
1번방법-
(parted) mkpart
name 알아서
filesystem 다시포멧할거니까그냥엔터 아니면 ext4
start 0
end 위에서 print할 때 봤던거 하드끝까지 3.0TB
2번방법-
(parted) mkpart primary 0 0
3번방법-
(parted) mkpart primary 0.00TB 3.00TB
위에1,2,3번방법 아무거나 맘에드는대로 해주면되고
(parted) quit

파일시스템만들기 – 포멧
mkfs –type ext4 /dev/sdXY

마운트하기
$ sudo mkdir /data
$ sudo mount /dev/sdb1 /data
이렇게 하면 부팅할 때 마다 다시 등록해줘야한다.

영구적으로 마운트하기위해서 fstab 등록하기

$ sudo blkid
uuid확인
붙여넣기를 해야되니 ssh로 접속하는게 좋다
/etc/fstab에 위의 정보들을 보고 따라 잘 등록

UUID=39489af1-0f3z-7777c-djen-69a03jf93afd0 /data ext4 errors=remount-ro 0 1
UUID는 blkid했을 때 나온 주소
/data는 파일 마운트 경로
파일시스템타입ext4

$ sudo mount -a
전체 마운트 재등록하라는 뜻. 설정이 제대로 됏다면 오류없이 완료.

끝. 재부팅해본다.
제대로 등록되지 않았다면 컴퓨터가 안 켜질거다. 그렇다면 재설치

GIT 서버 따로 쓰려면

GIT관리 웹서비스가 gitblit,  gitolite,  gitosis 등이 있는데…

gitblit이 그나마 좀 나은데

근데 다 아주 좋지는 않다.

요즘은 네이버에서 yobi라고 나왔는데 권한관리나 보안설정이 잘 되어있는지 모르겠다

이슈트래커는 별도로 쓰고 소스리포지터리는 별도로 생성하는게 나을 것 같다.

 

redmine을 쓴다면 프로젝트 생성부분에 git 리포지터리 생성 정도만 추가하면 되지 않을까?

git 서버는 별도로 생성하고

http://tutorial.polypia.net/index.php/Ubuntu:git_server