ALL

FrameWork/Django
목차 1. 가상환경 만들기 2. 가상환경 requirements.txt 1. 가상환경 만들기 2. 가상환경 requirements.txt requirements.txt 만드는 명령어 -> pip freeze > requirements.txt requirements.txt 에 적힌 버전으로 패키지 설치하는 명령어 -> pip install -r requirements.txt
자주 쓰는 명령어 sudo systemctl restart vsftpd sudo systemctl status vsftpd 1. mysql - mysql 설치 (mydjango) ubuntu@ip-172-31-41-115:~/mydjango$ sudo apt-get install mysql-server 참고 - > https://print-blue.tistory.com/6?category=1042478 / https://print-blue.tistory.com/21 - 슈퍼 유저, 테이블 생성완료 Database changed mysql> SELECT User, Host, plugin FROM mysql.user; +------------------+-----------+------------------..
- 서버 시간 설정 ubuntu@ip-172-31-41-115:~$ date Tue May 17 04:25:14 UTC 2022 ubuntu@ip-172-31-41-115:~$ sudo ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime ubuntu@ip-172-31-41-115:~$ date Tue May 17 13:25:23 KST 2022 - 파이썬 설치 확인 ubuntu@ip-172-31-41-115:~$ python Command 'python' not found, did you mean: command 'python3' from deb python3 command 'python' from deb python-is-python3 ubuntu@ip-172..
- 인스턴스 만들기 1. ssh -i pem 으로 우분투 진입 ! > ssh -i [ key이름 ].pem ubuntu@[ ip주소 ] > chmod 400 [ key이름 ].pem .pem 파일의 권한이 too much하다는 뜻으로 chmod 명령을 사용하여 권한을 400으로 수정해주깅 (base) jhj💭  ~/desktop  ssh -i djangokey.pem ubuntu@13.209.73.49 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permis..
- mysql 접속 -> 소켓 오류 (django_site) ubuntu@ip-172-31-11-144:~$ sudo mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - mysql 실행 -> 제어 프로세스가 오류 코드와 함께 종료되었기 때문에 mysql.service에 대한 작업이 실패 (django_site) ubuntu@ip-172-31-11-144:~/django_site$ sudo systemctl start mysql Job for mysql.service failed because the contr..
1. 계정 있는지 확인해보기 manage.py이 있는 디렉토리로 가기 (django_site) ubuntu@ip-172-31-11-144:~$ cd django_site (django_site) ubuntu@ip-172-31-11-144:~/django_site$ ls bootstrap-4.6.1-dist common config db.json manage.py mysite pybo requirements.txt (django_site) ubuntu@ip-172-31-11-144:~/django_site$ python manage.py shell Python 3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0] on linux Type "help", "copyright"..
1. 지유니콘 실행 (django_site) ubuntu@ip-172-31-11-144:~/django_site$ gunicorn --bind 0:8000 config.wsgi:application [2022-05-11 08:58:16 +0000] [57139] [INFO] Starting gunicorn 20.1.0 [2022-05-11 08:58:16 +0000] [57139] [INFO] Listening at: http://0.0.0.0:8000 (57139) [2022-05-11 08:58:16 +0000] [57139] [INFO] Using worker: sync [2022-05-11 08:58:16 +0000] [57140] [INFO] Booting worker with pid: 5714..
https://print-blue.tistory.com/13?category=1042476 502 불량 게이트웨이 서버와 싸워서 서로 대화하지 않습니다. 농담을 제외하고 프록시 또는 게이트웨이 역할을하는 동안 서버는 요청을 처리하는 동안 업스트림 서버로부터 적절한 응답을받지 못했습니다. (django_site) ubuntu@ip-172-31-11-144:/etc/nginx/sites-available$ sudo nano mysit 1. proxy_pass http://13.124.239.181:8000; 왜 . . 타임아웃일까 ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/syst..
print(blue)