본문 바로가기

JAVA 공부/Server20

[CentOs7/Putty] nginx에서 톰캣으로 프록시, 8080제거(파일명변경) 당연하게도 sudo vim 을 써서 수정해야함 /etc/nginx/conf.d/vhost.conf server { server_name test.com; set $proxyHost test.com; include /etc/nginx/conf.d/tomcat-proxy.conf.include; server { server_name test.com; #사실 서버이름은 아무거나 해도 상관이 읍다... 변수명만 중여할분 set $proxyHost test.com; #$proxyHost는 변수명이다. include /etc/nginx/conf.d/tomcat-proxy.conf.include; } server_name 내부 8080을 set으로 토스하는것. /etc/nginx/conf.d/tomcat-proxy... 2020. 9. 15.
[CentOs7/PuTTy] MariaDB 마스터계정설정 mysql -u root -p grant all privileges on st_n26_blog.* to `planLocal`@'localhost' identified by 'sbs123414'; 생성된 계정 확인하는 방법 select user from mysql.user; 계정삭제 drop user '계정'@'%'; 2020. 9. 15.
[CentOs7/PuTTy]레디스 설치 서버에 레디스 설치 파일 올릴시 실행된 프로그램이 전부 초기화 되기때문에 그걸 방지 하기 위해 redis를 설치한다. 예를 들어 로그인되어있는데 프로그램의 약간의 수정한 뒤 cmd로 mvnw.cmd tomcat7:redeploy 올리게 되면 실행되었던 프로젝트가 초기화 되서 처음으로 돌아가게 된다. sudo systemctl start redis 레디스 실행(실행만되는 것이고, 자동실행은 아님 멈추는건 당연히 stop) sudo systemctl enable redis 레디스 자동실행. 반대는 disable pom.xml 에 아래코드를 추가해야 실행이 가능 org.springframework.boot spring-boot-starter-data-redis org.springframework.session.. 2020. 9. 14.
[Maven] 메이븐 원격 배포하기 pom.xml 에서 org.apache.tomcat.maven tomcat7-maven-plugin 2.2 http://life.rud.kr:8080/manager/text st_life_rud_kr__manager_text org.springframework.boot spring-boot-maven-plugin JAVA_HOME 환경변수가 이미 존재해야 함(윈도우 환경변수 설정하기) 윈도우 키 + CMD cd C:\work\sts-4.4.0.RELEASE-workspace\at mvnw.cmd tomcat7:redeploy mvnw.cmd tomcat7:redeploy 해당 프로젝트 cmd에 위 명령어 입력시 따로 FTP 올릴 필요없이 재등록,실행된다. 허나 레디스가 안깔려있으면 새로고침 됨으로, 실행.. 2020. 9. 14.
[CentOS7/PuTTy] su 설정으로 tomcat 폴더 안으로 들어가기 ru => root 모드 cd => 폴더들어가기 cd /opt/tomcat/apache-tomcat-9.0.37/ (tomcat 부터는 텝키로 자동으로 설정됨) 2020. 9. 14.
[CentOS7/Putty] tomcat 가상호스팅 설정(고속검색updatedb) sudo updatedb 최적화 되서 검색할수 있게 하는 것(새벽4시쯔음 자동으로 업데이트) 업데이트 이전에 올려진 파일만 검색이 가능함으로, 파일 추가 시 업데이트db를 한번씩 해줘야한다. sudo locate user를 검색 |(파이프) fgrep tomcat 하면 두개다 포함된 파일을 검색한다 sudo locate user | fgrep tomcat | fgrep xml user와 tomcat 과 xml이 포함된 파일을 검색한다. tomcat-users.xml 은 톰캣의 웹관리자설정이다. sudo vim /opt/tomcat/latest/webapps/manager/META-INF/context.xml 들어간다 2020. 9. 10.