IOS푸시 발송시 ssl관련 에러

-Djavax.net.debug=all
 매개 변수로 디버거를 연결하면 ssl핸드쉐이크 에러 확인 되고..

https://ko.1answer.info/737461636b6f766572666c6f772e636f6d-7a3435353631353535

http://cbsm.tistory.com/10

* 결론: 인증서를 커맨드로 다시 만들어보자

nginx basic auth 적용

#모듈 설치
yum install -y httpd-tools

#암호용 파일 최초 생성(이후에는 -c옵션을 실행하면 안됨)
htpasswd -c /etc/nginx/.htpasswd id입력
이후에 암호입력함

#생성 확인
cat /etc/nginx/.htpasswd

#nginx location에 아래 내용 추가
auth_basic "message enter";
auth_basic_user_file /etc/nginx/.htpasswd;


http://khaidoan.wikidot.com/amazon-ses

커스텀한 소스코드는 개인 VCS저장소에 보관 중

171009 기준 1.7.0 스냅샷버전

* 주기적으로 최신버전을 설치 후 글을 추가하고 있습니다. 블로그에서 pinpoint로 검색해서 가능하면 최신 버전을 설치하세요

유저홈/apps 디렉토리를 기준으로 설치 함

#디렉토리 생성
mkdir ~/apps && cd ~apps

#master(최신) 버전 다운로드 후 압축 해제
wget 'https://github.com/naver/pinpoint/archive/master.zip' && unzip master.zip && rm master.zip

# 심볼링 링크 처리
ln -s pinpoint-master pinpoint

#인스톨(JAVA 6,7,8 필요)
cd ~/apps/pinpoint && ./mvnw install -Dmaven.test.skip=true

#JAVA설치
#jdk 8설치

#jdk 7설치

#jdk6설치
cd ~/apps
chmod 755 jdk-6u45-linux-x64.bin && ./jdk-6u45-linux-x64.bin && rm jdk-6u45-linux-x64.bin

#환경변수 등록
vi ~/.bashrc 후에

export JAVA_HOME=~/apps/jdk
export JAVA_8_HOME=~/apps/jdk_8
export JAVA_6_HOME=~/apps/jdk_6
export JAVA_7_HOME=~/apps/jdk_7
export PATH=$JAVA_HOME/bin:$PATH


#참고 : JAVA DNS TTL Modify
echo 'networkaddress.cache.ttl=60' >> ~/apps/jdk/jre/lib/security/java.security



#참고 : OS 디스크외 AWS EBS를 추가로 마운트해서 데이터를 저장한다면 pinpoint data디렉토리 변경(/data에 EBS 마운트)
cd ~/apps/pinpoint/quickstart && ln -s /data/pinpoint data
sudo su
mkdir /data/pinpoint && chown 유저계정:유저계정 /data/pinpoint



Hbase 설치 및 시작
-- HBase 저장기간을 줄임(1일=86400초로 줄이는데 상황에 따라서 적당한 수치로 조정)
 vi ./quickstart/conf/hbase/init-hbase.txt 후 아래 입력
 :%s/5184000/86400/g

-- Hbase 다운로드 및 시작
quickstart/bin/start-hbase.sh

-- Hbase 테이블 초기화
quickstart/bin/init-hbase.sh



Pinpoint 데몬들 설정 후 시작

-- 컬렉터로그 레벨을 조정해서 적게 남기도록 함
vi ./quickstart/collector/src/main/resources/log4j.xml
:%s/DEBUG/INFO/g
:%s/TRACE/INFO/g

-- pinpoint 웹의 로그레벨 조정
vi ./quickstart/web/src/main/resources/log4j.xml
:%s/DEBUG/INFO/g

-- 컬렉터(데이터 수집 프로세스)  시작
quickstart/bin/start-collector.sh

-- 웹 UI 시작
quickstart/bin/start-web.sh


agent 수정(해당 agent가 실제 어플리케이션 시작시 사용됨)

agent 홈 경로 : ~/apps/pinpoint/agent/target/pinpoint-agent-버전

cd ~/apps/pinpoint/agent/target/pinpoint-agent-버전

-- agent 로그 조정( 미 조정시 DEBUG레벨로 로그가 남아서 대상 프로그램의 성능 하향이 발생)
vi lib/log4j.xml 후 아래 명령 수행(로그레벨 DEBUG를 INFO로 조정)
:%s/DEBUG/INFO/g

아래내용은 삭제
<appender-ref ref="console" />

-- Collector server의 IP 및 포트 수정


vi ./quickstart/agent/src/main/resources/pinpoint.config
cd ~/apps/pinpoint/agent/target/pinpoint-agent-1.7.0-SNAPSHOT && vi pinpoint.config

-- 어플리케이션 서버로 복사를 위해서 압축해둠
ex) tar -czf pinpoint-agent-1.7.0-SNAPSHOT_171023.tar.gz pinpoint-agent-1.7.0-SNAPSHOT




이후 APM으로 모니터링하고 싶은 서버에 Agent 복사 후 프로세스 실행시 agent 사용하도록 셋팅
 - 방법은 정리 예정이며 필요시 구글 검색하세요





import java.io.File;
import java.util.Collection;
import java.util.List;
import org.apache.commons.io.FileUtils;

/**
 * 특정 디렉토리 하위의, 특정 확장자 파일에 대한 처리
 *   - 2번째 줄에 trimDirectiveWhitespaces 처리를 위한 내용 추가
 * 
 * @author 엄승하
 */
public class JspAddTrimWhitespaceTag {
     public static void main(String[] args) throws Exception {
          //jsp파일을 찾기 시작할 디렉토리
          String startDirPath = "파일을 찾기 시작할 디렉토리 경로";
          //파일 확장자 지정
          String[] ext = {"jsp"};
          //해당 파일들을 찾아서 컬렉션에 담음(recursive)
          Collection<File> jspFileList = FileUtils.listFiles(new File(startDirPath), ext, true);
          System.out.println(String.format("총 %s개", jspFileList.size()));
          String addStr = "<%@ page trimDirectiveWhitespaces=\"true\" %>"; //파일에 추가할 내용 : JSTL의 html변경 후 남은 whitespace를 없애는 처리
          for (File jspFile : jspFileList) {
               //System.out.println(file.getAbsolutePath());
              List<String> fileContents = FileUtils.readLines(jspFile, "UTF-8");
              fileContents.add(1, addStr); //2번째줄에 추가할 문자를 컨텐츠 내용에 추가
              FileUtils.writeLines(jspFile, fileContents); //해당 파일에 쓰기
              fileContents = null; //빠른 GC처리
          }
          System.out.println("====  끝  ====");
     }
}

참고
 https://aws.amazon.com/ko/blogs/korea/introducing-git-credentials-a-simple-way-to-connect-to-aws-codecommit-repositories-using-a-static-user-name-and-password/

'성능테스트' 카테고리의 다른 글

nGrinder 설치방법 정리 - 3.4Ver  (0) 2017.05.10

 

웹에서 ERD 그릴수 있는 툴(무료)

 

  1. draw.io(링크)
    1. 요즘에 좀 많이 쓰는듯
  2. erdcloud(링크)
  3. dbdiragram.io(링크)

P.s

 - 다음에 웹용이 아니라 sqlyog + workbench 무료 버전을 이용해서 리버스 엔지니어링으로 erd 만드는 방법도 글을 작성해보겠습니다.

 - TOAD for Mysql(링크)

 

'DB > 기타' 카테고리의 다른 글

쿼리 최적화 가이드 해주는 사이트  (0) 2020.06.20


Step 1 - Add New Repository
yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
(대상 버전은 https://dev.mysql.com/downloads/repo/yum/ 에서 최신버전 확인 가능)


Step 2 - Install MySQL 5.7
yum -y install mysql-community-server


Step 3 - Start MySQL and Enable Start at Boot Time
systemctl start mysqld
systemctl enable mysqld

#부팅시 자동으로 시작되도록 설정되어 있는지 확인
systemctl is-enabled mysqld

#3306포트로 실행되어 있는지 확인
netstat -plntu


Step 4 - Configure the MySQL Root Password
MySQL 5.7 is installed and started. As you can see, the MySQL root password for Ubuntu has been configured during the installation process, so we do not need to configure or reset the password on Ubuntu. But this is not the case on CentOS.
On CentOS 7, MySQL will generate a strong default password when MySQL is started the first time, the default password is shown in the mysqld.log file. You can use the grep command below for showing the default MySQL password.
grep 'temporary' /var/log/mysqld.log

Connect to the MySQL shell with the default password. (로그 파일에서 root 계정의 임시 비밀번호 확인 후 접속)
mysql -u root -p
TYPE DEFAULT PASSWORD


Now replace the default password with a new and strong password, with the MySQL query below.

ALTER USER 'root'@'localhost' IDENTIFIED BY '신규암호';
flush privileges;


#추가설정
mysql> status
characterset 값이 latin1 인것을 확인할 수 있는데, 이런 characterset 등  몇가지는 기본적으로 바꾸는게 좋다

설정 참고(inno db 튜닝 등도 하면 좋지만 이 글에서는 pass)
# vi /etc/my.cnf  후 아래 내용 참고하여 필요 부분 변경 후 -> systemctl restart mysqld -> mysql 접속해서 status로 확인하면 변경됨을 확인할 수 있음

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

character-set-server=utf8
collation-server=utf8_general_ci
init_connect=SET collation_connection = utf8_general_ci
init_connect=SET NAMES utf8

character-set-client-handshake = FALSE
skip-character-set-client-handshake

[mysqldump]
default-character-set=utf8

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[client]
default-character-set = utf8

[mysql]
default-character-set=utf8





+ Recent posts