파일은 남겨두고 파일 내용만 지우고자 할 때. 


cat /dev/null > 해당파일

'Linux > Ubuntu' 카테고리의 다른 글

aptana 연동시 SFTP 설정.  (0) 2017.05.12
Node.js npm install 시 자꾸 Kill을 뱉을때  (0) 2017.03.29
[Ubuntu] Nohub의 사용  (0) 2017.03.11
[Ubuntu] Ubuntu 서버 14.04 초기설정 가이드  (0) 2016.11.23
Posted by C마노
,

1. sudo apt-get update

2. sudo apt-get upgrade

3. sudo apt-get install python3-pip python3-dev nginx


4. 가상환경을 원하는 위치 생성


5. 가상환경 active


6. pip install uwsgi flask


7. 프로젝트 붙혀넣고 그 폴더안에

flaskapp.ini 만들고


--아래를 넣는다--

[uwsgi]

module = main:app


master=true

processes=5


socket = flaskapp.sock

chmod-socket = 666

vacuum= true


die-on-term=true


8. vi /etc/nginx/sites-available/flaskapp


[source]


[Unit]

Description=uWSGI instance to serve flaskapp

After=network.target


[Service]

User=root

Group=root

WorkingDirectory=/solution/flask

Environment="PATH=/solution/venv/bin"

ExecStart=/solution/venv/bin/uwsgi --ini flaskapp.ini


[Install]

WantedBy=multi-user.target


9. sudo ln -s /etc/nginx/sites-available/flaskapp /etc/nginx/sites-enabled


10. 문법체크.  sudo nginx -t


11. sudo systemctl restart nginx 또는 service nginx restart


12 .sudo systemctl restart flaskapp 또는 service flaskapp restart

'Python' 카테고리의 다른 글

파이썬 epochTime을 원하는 포멧의 Date로  (0) 2017.06.22
Pycharm 에서 무조건 세팅해줘야 할것.  (0) 2017.05.18
[Python] YAPF  (0) 2017.03.11
[Python] python getter setter  (0) 2017.02.16
[Python] 공부해야 할 것.  (0) 2017.02.15
Posted by C마노
,
  1. On remote server edit sshd_config:

    nano /etc/ssh/sshd_config

  2. Add the following line :

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,blowfish-cbc,aes128-cbc,3des-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc

KexAlgorithms=curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

  1. Restart ssh service

#/etc/init.d/ssh restart

Posted by C마노
,