전체 글

디렉토리 생성 mkdir [디렉토리명] mkdir -p [디렉토리명/파일명] 디렉토리 삭제 rmdir [디렉토리명] rm -r [디렉토리명] rm -rf [디렉토리명] f 옵션을 추가하면 삭제할 건지 묻지도 않구 삭제함 rm -rf * 현재 디렉토리에 속한 모든 파일과 디렉토리 삭제 파일 생성 touch [파일명] cat > [파일명] vi [파일명] 파일 삭제 rm [파일명].txt rm *.txt 확장자가 txt 인 모든 파일 삭제, 각 파일에 대해 삭제할 건지 물어봄 rm * 현재 디렉토리에 있는 모든 파일 삭제, 디렉토리가 있다면 삭제할 수 없다는 메세지 나옴 rm -f [파일명].txt -f 옵션을 붙이면 삭제할 건지 다시 묻지 않고 바로 삭제됨 rm -f * 현재 디렉토리에 있는 모든 파일 바..
Nginx은 무료 오픈 소스 웹서버 소프트 웨어가벼움과 높은 성능 목표로 웹서버, 리버스 프록시, 메일 프록시 등의 기능 가지고 있음 1. 일단 설치부터 (django_site) ubuntu@ip-172-31-11-144:~$ sudo apt-get install nginx 1-1. 버전도 확인 (django_site) ubuntu@ip-172-31-11-144:~$ nginx -v nginx version: nginx/1.18.0 (Ubuntu) 설치하면 나면 [ 출처 ] https://leffept.tistory.com/283?category=950490 [Django]Django + Nginx + Gunicorn 연동하기 2 지난번 시간에 Django + Gunicorn 을 연동하였으니 이제는 Ng..
gunicorn은 WSGI(Web Server Gateway Interface) 서버 WSGI란 python으로 작성된 웹 어플리케이션과 python으로 작성된 서버 사이의 약속된 인터페이스 또는 규칙 개발이 아니라 서버에 필요한 도구라 로컬 환경에 설치할 필요 없당 그래서 1. 서버 환경에 gunicon 설치 ! (django_site) ubuntu@ip-172-31-11-144:~/django_site$ pip install gunicorn Collecting gunicorn Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB) |████████████████████████████████| 79 kB 7.7 MB/s Requirement already sati..
https://kitle.xyz/post/58/ (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", "credits" or "license" for more information. (InteractiveConsole) >>> >>> >>> from django.contrib.auth.models import User >>> superusers = User.objects.filter(is_superuser=True) >>> superusers >>> Keyboar..
1. mysql 설치 (django_site) ubuntu@ip-172-31-11-144:~/django_site$ sudo apt-get install mysql-server 그럼 주르륵 설치 2. mysql 실행 / mysql 접속 -> 비밀번호 입력 (django_site) ubuntu@ip-172-31-11-144:~/django_site$ sudo systemctl start mysql (django_site) ubuntu@ip-172-31-11-144:~/django_site$ sudo /usr/bin/mysql -u root -p Enter password: 2-1. 사용자 정보 확인 -> 사용할 계정 만들기 -> 다시 사용자 정보 확인하기 #사용자 정보 확인 mysql> SELECT Use..
(오류 발생) ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? 에러 메세지를 확인하니 장고 가져올 수 없다, 가상환경 활성화 되어있냐 라는 뜻인디 , , pip list를 통해 django가 깔려 있는지 확인 해보니 없었당 가상 환경을 만든 후 django 를 install 안했나봄 pip install django 해서 django 설치 설치 후 (django_site) ubuntu@ip-172-31-11-144:~/django_site$ python..
새로운 가상환경 만들기 conda create -n {envname} (base) [sonic@rna2 ~]$ conda create -n sjpy3 python=3.6 \ 가상환경 목록 확인하기 conda env list conda info -> 현재 활성화된 가상환경에 대한 더 자세한 내용을 볼 경우 가상환경으로 들어가기 source activate {envname} (ubunsu) conda activate {envname} 가상환경으로부터 나오기 source deactivate (ubunsu) conda deactivate 필요없는 가상환경 삭제하기 conda remove --name {envname} (base) [sonic@rna2 ~]$ conda remove --name sjpy3 --al..
print(blue)