티스토리 뷰
1. 파이썬 3.6 설치
- yum install python36-devel
1-1. yum install gcc
2. 아파치 설치
- yum install httpd24
- sudo yum install httpd24-devel
3. 파이썬3.6가 default로 잡히도록 심볼릭 링크 설정
- sudo ln -fs /usr/bin/python3 /usr/bin/python
4.pip3 설치
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- python get-pip.py
5. django 설치
- pip3 install django
6. mod_wsgi 설치
- pip3 install mod_wsgi
7. django mod_wsgi 연동
- vi /etc/httpd/conf.d/django.conf
LoadModule wsgi_module /usr/local/lib64/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so
<VirtualHost *:80>
Alias /static/ /var/www/html/프로젝트명/static/
<Directory /var/www/html/프로젝트명/static>
Order deny,allow
Allow from all
</Directory>
WSGIScriptAlias / /var/www/html/프로젝트명/프로젝트명/wsgi.py
<Directory /var/www/html/프로젝트명/프로젝트명>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
</VirtualHost>
8. apache 실행
- httpd -k start
9. django admin page 접속
- http://ip/admin
10. django admin css가 깨져서 나오는데 수정
static 폴더 생성
- mkdir /var/www/html/프로젝트명/static
setting.py 에 static_root 설정하기
- vi /var/www/html/프로젝트명/프로젝트명/setting.py
- ALLOWED_HOSTS 하단에 STATIC_ROOT 추가
STATIC_ROOT = '/var/www/html/프로젝트명/static/'
11. collectstatic 실행
- cd /var/www/html/프로젝트명
- python manage.py collectstatic
를 입력하면 된다.
12. 아파치 재실행
- httpd -k restart
13. django admin page 접속하여 css 확인.
14. django 관리자 생성
- python manage.py createsuperuser
'IT > 프로그래밍' 카테고리의 다른 글
[iOS] Firebase dev Product 환경 분리하기 (0) | 2023.05.15 |
---|---|
[Flutter] Firebase App Check Web Local에서 테스트하기 (0) | 2023.04.07 |
[Flutter] ios 시뮬레이터에서 firebase_app_check 사용방법 (0) | 2023.04.07 |
[Flutter] firebase_app_check reCAPTCHA v3 key 만들기 (0) | 2023.04.06 |
[Flutter] Firebase Appcheck 설치방법 (0) | 2023.04.06 |
- Total
- Today
- Yesterday
- 수경재배키트
- 리눅스 python3 설치
- MySQL
- CDN: trunk URL couldn't be downloaded
- 아이폰
- Xcode
- PlatformException(sign_in_failed
- Firebase
- Response: Failure when receiving data from the peer
- flutter build ipa
- Error (Xcode): Target release_unpack_ios failed: Exception: Binary
- ios
- 슬랙으로 보내기
- NSPrivacyAccessedAPICategoryUserDefaults
- aws python3.12
- ios 앱 심사상태
- com.google.android.gms.common.api.ApiException: 10:
- 해결방법
- but linking in object file
- ITMS-91053: Missing API declaration
- Flutter
- python3.12 설치
- NSPrivacyAccessedAPICategoryFileTimestamp
- google play appcheck
- Failed to launch iOS Simulator: Error: Emulator didn't connect within 60 seconds
- NSPrivacyAccessedAPICategoryDiskSpace
- ios pod install error
- 베란다 수경재배
- EC2
- NSPrivacyAccessedAPICategorySystemBootTime
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |