티스토리 뷰
루트에서
1.
systemctl enable postgresql-11
systemctl start postgresql-11
기동시키고...
2. 계정생성
su - postgres 사용자전환후
psql 입력
2.1 create database django_test
2.2 create user test_user with password 'test_user';
2.3 ALTER ROLE test_user SET client_encoding TO 'utf8';
2.4 ALTER ROLE test_user SET default_transaction_isolation TO 'read committed';
2.5 ALTER ROLE test_user SET TIME ZONE 'Asia/Seoul';
2.6 GRANT ALL PRIVILEGES ON DATABASE django_test To test_user;
3. phtyon3 manage.py migrate 하면 아래와 같이 오류 발생django.db.utils.OperationalError: FATAL: Ident authentication failed for user "test_user"
4. /var/lib/pgsql/11/data/pg_hba.conf 파일내용변경
127.0.0.1/32 쪽 md5로 변경.
5. 재기동
-bash-4.2$ pg_ctl restart
(-bash-4.2$ pg_ctl reload)
6.phtyon3 manage.py migrate
7. root# python3 manage.py runserver
'컴퓨타 > 연습공부' 카테고리의 다른 글
centos httpd 웹서버 설치 (0) | 2022.02.24 |
---|---|
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2' (0) | 2022.02.12 |
wsl, centos, postgresql 설치 (0) | 2022.02.12 |
wsl- 윈도우에서 리눅스 파일 열기 (0) | 2022.02.11 |
centos에 파이썬 & 장고설치 (0) | 2022.02.11 |