2018年3月18日 星期日

[PHP] libsodium for PHP


安裝libsodium元件 For Php
#yum install php72w-pecl-libsodium

#systemctl restart php-fpm
#systemctl restart nginx

2018年3月16日 星期五

[PHP upgrade] CentOS 7 PHP 7.1.14 upgrade to php 7.2.3


確定/etc/yum.repos.d/下有remi-php72.repo

沒有的話從網上copy內容新增此檔


安裝php 7.2
#yum --enablerepo=remi-php72 install php
#yum --enablerepo=remi-php74 install php74 php74-cli php74-common php74w-bcmath php74-dba php74-devel php74-embedded php74-fpm php74-gd php74-imap php74-intl php74-mbstring php74-mcrypt php74-mysql php74-odbc php74-opcache php74-pdo php74-pdo_dblib php74-pear php74-process php74-xml php74-xmlrpc

安裝完後重啟php-fpm
#systemctl restart php-fpm


重新設定web root目錄權限
#sudo chown -R "$USER":www-data /webdirectory
#sudo chmod -R 0755 /webdirectory
設定後重啟Web server
#systemctl restart nginx






2018年3月9日 星期五

[PHP JavaBridge] 在CentOS中管理JVM配給JavaBridge的記憶體


java -Xms2048m -Xmx4096m -jar /opt/jdk1.8.0_144/jre/lib/JavaBridge.jar SERVLET:8081 3 JavaBridge.log &


-Xms2048m 是指最少2G Ram
-Xmx4096m 是指最大4G Ram

-jar  後面帶的參數是JavaBridge.jar的路徑跟起listen的port 以及LOG的檔案名稱

2017年11月15日 星期三

[電子發票] 電子發票串接財政部回復錯誤訊息:javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated



此錯誤訊息為財政部需要回傳資料到return url.發現憑證與domain不match或是handsharking不過造成.

解決方式:
                調整Apache Web server 設定 SSL的protocols及Cipher Suite.
             
                到https://www.ssllabs.com/ssltest/測試調整結果.

                Java 6u45  至少要可以handshake通過

2017年6月11日 星期日

[CentOS 7.1 1503] install ssh


yum install openssh openssh-server openssh-clients openssl-libs
You might have selinux enabled. Try
getenforce
If it shows "Enforcing", try
setenforce 0