2017년 2월 28일 화요일

MySQL log_warnings 값 설정

MySQL log_warnings 값 설정


아래 처럼 에러 로그가 너무 빈번히 발생한다면 log_warnings 변수의 값을 확인해서 변경해주면 됩니다.

170228 13:28:43 [Warning] Statement may not be safe to log in statement format. Statement: insert
170228 13:28:43 [Warning] Statement may not be safe to log in statement format. Statement: update
170228 13:28:43 [Warning] Statement may not be safe to log in statement format. Statement: insert
170228 13:28:52 [Warning] Statement may not be safe to log in statement format. Statement: insert
170228 13:28:52 [Warning] Statement may not be safe to log in statement format. Statement: update
170228 13:28:52 [Warning] Statement may not be safe to log in statement format. Statement: insert
170228 13:29:35 [Warning] Statement may not be safe to log in statement format. Statement: insert
170228 13:29:35 [Warning] Statement may not be safe to log in statement format. Statement: update
170228 13:29:35 [Warning] Statement may not be safe to log in statement format. Statement: insert

show variables like 'log_warnings';

set global log_warnings = 0;

2017년 2월 27일 월요일

Fatal error Class 'PHPExcel_Shared_Font' not found

Fatal error Class 'PHPExcel_Shared_Font' not found


PHPExcel 작업시 아래와 같은 에러가 발생하는 황당한 경우가 있습니다.

Fatal error:  Class 'PHPExcel_Shared_Font' not found in C:\AutoSet9\public_html\Classes\PHPExcel\Writer\Excel5\Worksheet.php on line 299


아무리 구글링을 해봐도 도무지 답이 없더군요~

결론은 PHPExcel 클래스 파일이 복사하면서 깨진 것인지 https://github.com/PHPOffice/PHPExcel/archive/1.8.zip 여기서 새로 다운로드 받아서 압축 풀고 테스트를 하니 정상적으로 되네요~

아무래도 구글 드라이브에서 작업 중인데 싱크가 끝나지 않은 상태에서 ftp 로 파일을 업로드해서 생긴 문제 같습니다.

2017년 2월 24일 금요일

AMD Ryzen specification

AMD Ryzen specification


AMD 라이젠이 드디어 출시가 되는군요~

출시일은 2017년 3월 2일 입니다.

카비레이크가 출시 되고 한달보름만에 라이젠 서밋 릿지가 모습을 나타냈네요~

가성비로 인텔의 독주를 막을 수 있을지 기대가 됩니다.

출시모델은 Ryzen 7 3종류만 먼저 출시 되었네요~

라이젠 3, 5도 빨리 출시되었으면 합니다. ( Ryzen 5 출시일 2017.04.11 )


AMD Ryzen CPU Cores/Threads Base Turbo L3 TDP
AMD Ryzen 7 1800X
8 / 16
3.6GHz
4.0GHz
16MB
95W
AMD Ryzen 7 1700X
8 / 16
3.4GHz
3.8GHz
16MB
95W
AMD Ryzen 7 1700
8 / 16
3.0GHz
3.7GHz
16MB
65W
AMD Ryzen 5 1600X
6 / 12
3.3GHz
3.7GHz
16MB
95W
AMD Ryzen 5 1600
6 / 12
16MB
65W
AMD Ryzen 5 1500
6 / 12
3.2GHz
3.5GHz
16MB
65W
AMD Ryzen 5 1400X
4 / 8
3.5GHz
3.9GHz
8MB
65W
AMD Ryzen 5 1400
4 / 8
8MB
65W
AMD Ryzen 5 1300
4 / 8
3.2GHz
3.5GHz
8MB
65W
AMD Ryzen 3 1200X
4 / 4
3.4GHz
3.8GHz
8MB
65W
AMD Ryzen 3 1200
4 / 4
8MB
65W
AMD Ryzen 3 1100
4 / 4
3.2GHz
3.5GHz
8MB
65W

1800X 의 경우 499달러인데 인텔 최상위 CPU의 절반 정도 가격입니다.

라인업이 Ryzen 3 하위 CPU 도 있을 듯 한데 아직까지 정보가 없는게 아쉽습니다.


2017년 2월 17일 금요일

CentOS 7.x Free SSL Certificate

CentOS 7.x Free SSL Certificate



# yum install mod_ssl letsencrypt

# systemctl stop httpd

# letsencrypt certonly --standalone -d www.example.com


Configration for Apache

# vi /etc/httpd/conf.d/www.example.com.conf
<VirtualHost www.example.com:443>
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/www.example.com/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/www.example.com/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/www.example.com/fullchain.pem
    ServerName www.example.com
    DocumentRoot /var/www/html
    ErrorLog logs/www.example.com_error_log
    CustomLog logs/www.example.com_access_log common
</VirtualHost>


reference

http://blog.ivps.kr/188

http://blog.ivps.kr/189

CentOS 7.x Apache Invalid command SSLEngine

CentOS 7.x Apache Invalid command SSLEngine


retsencrypt 로 인증서 발급후에 아파치 설정하고 에러 발생시 해결방법


[root@conoha-jp ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2017-02-17 08:43:27 JST; 12s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 21946 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 11721 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 21945 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 21945 (code=exited, status=1/FAILURE)

Feb 17 08:43:26 conoha-jp systemd[1]: Starting The Apache HTTP Server...
Feb 17 08:43:27 conoha-jp httpd[21945]: AH00526: Syntax error on line 2 of /...:
Feb 17 08:43:27 conoha-jp httpd[21945]: Invalid command 'SSLEngine', perhaps...n
Feb 17 08:43:27 conoha-jp systemd[1]: httpd.service: main process exited, c...RE
Feb 17 08:43:27 conoha-jp kill[21946]: kill: cannot find process ""
Feb 17 08:43:27 conoha-jp systemd[1]: httpd.service: control process exited...=1
Feb 17 08:43:27 conoha-jp systemd[1]: Failed to start The Apache HTTP Server.
Feb 17 08:43:27 conoha-jp systemd[1]: Unit httpd.service entered failed state.
Feb 17 08:43:27 conoha-jp systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.




[root@conoha-jp ~]# yum install mod_ssl
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
 * base: ftp.iij.ad.jp
 * epel: ftp.jaist.ac.jp
 * epel-debuginfo: ftp.jaist.ac.jp
 * epel-source: ftp.jaist.ac.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package mod_ssl.x86_64 1:2.4.6-45.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package        Arch          Version                         Repository   Size
================================================================================
Installing:
 mod_ssl        x86_64        1:2.4.6-45.el7.centos           base        105 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 105 k
Installed size: 224 k
Is this ok [y/d/N]: y
Downloading packages:
mod_ssl-2.4.6-45.el7.centos.x86_64.rpm                     | 105 kB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:mod_ssl-2.4.6-45.el7.centos.x86_64                         1/1
  Verifying  : 1:mod_ssl-2.4.6-45.el7.centos.x86_64                         1/1

Installed:
  mod_ssl.x86_64 1:2.4.6-45.el7.centos

Complete!


systemctl restart httpd


SSL 인증서 무료 발급은 아래 링크를 참고하세요.



2016년 11월 24일 목요일

ConoHa VPS 1Core UnixBenchmark Result

ConoHa VPS 1Core UnixBenchmark Result



Spec : 1Core / 512MB RAM / 20GB SSD
Single Score : 1408.1
Multi Score :


# ./Run
make all
make[1]: Entering directory `/root/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory `/root/UnixBench'
sh: 3dinfo: command not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com


1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

1 x File Copy 256 bufsize 500 maxblocks  1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

1 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

1 x Process Creation  1 2 3

1 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent)  1 2 3

1 x Shell Scripts (8 concurrent)  1 2 3

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: conoha-jp: GNU/Linux
   OS: GNU/Linux -- 3.10.0-327.36.3.el7.x86_64 -- #1 SMP Mon Oct 24 16:09:20 UTC 2016
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz (4589.4 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   14:13:37 up 2 days, 20:59,  2 users,  load average: 0.00, 0.01, 0.05; runlevel 3

------------------------------------------------------------------------
Benchmark Run: 목 11월 24 2016 14:13:37 - 14:41:44
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       30100406.0 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3815.0 MWIPS (9.8 s, 7 samples)
Execl Throughput                               3052.3 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1012551.3 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          264993.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       2876816.1 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1654468.2 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 345402.2 lps   (10.0 s, 7 samples)
Process Creation                              16609.3 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4060.1 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    566.8 lpm   (60.1 s, 2 samples)
System Call Overhead                        2579749.5 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   30100406.0   2579.3
Double-Precision Whetstone                       55.0       3815.0    693.6
Execl Throughput                                 43.0       3052.3    709.8
File Copy 1024 bufsize 2000 maxblocks          3960.0    1012551.3   2556.9
File Copy 256 bufsize 500 maxblocks            1655.0     264993.0   1601.2
File Copy 4096 bufsize 8000 maxblocks          5800.0    2876816.1   4960.0
Pipe Throughput                               12440.0    1654468.2   1330.0
Pipe-based Context Switching                   4000.0     345402.2    863.5
Process Creation                                126.0      16609.3   1318.2
Shell Scripts (1 concurrent)                     42.4       4060.1    957.6
Shell Scripts (8 concurrent)                      6.0        566.8    944.7
System Call Overhead                          15000.0    2579749.5   1719.8
                                                                   ========
System Benchmarks Index Score                                        1408.1

2016년 11월 23일 수요일

Windows 10 Home 버전 원격 데스크톱 기능 사용하기

Windows 10 Home 버전 원격 데스크톱 기능 사용하기


윈도우10 Pro 버전은 원격 데스크톱 기능이 기본적으로 있지만,
홈에디션은 원격 지원 기능만 있다.

하지만 RDP Wrapper 라는 프로그램 설치로 원격 데스크톱 접속이 가능하다.

https://github.com/stascorp/rdpwrap/releases 여기에 가서 프로그램을 다운로드 하면 된다.

다운로드 https://github.com/stascorp/rdpwrap/releases/download/v1.6.1/RDPWrap-v1.6.1.zip


압축을 풀고 install 배치파일을 실행해주면 설치가 완료가 되고,

RDPConf.exe 파일을 실행하면 원격 접속이 가능해진다.