https://wouldyou.tistory.com/36

CentOS PostgreSQL data directory 변경

 

1. 설치된 PostgreSQL 서비스 중지
2. 데이터 디렉토리를 새 위치로 이동하거나 복사
3. postgresql.conf 파일에서 data_directory 설정을 새 경로로 변경
4. 서비스 시작 스크립트 또는 명령을 수정하여 새 postgresql.conf 파일의 위치 반영
5. PostgreSQL 서비스 재시작

# 서비스 중지
sudo systemctl stop postgresql-14

# 데이터 디렉토리 이동
sudo mv /var/lib/pgsql/14/data 이동할 경로

# postgresql.conf 수정
sudo nano 이동한 경로/postgresql.conf

#data_directory = '이동한 경로' 로 변경

참고) 설치시 기본 경로 : ConfigDir

# 서비스 시작 스크립트 수정
sudo nano /usr/lib/systemd/system/postgresql-14.service

Environment=PGDATA=/home/mlu/postgres-data 로 변경

참고) 설치시 기본 경로 : /var/lib/pgsql/14/data/

# 서비스 재시작
sudo systemctl start postgresql-14

참조
https://dba.stackexchange.com/questions/197809/changing-data-directory-for-postgres-on-centos

 

Changing data directory for postgres on CentOS

I've got a postgres 9.2.18 installation on CentOS which used the standard installation path. Now I realised that on this particular partition, there isn't sufficient hard-disk space for some bigger

dba.stackexchange.com

 

https://stackoverflow.com/questions/22596301/how-to-change-postgresql-data-directory\

 

how to change PostgreSQL data directory?

I am having a problem changing the data directory on postgresql 9.2 on windows7: i`m trying to change my data directory: how can i change data directory on postgreSQL with pgAdmin?

stackoverflow.com

 

https://stackoverflow.com/questions/64124528/still-located-to-default-data-directory-postgresql-even-ive-changed

 

still located to default data directory postgreSQL even i've changed

I've fresh install postgreSQL on my centOs7 server and want to changed my default postgresql data directory to /opt/postgres on my server. and this what i have done : # chown postgres:postgres /opt/

stackoverflow.com

 

'개발 > PostgreSQL' 카테고리의 다른 글

CentOS에 PostgreSQL 14.5 설치  (0) 2023.07.05
[PostgreSQL] 배열 FOR LOOP  (0) 2023.01.04
PostgreSQL increment 초기화  (0) 2022.08.12

CentOS에 PostgreSQL 14.5 설치

# 저장소 추가
sudo yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

# 패키지 설치
sudo yum install postgresql14-server postgresql14-contrib

# 데이터베이스 초기화
sudo /usr/pgsql-14/bin/postgresql-14-setup initdb

# 서비스 시작 및 활성화
sudo systemctl start postgresql-14
sudo systemctl enable postgresql-14

# postgres 사용자로 전환 및 셸 접속
sudo -i -u postgres
psql

참조
https://www.postgresql.org/download/linux/redhat/

 

PostgreSQL: Linux downloads (Red Hat family)

Linux downloads (Red Hat family) The Red Hat family of distributions includes: Red Hat Enterprise Linux Rocky Linux CentOS (7 and 6 only) Fedora Oracle Linux and others. PostgreSQL is available on these platforms by default. However, each version of the pl

www.postgresql.org

 

https://computingforgeeks.com/how-to-install-postgresql-14-centos-rhel-7/

 

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-centos-7

 

How To Install and Use PostgreSQL on CentOS 7 | DigitalOcean

 

www.digitalocean.com

 

https://docs.3rdeyesys.com/database/ncloud-database-postgresql-install-connect-guide-centos.html

 

설치형 PostgreSQL DB 설치, 접속 가이드 CentOS

Ncloud VPC환경에서 CentOS 서버에 설치형 PostgreSQL DB를 설치하고, 접속하는 방법입니다.

docs.3rdeyesys.com

 

'개발 > PostgreSQL' 카테고리의 다른 글

CentOS PostgreSQL data directory 변경  (0) 2023.07.05
[PostgreSQL] 배열 FOR LOOP  (0) 2023.01.04
PostgreSQL increment 초기화  (0) 2022.08.12

JDK 설치

https://leeyebin.tistory.com/119

 

[네이버 클라우드 플랫폼]centos에서 Java설치 및 설정하기

작성한 글은 리눅스 centos 환경에서 Java를 설치하는 방법을 정리해 놓은 것이다. 네이버 클라우드 플랫폼의 micro서버에서는 java가 설치 되어 있지 않아 설치해야한다. AWS의 EC2는 자바가 설치되어

leeyebin.tistory.com

 

[CentOS] CentOS에 Tomcat 8 설치

https://velog.io/@qudalsrnt3x/CentOS-Tomcat-8-%EC%84%A4%EC%B9%98

 

[CentOS] CentOS에 Tomcat 8 설치

CentOS Tomcat 8 설치

velog.io

 

Tomcat 설치

https://mollangpiu.tistory.com/181

 

[CentOS] 톰켓 설치하기

이번 시간에는 CentsOS에 톰켓을 설치하는 시간을 갖도록 하겠습니다. CentOS 톰켓 설치하기 톰켓을 설치하기 위해서는 기본적으로 java의 설치가 필수적 입니다. mollangpiu.tistory.com/170 [리눅스] JAVA 설

mollangpiu.tistory.com

 

Tomcat 여러개 설치

https://mollangpiu.tistory.com/184

 

[CentOS] 클라우드 하나에서 여러개의 톰켓 사용하기

이번시간에는 여러개의 톰켓을 사용하는 방법에 대해 다루겠습니다. 클라우드 하나에서 여러개의 톰켓 사용하기 저번에는 만든 네이버 클라우드 하나로 프로젝트 하나를 실행하는 방법에 대해

mollangpiu.tistory.com

 

[Linux] Tomcat 설치 & 환경변수 설정

https://it-serial.tistory.com/entry/Linux-Apache-Tomcat-JSP-OracleDB-%EC%84%A4%EC%B9%98%EC%97%B0%EB%8F%99-%E2%91%A1

 

[Linux] Tomcat 설치 & 환경변수 설정 ②

※ JSP는 java언어를 이용한 웹 프로그래밍을 할 수 있는 언어입니다. jdk(java)와 tomcat(대표적인 jsp 웹서버)를 설치하여 환경변수까지 설정해주시면 자동으로 JSP 구동할 수 있는 설정이 완료됩니다.

it-serial.tistory.com

 

CentOS7에서 OpenJDK 1.8 설치 및 환경변수 설정 방법

https://yoursyun.tistory.com/entry/CentOS7%EC%97%90%EC%84%9C-OpenJDK-18-%EC%84%A4%EC%B9%98-%EB%B0%8F-%ED%99%98%EA%B2%BD%EB%B3%80%EC%88%98-%EC%84%A4%EC%A0%95-%EB%B0%A9%EB%B2%95

 

CentOS7에서 OpenJDK 1.8 설치 및 환경변수 설정 방법

설치 [root@localhost /]# yum install java-1.8.0-openjdk JAVA 설치 경로는 아래를 통해 확인 할 수 있다. 명령어 위치 검색 [root@localhost /]# which java /usr/bin/java 위에서 검색된 심볼릭 링크를 따라 최종의 파일을

yoursyun.tistory.com

 

CentOS 환경변수 설정

https://songsunbi.tistory.com/2

 

centos 환경변수 설정

컴퓨터의 어떤 경로에서도 접근할 수 있도록 하기 위해 환경변수를 설정합니다. 터미널을 열고 vi /etc/profile을 입력합니다. 입력하면 환경변수 편집 창으로 이동합니다. a를 누르면 insert 모드로

songsunbi.tistory.com

 

[Apache 설치]

https://momentoo.tistory.com/13

 

[Apache 설치]

1. yum 초기화 ※ yum repository를 초기화 진행합니다. ( yum이 정상적으로 진행된다면 스킵해도 됩니다. ) > 참고 포스팅 : https://momentoo.tistory.com/12 [Yum Repository 초기화] Q. Yum Repository 초기화 필요성 - Cen

momentoo.tistory.com

 

CentOS 7 firewall 방화벽 사용 방법

https://devbrain.tistory.com/43

 

CentOS 7 firewall 방화벽 사용 방법

# 상태보기 firewall-cmd --state # 등록목록 확인 firewall-cmd --zone=public --list-all # 특정 포트 방화벽 추가 firewall-cmd --permanent --zone=public --add-port=8080/tcp # 특정 포트 대역 방화벽 추가 firewall-cmd --permanent --z

devbrain.tistory.com

 

리눅스 CentOS7 서버 세팅 정리 (아파치 톰캣)
https://jonny-cho.github.io/server/2018/12/31/server-serversetting/

 

리눅스 CentOS7 서버 세팅 정리 (아파치 톰캣) · 개발의숲

리눅스 CentOS7 서버 세팅 정리 (아파치 톰캣) 31 Dec 2018 | server 순서 CentOS 설치 톰캣 설치 JDK 설치 환경변수 설정 톰캣 실행 및 테스트 서비스 등록 서비스 관리 CentOS 설치 USB 만들기 CentOS usb 부팅 BIO

jonny-cho.github.io

 

https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=ssuyastory&logNo=220404777064 

 

리눅스 tomcat 다중 서비스 사용하기.

리눅스 tomcat 다중 서비스에 대해서 알아 보겠습니다. 상황 : 리눅스 서버에 톰캣을 3개를 띄워서 관리자,...

blog.naver.com

Cent

dS7에서 OpenJDK 1.8 설치 및 환경변수 설정 방법asdf

https://ws-pace.tistory.com/82

 

spring boot REST API Web 프로젝트 (9-1) - 스프링 시큐리티 & Json Web Token을 이용해 인증, 인가, 권한 부여

스프링 부트 REST API WEB 프로젝트 깃헙 링크 https://github.com/choiwoonsik/springboot_RestApi_App_Project/tree/main/restApiSpringBootApp 수행 목록 환경구성 및 helloworld 출력 H2 DB 연동 Swagger API 문서 연동 REST API 설계 Re

ws-pace.tistory.com

 

https://colabear754.tistory.com/171

 

[Spring Security] Spring Security와 JWT를 사용하여 사용자 인증 구현하기(Spring Boot 3.0.0 이상)

목차 시작하기 전에 글을 작성한 계기 예전에 REST API만 제공하는 백엔드 프로젝트를 진행하는 과정에서 API 사용 권한을 제한하기 위해 스프링 시큐리티와 JWT를 사용한 적이 있다. 이 때는 스프

colabear754.tistory.com

 

'개발 > JAVA' 카테고리의 다른 글

기본 Java 타입과 DB 필드 매핑  (0) 2023.01.06

https://technet.tmaxsoft.com/upload/download/online/jeus/pver-20140827-000001/ejb/appendix_mapping_javatype_to_dbfield.html

DO $$
DECLARE
    v_arr_charge_hour int[]:= array[1,2,3,4,5,6,7,8,9];
    v_arr_val int[];
    v_i int:=1;
    v_max int:=array_length(v_arr_charge_hour, 1);
BEGIN
    FOR v_i IN 1..v_max--SELECT v_arr_charge_hour
    LOOP
        RAISE NOTICE '%', (v_arr_charge_hour[v_i]);
    END LOOP;
END$$;

'개발 > PostgreSQL' 카테고리의 다른 글

CentOS PostgreSQL data directory 변경  (0) 2023.07.05
CentOS에 PostgreSQL 14.5 설치  (0) 2023.07.05
PostgreSQL increment 초기화  (0) 2022.08.12

Reset auto increment counter in postgres

 

최초값으로 초기화

TRUNCATE TABLE <테이블명> RESTART IDENTITY;

- 실행하니까 테이블 데이터도 모두 삭제 됨

 

시작값 지정

ALTER TABLE <테이블명>
    ALTER COLUMN <자동증가 컬럼명> RESTART SET START <시작 번호>;



'개발 > PostgreSQL' 카테고리의 다른 글

CentOS PostgreSQL data directory 변경  (0) 2023.07.05
CentOS에 PostgreSQL 14.5 설치  (0) 2023.07.05
[PostgreSQL] 배열 FOR LOOP  (0) 2023.01.04

IIS에 ASP.NET Core 앱 게시 | Microsoft Docs

http://craftpip.github.io/jquery-confirm/

+ Recent posts