ads

วันศุกร์ที่ 3 กรกฎาคม พ.ศ. 2558

ติดตั้ง jira & confluence ให้รองรับ SSL ผ่าน port 433 ทั้งคู่

ติดตั้ง jira & confluence ให้รองรับ SSL ผ่าน  port 433 ทั้งคู่

- ติดตั้ง mod_ssl ให้ apache รองรับการทำงานของ ssl
#  yum install mod_ssl

สร้าง dir เพื่อเก็บ key ที่เราได้มาใช้งาน
# mkdir -p /etc/httpd/ssl/
นำ key และ cert มาเก็บไว้ทีนี่
-rw-r--r-- 1 root root 1674 Jun 23 13:55 DigiCertCA.crt
-rw-r--r-- 1 root root 1900 Jun 23 13:55 star_YourDomain_co_th.crt
-rw-r--r-- 1 root root 1704 Jun 23 13:55 star_YourDomain_co_th.key

stop service ทุกอย่างก่อน
# /etc/init.d/jira stop
# /etc/init.d/confluence stop
# /etc/init.d/httpd stop

แก้ไฟล์คอนฟิกของ jira  ที่ /usr/atlassian/jira/conf/server.xml   ดังนี้

<?xml version="1.0" encoding="utf-8"?>
<Server port="8005" shutdown="SHUTDOWN">
    <!--APR library loader. Documentation at /docs/apr.html -->
    <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
    <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
    <Listener className="org.apache.catalina.core.JasperListener"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
    <Service name="Catalina">
        <Connector port="8080"
                   maxThreads="150"
                   minSpareThreads="25"
                   connectionTimeout="20000"
                   enableLookups="false"
                   maxHttpHeaderSize="8192"
                   protocol="HTTP/1.1"
                   useBodyEncodingForURI="true"
                   redirectPort="8443"
                   acceptCount="100"
                        scheme="https"
                        proxyName="jira.YourDomain.co.th"
                        proxyPort="443"

                   disableUploadTimeout="true"/>
        <Engine name="Catalina" defaultHost="localhost">
            <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
                <Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">


แก้ไขไฟล์คอนฟิก ของ confluence  ที่  /usr/atlassian/confluence/conf/server.xml  ดังนี้

<Server port="8000" shutdown="SHUTDOWN" debug="0">    <Service name="Tomcat-Standalone">        <Connector port="8090" connectionTimeout="20000" redirectPort="8443"                maxThreads="200" minSpareThreads="10"                enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" proxyName="wiki.YourDomain.co.th" proxyPort="443" scheme="https" />
            <Engine name="Standalone" defaultHost="localhost" debug="0">            <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false">                <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">                    <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->                    <Manager pathname="" />                </Context>            </Host>
        </Engine>
    </Service></Server>


แก้ไขไฟล์ httpd.conf  ที่   /etc/httpd/conf/httpd.conf   ดังนี้

Listen 80 443
NameVirtualHost *:443
NameVirtualHost *:80
<VirtualHost *:80>
        ServerAdmin itinfrasystem@YourDomain.co.th
        ServerName jira.YourDomain.co.th
        RewriteEngine On
        RewriteRule ^/(.*)      https://%{HTTP_HOST}/$1 [R]
</VirtualHost>
<VirtualHost *:443>
        ServerAdmin itinfrasystem@YourDomain.co.th
        ServerName jira.YourDomain.co.th
        SSLEngine On
        SSLCertificateKeyFile /etc/httpd/ssl/star_YourDomain_co_th.key
        SSLCertificateFile /etc/httpd/ssl/star_YourDomain_co_th.crt
 ####### JIRA is running on port 8080/443 local on localhost
        ProxyRequests Off
        ProxyPreserveHost On
        SSLProxyEngine on
        ProxyPass / http://localhost:8080/ connectiontimeout=5 timeout=300
        ProxyPassReverse / http://localhost:8080/
</VirtualHost>
<VirtualHost *:80>
        ServerAdmin itinfrasystem@YourDomain.co.th
        ServerName wiki.YourDomain.co.th
        RewriteEngine On
        RewriteRule ^/(.*)      https://%{HTTP_HOST}/$1 [R]
</VirtualHost>
<VirtualHost *:443>
        ServerAdmin itinfrasystem@YourDomain.co.th
        ServerName wiki.YourDomain.co.th
        SSLEngine On
        SSLCertificateKeyFile /etc/httpd/ssl/star_YourDomain_co_th.key
        SSLCertificateFile /etc/httpd/ssl/star_YourDomain_co_th.crt
 ####### WIKI is running on port 8090/443 local on localhost
        ProxyRequests Off
        ProxyPreserveHost On
        SSLProxyEngine on
        ProxyPass / http://localhost:8090/ connectiontimeout=5 timeout=300
        ProxyPassReverse / http://localhost:8090/
</VirtualHost>

ทดสอบค่า configure ดู
# /etc/init.d/httpd configtest

ทำการ start service ทังหมดแล้วทดสอบใช้งานดู
# /etc/init.d/jira start
# /etc/init.d/confluence start
#  /etc/init.d/httpd start

เมือ service สตาร์ทผ่านหมด  รันผ่าน ssl port 443 ได้ครบ   เข้าไปเปลี่ยน system url ด้วย
jira = login > ฟันเฟือง system > Edit settings
ที่ Server Base URL http://jira.YourDomain.co.th  เป็น https://jira.YourDomain.co.th

confluence = login > ฟันเฟือง Gerneral configure > Edit
ที่ Server Base URL http://wiki.YourDomain.co.th   ไปเป็น  https://wiki.YourDomain.co.th


วันอังคารที่ 16 มิถุนายน พ.ศ. 2558

Adobe Stock

Adobe Stock

16/06/2015

The industry's first stock content service to be integrated directly into Photoshop CC, Illustrator CC, InDesign CC and other Adobe desktop apps creative professionals use every day. As a Fotolia contributor, your content is now being sold on Adobe Stock - something we hope you will be as excited about as we are.

The integration of Adobe Stock with Creative Cloud allows Creative Cloud customers – all 4 million of them - to launch Adobe Stock directly within CC desktop software, making your images far more accessible and easy to purchase than ever before. 

Additionally, we have good news about Adobe Stock payouts as well as changes to Fotolia payouts:

Adobe Stock payouts will be 33% on all products. We are maintaining guaranteed payout floors to protect your commissions on large subscriptions.
Fotolia subscription payouts have been raised, from 20-25% to 33% for all contributors!

วันนี้ Adobe ได้ปล่อยอัพเดท Adobe CC, Illustrator CC หลากหลายฟีเจอร์ให้อัพเดทกันทั่วไป
พร้อมกันนี้ทาง Adobe ได้เปิดตัว บริการใหม่นั่นคือ AdobeStock  เวปซื้อ ขายภาพที่ก่อนหน้านี้ Adobe ได้เข้าไปซื้อหุ้นส่วนบริการด้านนี้อยู่แล้วกับเวป fotolia.com  เพื่อให้ครอบคลุมตลาดมากขึ้น Adobe จึงเปิดบริการส่วนนี้เพิ่มขึ้นมา

โดย contribute ที่ส่งภาพขายที่ fotolia.com อยู่แล้วภาพก็จะโผล่ขายที่เวป AdobeStock.com ด้วยเช่นกัน   โดย % ค่าคอมมิสชั่น จะสูงถึง 33% ในการขายแต่ละภาพ   ส่วนดาวโหลดแบบ subscription ก็จะอยู่ในช่วง 20%-33% ( จริงๆ มันก็เรทอะนะ)
เพียงแต่เราได้ช่องทางการขายที่กว้างขึ้น   โอกาสดาวโหลดได้มากขึ้นเช่นกัน


วันศุกร์ที่ 29 พฤษภาคม พ.ศ. 2558

Jira Error - NullPointerException หลังจากลบ issue type ต่างๆ

Jira Error - NullPointerException หลังจากลบ issue type ต่างๆ

ส่งผลให้ create อะไรไม่ได้เลย  

วิธีแก้ 
เข้า mysql เพื่อหา id ที่มีปัญหา
> select cf.optionid from optionconfiguration cf where cf.optionid not in (select it.id from issuetype it);
จะได้ค่า id ที่มีปัญหาว่ามีกี่ตัว
 stop service jira
> delete from optionconfiguration where optionid not in (select it.id from issuetype it);
เพื่อลบ id ที่มีปัญหาเหล่านั้น
start service JIRA


Confluence : Error 500 - Java.lang.NullPointerException

ข้อมูลสรุปนี้ไม่พร้อมใช้งาน โปรด คลิกที่นี่เพื่อดูโพสต์

install cphalcon

install cphalcon

install library ที่ต้องใช้เสียก่อน
# yum install php-devel pcre-devel gcc make
# git clone --depth=1 git://github.com/phalcon/cphalcon.git
# cd cphalcon/build
# sudo ./install

*** โดยปกติสคริป phalcon จะ build เลือก architechter ให้โดยออโต้ แต่ถ้าเกิดมีปัญหาตัด เราสามารถเลือกแบบ manual ได้ดังนี้
# cd cphalcon/build/64bits
# export CFLAGS="-O2 --fvisibility=hidden"
# ./configure --enable-phalcon
# make 
# sudo make install

ในบางกรณี ถ้าเครืองนั้นมีการ upgrade / downgrade php หลายครั้งอาจจะเจอปัญหาระหว่างการคอมไพล์ เป็น error ประมาณ.....
....
...
‘zend_std_get_static_property’ discards qualifiers from pointer target type
/usr/include/php/Zend/zend_object_handlers.h:147: note: expected ‘char *’ but argument is of type ‘const char *’
/root/cphalcon/build/64bits/phalcon.zep.c: At top level:
/root/cphalcon/build/64bits/phalcon.zep.c:126687: error: ‘ZEND_FE_END’ undeclared here (not in a function) "
ตรวจสอบ php-config ว่า php ที่ลงกับตัวคอมไพล์ phpize และ php-config ต้อง version เดียวกันเท่านั้น
หรือใช้วิธีหลอกด้วยการ lymbolic link แทน
( ตัวอย่างหลอกว่าเป็น version 5.3.3 )
# ln -s /usr/bin/php-config /usr/bin/php-config533

แล้วคอมไพล์ใหม่อีกครั้ง แล้วตรวจสอบ phalcon.so ว่ามีแล้วหรือยังในพาร์ท ( ปกติสคริปจะก๊อปให้เอง) ที่ /usr/lib64/php/modules/
และที่ /etc/php.d/ จะมีไฟล์ phalcon.ini ที่ระบุเปิด extension ของ phalcon.so ให้อยู่แล้ว
restart service อีกที

# /etc/init.d/nginx 
# /etc/init.d/php-fpm
ตรวจสอบ module อีกที 
# php -m
*** จากเปิด issue ไปทางทีมพัฒนา phalcon แนะนำสำหรับ phalcon version 2.1 ควรใช้ php 5.3.21 อย่างต่ำ

- refer: 
https://github.com/phalcon/cphalcon/issues/10101
https://github.com/phalcon/cphalcon/issues/10387
http://docs.phalconphp.com/en/latest/reference/install.html 

Password less command line scripts ใน MySQL client v.5.6 ขึ้นไป

Password less command line scripts ใน MySQL client 5.6 ขึ้นไป 


เจอปัญหาเมื่อก่อนใช้จะฝัง  คำสั่ง command และพาสเวิร์ดในคำสั่ง script mysql ต่างๆ เลยแต่พออัพมาใช้ version 5.6 แล้วมันฟ้องว่าไม่ได้  ฟ้องว่าต้องการ password ซะงั้น
เนื่องจาก client version 5.6 มีการอัพเดทเรือง security ดังกล่าว  เราจึงต้องเปลี่ยนแปลงดังนี้
ใช้คำสั่ง  mysql_config_editor ใส่ค่าตามที่เราจะ set user นั้นๆ ไป

# mysql_config_editor set --login-path=client --host=localhost --user=root --password
ใส่ password

--login-path=ชื่อเรียกในการ login ตั้งชื่ออื่นก็ได้
--host= จะให้เซ็ตการ login นี้กับเครืองไหนก็ใส่ไป

ทดสอบ print ค่าที่เซ็ตไว้ออกมาดู  มันจะตั้งชื่อตาม --login-path=xxxxx เรานั่นเอง  ตั้งซ้ำก็ได้มันจะเด้งถามให้ทับไหม
# mysql_config_editor print --all

[client]
user = root
password = *****
host = localhost


# mysql --login-path=client  
เข้าเลย

หรือนำไปประยุกต์กับ backup ก็ได้ ตามนี้
# mysqldump --login-path=client --max_allowed_packet=512M Database_Name > /backup/Database_Name_`date "+%Y-%m-%d"`


* refer: http://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html
* http://akrabat.com/password-less-command-line-scripts-with-mysql-5-6/

วันพุธที่ 8 เมษายน พ.ศ. 2558

การตั้งค่าบัญชีรับเงิน Amazon เข้าธนาคารกรุงเทพ แบบ Direct Deposit

ขออนุญาติมาแปะไว้กันลืมคร้บ
เริ่มต้นก่อนอื่นเลย ต้องไปเปิดบัญชีธนาคารกรุงเทพเป็นอันดับแรกครับ แบบออมทรัพย์ ไม่ต้องไปเปิดสาขา New York นะครับ เปลืองค่าเครื่องบินเปล่าๆ
ผมแนะนำให้มีบัญชีของธนาคารกรุงเทพกับธนาคารกสิกรไทย สำคัญมาก เดี๋ยวจะค่อยๆ มาบอกไปเรื่อยๆ นะครับครับ

1. สำหรับค่าธรรมเนียมการรับเงินแบบ Direct Deposit คิดเรท ดังนี้

- ยอดเงินโอน น้อยกว่า $50 ไม่คิดค่าธรรมเนียม
- ยอดเงินโอน $51-$100 คิดค่าธรรมเนียม $3
- ยอดเงินโอน $100.01-$2,000 คิดค่าธรรมเนียม $5
- ยอดเงินโอน $2,000.01-$50,000 คิดค่าธรรมเนียม $10
- ยอดเงินโอน $50,000.01 ขึ้นไป คิดค่าธรรมเนียม $20

2. ค่าธรรมเนียมการรับเงินโอนจากต่างประเทศของธนาคารกรุงเทพในประเทศไทย คิดค่าธรรมเนียม 200 บาท หรือ 0.25% ของมูลค่า เป็นเงินบาทแต่ไม่เกิน 500 บาท

สมมุติว่าเราได้เงินจาก Amazon $10 เราจะต้องเสียเงินค่าธรรมเนียมให้ธนาคารกรุงเทพ 200 บาท ซึ่งเท่ากับเราไม่ได้อะไรเลย เสียค่าธรรมเนียมเกือบจะเท่ากับรายรับที่ได้เสียอีก ดังนั้น แนะนำให้ตั้งแบบรับเงินเป็นเช็คไว้ก่อน ที่มูลค่าที่ $1000 พอได้ยอดใกล้ครบตามจำนวนแล้วค่อยไปตั้งค่่าการรับเงินใหม่มาเป็นแบบโอนเงินเข้าธนาคารกรุงเทพอีกที

เรทเงินที่เราจะเสียค่าธรรมเนียมต่ำสุด อยู่ที่จำนวนเงิน $2000 ครับ

สิ่งที่ต้องเตรียมไว้สำหรับการรับเงินแบบ Direct Deposit เข้าบัญชีธนาคารกรุงเทพของ Amazon

บัญชีเงินฝากออมทรัพย์ของธนาคารกรุงเทพ สาขาใดก็ได้

ขั้นตอนการตั้งค่า Direct Deposit ของ Amazon

1. Login เข้าไปยัง Amazon Associate ของเรา
2. คลิกที่ Account Settings เมนูมุมบนด้านขวา
3. คลิก Change Payment Method



4. เลือก Direct Deposit แล้วใส่ค่าตามนี้

- Bank Name : BANGKOK BANK
- Bank Account Holder Name : ชื่อบัญชีธนาคารของเราเป็นภาษาอังกฤษ
- Bank Account Type: เลือก Savings
- Bank Account Number: ใส่หมายเลขบัญชีธนาคาร 10 ตัวของเราลงไป
- Routing Number / ABA Number: 026008691 -  (สำคัญมากห้ามผิด)

เสร็จแล้วให้ทำการกด Submit เพื่อยืนยันการเปลี่ยนแปลง เท่านี้ก็เสร็จเรียบร้อย รอรับเงินเข้าธนาคารได้เลย ไม่ต้องเอาเช็คไปขึ้นเงินให้เสียเวลาครับ

ที่มา : http://www.hot-th.com/thread-287-1-1.html