10 02 2021
서비스에 등록되어 있는 shell들은 #cd /etc/init.d 하면 확인 가능하다. chkconfig –list 를 하면 서비스에 등록한 프로그램들을 볼수 있습니다. #chkconfig –del tomcat 하면 서비스에서 삭제
화상연동/Web,APP 구축및서비스/LMS/평생교육/학점은행/기업교육/연수관리/설문구축/
10 02 2021
서비스에 등록되어 있는 shell들은 #cd /etc/init.d 하면 확인 가능하다. chkconfig –list 를 하면 서비스에 등록한 프로그램들을 볼수 있습니다. #chkconfig –del tomcat 하면 서비스에서 삭제
3 02 2021
아파치 mod_auth_token Module 설치 /app/httpd-2.2.27/bin
|
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@hae install]#cd /app/install/ [root@hae install]# wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mod-auth-token/mod_auth_token-1.0.5.tar.gz [root@hae install]# tar -xvfz mod_auth_token-1.0.5.tar.gz [root@hae install]# cd mod_auth_token-1.0.5 [root@hae mod_auth_token-1.0.5]# rm -rf configure [root@hae mod_auth_token-1.0.5]# autoreconf -fi [root@hae mod_auth_token-1.0.5]#./configure --with-apxs=/app/httpd-2.2.27/bin/apxs [root@hae mod_auth_token-1.0.5]# make [root@hae mod_auth_token-1.0.5]# make install [root@hae mod_auth_token-1.0.5]#cd /app/httpd-2.2.27/modules [root@hae mod_auth_token-1.0.5]#ls -rwxr-xr-x 1 root root 29782 Feb 3 16:35 mod_auth_token.so |
위처럼 mod_auth_token.so 파일이 생성됩니다. httpd.conf에서도 mod_auth_token.so등록되어 있습니다. 아파치 H264 Module 설치 yum install gcc yum install httpd-devel
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@hae conf]# cd /app/install/ [root@hae install]# wget http://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz [root@hae install]# tar -zxvf apache_mod_h264_streaming-2.2.7.tar.gz [root@hae install]# cd mod_h264_streaming-2.2.7/ [root@hae mod_h264_streaming-2.2.7]# ./configure --with-apxs=/app/httpd-2.2.27/bin/apxs [root@hae mod_h264_streaming-2.2.7]# make [root@hae mod_h264_streaming-2.2.7]# make install [root@hae httpd-2.2.27]# cd /app/httpd-2.2.27/modules [root@hae modules]# ls -al -rwxr-xr-x 1 root root 277786 Feb 3 17:16 mod_h264_streaming.so [root@hae conf]# cd /app/httpd-2.2.27/conf [root@hae conf]# vi httpd.conf #Apache mod_h264 Streaming Server AddHandler h264-streaming.extensions .mp4 |
httpd.conf or extra/httpd-vhost.conf 편집한다.
|
1 2 3 4 5 6 7 8 9 10 |
<Location /downloads/> # Secret key, can be anything random AuthTokenSecret "randomstring" # directory to protect AuthTokenPrefix /downloads/ # Timeout length, this is in seconds AuthTokenTimeout 300 # limit requsts by IP AuthTokenLimitByIp off </Location> |
Java 프로그램 구현 소스
|
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 29 30 31 32 |
String secret="randomstring"; // Same as AuthTokenSecret String protectedPath="/downloads/"; // Same as AuthTokenPrefix //boolean ipLimitation=false; // Same as AuthTokenLimitByIp long time= (new Date()).getTime(); // Time in decimal time=time/1000; // timestamp of java is longer than PHP String hexTime =Long.toHexString(time); // hexTime in Hexadecimal String token =getMD5( (secret+ filePathName + hexTime).getBytes()); return protectedPath +token+"/"+hexTime+ filePathName; public String getMD5(byte[] source) { String s = null; char hexDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; try { java.security.MessageDigest md = java.security.MessageDigest .getInstance("MD5"); md.update(source); byte tmp[] = md.digest(); char str[] = new char[16 * 2]; int k = 0; for (int i = 0; i < 16; i++) { byte byte0 = tmp[i]; str[k++] = hexDigits[byte0 >>> 4 & 0xf]; str[k++] = hexDigits[byte0 & 0xf]; } s = new String(str); } catch (Exception e) { e.printStackTrace(); } return s; } |
2 11 2020
음악을 iphone 으로 옮길때 아주 유용한 팁입니다. homebrew 를 통해 명령 행 도구 ffmpeg를 설치하십시오 . 다음을 사용하여 M4A (iTunes에서 지원)의 단일 파일을 Apple Lossless Audio Codec (ALAC)로 변환 할 수 있습니다.
|
1 2 |
ffmpeg -i input.flac -c:a alac output.m4a |
다음을 사용하여 디렉토리의 모든 파일을 수행 할 수 있습니다.
|
1 2 |
for f in ./*; do ffmpeg -i "$f" -c:a alac "${f%.*}.m4a"; done |
다음을 사용하여 모든 파일을 재귀 적으로 ( *.flac현재 디렉토리 및 모든 하위 디렉토리에서) 수행 […]
12 09 2020
AWS Route 53 https://www.youtube.com/playlist?list=PLuHgQVnccGMCas8a4f0uIg5X4uERoG6gb AWS Elastic Beanstalk + Route 53 https://www.youtube.com/watch?v=BeOKTpFsuvk AWS CloudFront 클라우드 프런트생성
10 04 2020
[숫자형 데이터 타입] 데이터 타입 의미 크기 설명 TINYINT 매우 작은 정수 1 byte -128 ~ 127 (부호없이 0 ~ 255) SMALLINT 작은 정수 2 byte -32768 ~ 32767 MEDIUMINT 중간 크기의 정수 3 byte –(-8388608) ~ -1(8388607) INT 표준 정수 4 byte – 범위 : -2147483648 에서 2147483647 (UNSIGNED 일 경우 0 에 4294967295) – 주의 […]
16 03 2020
1.DB Conneciton Pool 관련 Pool조회 select * from v$resource_limit where resource_name in (‘processes’, ‘sessions’); Sessions 접속 정보 쿼리 SELECT username, program FROM v$session; 접속 사용자 제거
|
1 2 |
--alter system kill session 'session_id,serial#'; alter system kill session '32,11234'; |
현재 Connection Pool 사용현황
|
1 2 3 |
SELECT * FROM V$resource_limit WHERE resource_name IN ('processes','sessions'); |
접속이 안되는 경우 INACTIVE 갯수가 많을 경우 삭제 하면 됨
|
1 2 3 4 |
SELECT 'alter system kill session ''' || sid || ',' || serial# || ''' immediate;' FROM v$session WHERE username = 'NURIWARE' AND status = 'INACTIVE' |
나오는 결과를 아래처럼 실행
|
1 2 3 4 5 6 7 8 9 10 |
alter system kill session '13,46763'; alter system kill session '29,30175'; alter system kill session '39,21235'; alter system kill session '43,53103'; alter system kill session '45,40359'; alter system kill session '46,50781'; alter system kill session '62,65397'; alter system kill session '71,15497'; alter system kill session '256,13051'; alter system kill session '262,14689'; |
2.DB Lock 관련 lock 조회
|
1 2 3 4 5 6 7 |
SELECT DO.OBJECT_NAME, DO.OWNER, DO.OBJECT_TYPE, DO.OWNER, VO.XIDUSN, VO.SESSION_ID, VO.LOCKED_MODE FROM V$LOCKED_OBJECT VO, DBA_OBJECTS DO WHERE VO.OBJECT_ID = DO.OBJECT_ID; |
[…]
12 03 2020
1. 아파치 설정값 확인 ./apachectl -V 환경 Linux apache 2.2.19 MPM은 Prefork 방식 참고 : MPM prefork 방식은 프로세스:쓰레드 = 1:1 방식 Worker 방식은 프로세스:쓰레드 = 1:n 방식 아파치 컴파일된 셋팅값 조회 # /usr/local/apache/bin/apachectl -V 설정 Httpd.conf 에서 /conf/extra/httpd-mpm.conf 을 Include 처리 (리마크 제외) 하고 Httpd-mpm.conf 파일을 열고 지시자 변경
|
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 29 30 31 |
[root@web1 bin]# ./apachectl -V Server version: Apache/2.4.37 (Unix) Server built: Dec 20 2018 17:37:42 Server's Module Magic Number: 20120211:83 Server loaded: APR 1.6.5, APR-UTIL 1.6.1 Compiled using: APR 1.6.5, APR-UTIL 1.6.1 Architecture: 64-bit Server MPM: <strong> event</strong> threaded: yes (fixed thread count) forked: yes (variable process count) Server compiled with.... -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=256 -D HTTPD_ROOT="/opt/web/apache2" -D SUEXEC_BIN="/opt/web/apache2/bin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" |
위의 MPM방법은 event 방식이다 여기에 맞는 설정값을 변경해야 한다. MaxRequestWorkers 을 변경한다.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#<IfModule mpm_event_module> # StartServers 3 # MinSpareThreads 75 # MaxSpareThreads 250 # ThreadsPerChild 25 # MaxRequestWorkers 400 # MaxConnectionsPerChild 0 #</IfModule> <IfModule mpm_event_module> StartServers 8 ServerLimit 16 MinSpareThreads 64 MaxSpareThreads 256 ThreadsPerChild 64 <strong>MaxRequestWorkers 1024</strong> MaxConnectionsPerChild 0 </IfModule> |
2.Tomcat 의 경우 Server.xml에 maxThreads를 확인해서 숫자를 늘린다.
10 01 2020
https://code.google.com/archive/p/mod-auth-token/
8 01 2020
1. 1.su – oracle sqlplus ‘/as sysdba’ SQL>startup SQL> exit oracle>lsnrctl start
19 12 2019
https://appiconmaker.co