Test

September 22, 2011

test


Declare Interface

April 3, 2009

เมื่อไหร่ก็ตามที่เราสร้าง interface ขึ้นมานั้น มันจะคล้ายๆว่าเป็นการทำ “สัญญา” กับคลาสนั้นๆ ว่าจะให้คลาสดังกล่าวสามารถทำอะไรได้บ้าง ยกตัวอย่างเช่น หากเราต้องการจะสร้าง interface ชื่อ Bounceable คลาสใดๆก็ตามที่ทำการ implements interface นี้จะต้องตกลงที่จะเขียน   methods ชื่อ bounce() และ setBounceFactor() เป็นต้น

Interface นั้นสามารถ implemented ได้คลาสใดก็ได้ ตัวอย่างเช่น ถ้าเราต้องการให้ Ball และ Tire นั้นมี  behavior เช่น bounce แต่ทว่า Ball และ Tire นั้นไม่สามารถใช้คุณสมบัติ inheritance relationship ได้ เพราะว่า Ball นั้น extends มาจาก Toy ส่วน Tire นั้น extends มาจาก java.lang.Object แต่เราสามารถทำให้ทั้ง Ball และ  Tire นั้น implement Bonuneable ได้
เราสามารถพูดได้ว่า ทั้งสองคลาสนั้นมี bounce() และ setBounceable() methods

นี่คือ interface ที่เราประกาศไว้

interface Bounceable
void bounce();
void setBounceable(int bf);

และนี่คือสิ่งที่ compiler เห็น

interface Bounceable
public abstract void bounce();
public abstract void setBounceable(int bf);

คลาสที่ทำการ implementing นั้นจะต้องเขียนดังนี้  (ทุก methods ของ interface นั้นจะต้องถูกทำการ implemented และ จะต้องประกาศ modifiers เป็น public )

class Tire implements Bouneable
public void bounce() { … }
public void setBouncFactor(int bf ) { … }

สิ่งที่เราควรรู้คือ interface นั้นก็คือ abstract class แต่สิ่งที่ทำให้ interface และ abstract class นั้นแตกต่างกันก็คือ abstract class นั้นสามารถ define ได้ทั้ง abstract และ non-abstract methods ส่วน interface นั้นสามารถ define ได้เพียง abstract methods เท่านั้น แต่อย่งาไรก็ตามสิ่งที่ทำให้เกิดความแตกต่างกันกับ abstract class อย่างชัดเจนก็คือ interface นั้นมีความสะดวกมากกว่า

•    ทุกๆ methods ของ interface  นั้นถือว่าเป็น public และ abstract  โดยอัตโนมัติ นัน้หมายความว่าคุณไม่จำเป็นที่จะต้อง กำหนดประเภท modifiers ให้กับ methods ว่าเป็น public หรือ abstract เพราะ มันจะถูกกำหนดให้เป็น public และ abstract ตลอดไป
•    ทุกๆ variables ที่ถูกประกาศภายใน interface นั้นจะต้องเป็นประเภท  public, static และ final เท่านั้น interface นั้นสามารถประกาศได้เฉพาะ constants เท่านั้นไม่สามารถประกาศเป็น instance variable ได้
•    ทุกๆ methods ของ interface นั้นจะต้องไม่เป็น static
•    เพราะ ทุกๆ methods ของ interface นั้นคือ abstract methods ดังนั้นจึงไม่สามารถระบุ เป็น final, strictfp หรือ native ได้
•    interface สามารถ extends ได้มากกว่า หนึ่ง interface

การประกาศ interface ที่ถูกต้อง มีลักษณะดังนี้

public abstract interface Rollable { }

จะเห็นได้ว่าการ define interface แบบข้างต้นนั้นมี redundant เกิดขึ้น เพราะ interface นั้นถูกกำหนดให้เป็น abstract อยู่แล้ว จึงไม่จำเป็นจะต้องระบุ modifiers เป็น abstract อีก ควร define แบบตัวอย่างด้านล่างดีกว่า

public interface Rollable { }

ต่อไปที่การ define interface ดังด้านล่างแต่ให้ สังเกตดูที่ methods ภายใน interface ดังกล่าว

public interface Bouneable {
public abstract void bounce();
public abstract void setBounceFactor(int bf);
}

การพิมพ์ public และ abstract ลงไปเป็น modifiers ให้กับ methods นั้นถือเป็น redundant เพราะว่าทุกๆ methods ใน interface นั้นจะถูกกำหนด เป็น public และ abstract อยู่แล้ว ดังนั้นเราควร define interface นี้โดยใช้ code  ดังนี้

public interface Bouneable {
void bounce();                // no modifiers
void setBounceFactor(int bf);        // no modifiers
}

Declaring Interface Constance
เราสามารถวาง constants ภายใน interface ได้ โดยที่สามารถกันรันตีได้ว่า คลาสใดก็ตามที่ implements interface นี้ไปจะสามารถเรียกใช้งานได้เหมือนกับเป็น constants สิ่งที่เราควรจำก็คือ

“ทุกๆ  variable ภายใน  interface นั้นถือว่าเป็น  public static final เสมอ”

เราไม่จำเป็นที่จะต้องกำหนด modifiers ชนิด public, static, fina; ให้กับ variables  ภายใน interface เลย เพราะจะถูกบังคับให้เป็น public static final โดยอัตโนมัติ ดังตัวอย่างด้านล่าง

Interface Foo {
int BAR = 42;
void go();
}

class Zap implements Foo {
public void go() {
BAR = 27;
}
}

จากตัวอย่างนี้จะเห็นได้ว่าเราไม่สามารถเปลี่ยนแปลงค่าของ constants (BAR) ได้เลยเพราะมันถูกกำหนดค่าเอาไว้แล้ว ซึ่งค่านี้จะไม่สามารถเปลี่ยนแปลงได้อีกเลย คลาส ที่ implements interface นี้ไปนั้นสามารถเรียกใช้ variables นี้ได้ แต่จะเป็นการใช้งานแบบ read-only เท่านั้น
จากตัวอย่างด้านบนนั้นการกำหนดค่า  BAR = 27 นั้นจะไม่ถูกทำการ compile


Create Your Own Career Path

April 3, 2009

Everyone knows what “career planning” and “career path” mean, but in these times of seemingly constant change in the workplace, do these ideas have any purpose anymore?

This question came up for me when a new client said that he wanted me to help him determine a 3-5 year career path. He realized that his corporation was so busy reacting to the latest major business challenge that they were unable to provide any career development or mentoring to its people. Resources were too scarce, and corporate focus was too unclear – my client knew that he would have to be proactive in designing his own career path.

This has been true in many companies for a long time. But rather than give up the idea that you can shape the direction of your career and resign yourself to being a pinball, you can take steps to direct where you’re heading.

1. Find a mentor. It hardly seems fair that along with clearing your own career path you’ve got to find your own mentor, too. But the good news is that many successful people ahead of you on the career curve are willing to be mentors if you ask. Many successful people are where they are today because of their own mentors. People who have benefited from mentors want to do their part to keep the practice going.

A mentor is simply someone who has experience, knowledge and insight that you find valuable who is willing to share that with you. Some mentors may be instrumental in you landing your next promotion, while other mentors may be good for a cup of coffee and a chat twice a year.

Look around where you work, think about where you used to work, and think about other people you know unconnected with your work. Ask someone out for coffee or schedule a meeting and see what happens. You don’t have to ask, “Will you be my mentor?” Just start building relationships with interesting people, and be open to being a mentor yourself.

2. Take time to dream. Every once in a while step back from your work and really think about it. Would you be happy doing this for the next two years, fifteen years or even fifteen minutes? Where do you want to go from here?

Most of us are so busy living life from one task on our list to the other that we don’t make time to zoom out and take a look at the bigger picture of our career. Write down some notes about the future. What do you want to do more of and less of? Get used to the practice of thinking ahead about your career.

3. Keep in touch with your contacts and make new ones. Attend professional association meetings to keep up with what’s current and who’s doing what. Touch base with all of your contacts at least annually. The point is to stay connected to people outside of your immediate work group. Career planning is about keeping a bigger picture in your line of sight. And you never know when you will have to make a move quickly and unexpectedly.

4. Develop new skills (aka prepare for your next opportunity). For example, if you are in sales but want to move into operations, take classes now to develop the skills you’ll need to make the move. Volunteer for a project that’s a bit out of your comfort zone to learn new skills on the fly.

These four pieces all work together. For instance, you take time to dream about what you want to do in the future, talk to your mentor about skills you might need to develop, take classes to develop those skills and seek people out who are doing what you want to be doing down the road.

It takes creativity, tenacity and drive to create your own career path, and it may not all turn out exactly as you expect. But for most people, thinking ahead about what’s next and doing what they can to prepare for it beats hanging out in the pinball machine for too long.

by Heather Mundell


Class Declaration and Modifier

April 1, 2009

Class Declaration and Modifier

ในบทความที่ผมได้เขียนไว้ก่อนหน้านี้  การประกาศคลาสขึ้นใช้งานจะถูกประกาศในรูปแบบ

class MyClass { }

ซึ่งโค้ดที่เขียนด้านบนนั้นสามารถ compiles ได้ปกติ แต่บ้างครั้งนั้นเราก็สามารถเพิ่ม modifiers ไว้ก่อนก่อนประกาศคลาสได้ โดย Modifiers นั้นแบ่งออกเป็น 2 จำพวกก็คือ

•    Access Modifiers เช่น public, default, protected, private
•    Non-Access Modifiers เช่น strictfp, final, abstract

ซึ่งก็ขึ้นอยู่กับเราครับ ว่าเราต้องการนำไปใช้กับ class หรือ members  ถ้าในระดับ class ก็จะใช้แค่สองชนิดคือ default กับ public แต่ถ้านำไปใช้ในระดับ members (attributes, methods) ก็จะสามารถนำไปใช้ได้ทั้ง 4 ชนิด

•    private หมายถึง ใช้ได้เฉพาะใน class เท่านั้น (จึงไม่มีความจำเป็นที่จะนำไปเป็น class modifiers ครับ)
•    default หมายถึง สามารถใช้งานได้ใน package นี้เท่านั้น
•    protected เหมือนกับ default ครับแต่จะแตกต่างกันที่ subclass ที่ทำการ inherit ตัวมันไปนั้นจะสามารถ access ได้
•    public หมายถึง เปิดให้ทุก package สามารถ access ได้

caps-0016

. Non-Access Modifiers นั้นจะสามารถนำไปใช้งานได้ดังนี้

•    final มีไว้สำหรับนิยาม class, attributes เพื่อระบุว่าคลาสนี้ไม่สามารถ extends ต่อไป ได้อีก หรือถ้านำไปใช้กับ variable ก็จะหมายถึงเราจะไม่สามารถเปลี่ยนแปลงค่าหลังจากการ initialize ได้ เช่นถ้าเราต้องการกำหนดให้ ค่าคงที่ PI = 3.14 แล้วไม่ต้องการให้ใครมาแก้ไขค่าในตัวแปรนี้ ก็ให้เรากำหนดเป็น final เป็นต้น
•    abstract ใช้ขยาย class และ methods ว่า class นี้ไม่สามารถสร้าง instantiate โดยตรงได้ จะต้องสร้าง subclass ขึ้นมาเสียก่อนจึงจะ  instantiate ได้ แต่ถ้าหากเป็น methods ก็จะหมายถึง methods นี้ยังไม่มีการ code ต้องให้ subclass ทำการ implement methods ดังกล่าวเสียก่อน การใช้ abstract ส่วนใหญ่จะระบุใน superclass และเราไม่ต้องการให้ใครมา new object ในระดับของ superclass ได้ โดยที่ตัว methods body ต้องไปทำการ code ที่ฝั่ง subclass

Relate link
-    http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html
-    http://www.narisa.com/forums/index.php?showtopic=7646


Java Refresher #2 Java Identifiers

April 1, 2009

Java identifiers

ประกอบไปด้วย 3 ลักษณะ ดังนี้

-    Legal Identifiers
จะต้องถูกเขียนจาก Unicode characters, number, currency symbols หรือ connecting characters (ตัวอย่างเช่น _)
•    Identifiers ต้องขึ้นต้นด้วยตัวอักษร, $ หรือ _ เท่านั้น ไม่สามารถใช้ ตัวเลขเป็นตัวแรกได้
•    หลังจากตัวอักษรตัวแรก เราสามารถใช้ ตัวหนังสือ, ตัวเลข, $ หรือ _ ได้ทั้งหมด
•    ไม่มีการจำกัดจำนวนตัวอักษรในการตั้งชื่อ
•    ไม่สามารถใช้ java keyword มาเป็นตั้งเป็นชื่อได้
•    Identifiers นั้นเป็นประเภท case-sensitive เช่น foo และ Foo นั้นจะเป็นคนละตัวกัน

-    Sun’s Java Code Conventions
Sun ได้ทำการประเมินว่า lifetime ของการ เขียนโปรแกรม ทั้งหมดนั้น 20% คือ การเขียน ครั้งแรก ส่วนอีก 80% นั้นคือการ ปรับแต่ง และเพิ่มประสิทธิภาพให้การโปรแกรม ดังนั้นจึงได้ทำข้อตกลงของการเขียนโปรแกรมเอาไว้ว่า มันจะต้อง สั้น และง่ายต่อการ อ่าน (ไล่โปรแกรม) สิง่เหล่านี้เป็นสิ่งที่ควรทำ
เราควรหลีกเลี่ยงการเขียนโปรแกรมที่มีการทำงานสองอย่างอยู่ในบรรทัดเดียวกัน หรือมี วงเล็บปีกกาซ้อนกันหลายๆ อันอยู่ในบรรทัดเดียว
•    ชื่อ Class และ interface ควรขึ้นต้นด้วยตัวใหญ่และถ้ามีคำสองคำถูกเชื่อมเข้าด้วยกันคำที่สองก็ควรขึ้นต้นด้วยตัวใหญ่เช่นกัน ตัวอย่างเช่น PrintWriter, Dog, Account เป็นต้น
•    ชื่อ Methods ตัวแรกควรขึ้นต้นด้วยตัวเล็ก เช่น getBalance, doCalculate, setCustomerName
•    ชื่อ Variables ก็เหมือนกันกับ method เพียงแต่ว่าควรเป็นชื่อที่สื่อความหมายได้ดี
•    ชื่อ Constants การสร้าง constants นั้นหมายถึงการ กำหนดค่าตายตัวให้กับ ตัวแปร ดารตั้งชื่อก็จะต้องใช้เป็นตัว ใหญ่ทั้งหมดโดยมี _ เป็นตัวแยก เช่น MIN_HEIGHT

-    JavaBeans Naming Standards
Java Bean ก็คือคลาสที่ประกอบไปด้วย properties ซึ่งเราจะเข้าใจว่า แต่ละ properties นั้นเป็น private variable การที่จะทำการดึงค่าหรือกำหนดค่าให้กับ properties ของ JavaBeans นั้นจำเป้นที่จะต้องทำผ่าน methods ที่เรียกว่า getter, setter เท่านั้น
•    ถ้า properties ไม่ได้เป็นประเภท  boolean ละก็ prefix ของ getter method นั้นก็คือ get ตัวอย่างเช่น getSize()
•    ถ้า properties เป้นประเภท  boolean ละก็ prefix ของการ  getter method ก็คือ is หรือ get เช่น isStopped, getStopped
•    Getter method นั้นจะต้องเป็น public และไม่มี arguments และต้องมี type ที่ return ตรงกับค่าที่รับมาจาก setter ของ properties นั้นๆ

Source File Declaration Rule
ก่อนที่เราจะทำการเจาะลึกลงไปในเนื้อหาของ class declaration นั้น เรามาดูข้อกำหนดของการกำหนดชื่อของ class, import statement, package statement ภายใน source file
•    ใน source file นั้นสามารถมี public class ได้เพียง class เดียว
•    ชื่อ source file นั้นควรมีชื่อเดียวกับ public class ภายใน source file นั้นๆ
•    ถ้าภายในคลาสนั้นมีการใช้งาน package ส่วนของ package นั้นจะต้องอยู่บรรทัดแรกของ source file  ก่อนที่จะ import class ใดๆ เข้ามาใช้งาน
•    ส่วนของการ import class นั้นจะต้องอยู่ระหว่างส่วนของ package และ class
•    ใน source file นั้นสามารถมี non-public class ได้มากกว่าหนึ่งคลาส


Java Refresher #1 Java Concept

March 30, 2009

หลังจากละเลยการอ่านหนังสือเพื่อสอบ Certificate มานาน

วันนี้เลยเริ่มอ่านใหม่ อีกรอบ เริ่มตั้งแต่ บทนำเลยครับ
Identifiers and Keyword
ภาษาจาว่านั้นไม่ว่าจะเป็น classes, variables และ methods นั้นล้วนที่ต้องการ “ชื่อ”
ซึ่งในที่นี้เราจะเรียกมันว่า “identifiers” และเราจะต้องตั้งชื่อมันให้ตรงกับกฏเกนฑ์ที่ถูกวางเอาไว้อีกด้วย โดยเหล่าโปรแกรมเมอร์นั้นได้ร่วมมือกับทาง Sun เพื่อสร้างข้อกำหนดของการตั้งชื่อ classes, methods และ variables

ซึ่งภาษาจาว่านั้นก็คล้ายๆกันกับภาษาอื่นๆ ที่มักจะมี “keywords” ซึ่ง keyword นั้นเป็นข้อยกเว้นในเรื่องกฏของการตั้งชื่อ โดยจะอธิบายในภายหลัง

Inheritance
สิ่งที่สำคัญของจาว่า และภาษาต่างๆที่เป็น Object-Oriented นั้น จะมีหลักการของการทำ “inheritance” ซึ่งมันหมายถึงการที่เราจะนำคลาสที่ได้เขียนไว้แล้วนำมาใช้ใหม่ (reused) ในคลาสอื่นๆ
ในภาษาจาว่านั้น เราสามารถเขียนคลาสแม่เอาไว้  (เรียกว่า superclass) เพื่อทำการ extends ต่อไปออกเป็น subclasses ซึ่ง superclass นั้นจะไม่มีทางรู้เลยว่ามีคลาสใด inherit จากตัวมันไป

แต่ subclasses ที่ทำการ inherit จาก superclass มานั้น จะมีความสัมพันธ์กับ superclass
โดย subclass นั้นจะมี  instance variables และ methods ที่ได้ถูกกำหนดไว้จาก superclass โดยอัตโนมัติ และเรายังสามารถ override methods ที่ได้มาจาก superclass ได้อีกด้วย ซึ่งเราสามารถทำให้ methods ที่ override มานั้นมี behavior ที่แตกต่างออกไปจาก methods เดิมที่มีใน superclass

ยกตัวอย่างเช่น คลาส Car นั้นกำหนด methods แม่แบบให้แก่รถทุกประเภทแต่ คลาส Ferrari นั้น extends มาจาก คลาส Car และทำการ override methods ชื่อ accelerate()

Interface
แน่นอนเลยว่าถ้ามี Inheritance แล้วย่อมต้องมี การทำ Interface ซึ่ง Interface นั้นคล้ายๆกับการทำ abstract superclass ที่จะทำการประกาศ methods ที่ subclass จะต้อง implement แต่ไม่จำเป็นที่จะต้องทราบว่า methods ดังกล่าวนั้นจะต้องเขียนอย่างไร

ยกตัวอย่างเช่นคลาสAnimalImpl ที่ทำการ implement interface ชื่อ Animal นั้นจะต้องมี methods eat() แต่ interface Animal นั้นไม่ได้ระบุว่า methods eat() จะต้องมีลักษณะอย่างไร
นั้นหมายความว่า คลาส AnimalImpl นั้นสามารถเขียน methods eat() อย่างไรก็ได้ ยกตัวอย่างเช่น

methods eat() ของปลา และ eat() ของลิง

ก็มีการลักษณะการ implement ที่แตกต่างกันออกไป เป็นต้น
หลังจากได้อ่าน  บทนำแล้วผมเลยทดลองเขียน โปรแกรมง่ายๆ เพื่อนำ หลักการ Inheritance และการทำ interface class ครับ

ประกอบไปด้วย

1) Animal Class

public interface Animal {
public abstract void eat();
public abstract void move();
}

2) Fish Class

class Fish implements Animal {

public void move() {
System.out.println(“Fish do move = Swim!”);
}

public void eat() {
System.out.println(“Fish do eat = Small feed!”);
}
}

3) Dog Class

class Dog implements Animal {
public void move() {
System.out.println(“Dog do move = Run!”);
}
public void eat() {
System.out.println(“Dog do eat = Bite!”);
}
}

4) AnimalTake class

class AnimalTake {

public static void main(String[] args) {
Fish fish = new Fish();
Dog dog = new Dog();

dog.move();
fish.move();
}
}

โปรแกรมที่เขียนนี้จะแสดงให้เห้นถึงการ inherit, การสร้าง interface class และ การ implements interface

วันนี้ขอจบไว้เพียงเท่านี้ครับ

วันต่อไปจะพูดถึงเรื่อง Identifier & JavaBeans


Install SSL on IBMIHS

October 15, 2008

1. ไปยัง directory ที่ทำการ install IHS เอาไว้ ของผมคือ /data/IBMIHS/

2. สร้าง directory ใหม่ขึ้นมา เพื่อเก็บ key และ csr ในทีนี้ผมสร้าง dir ชื่อ Test

3. เข้าไปใน directory ที่สร้างขึ้นมาแล้วเริ่มสร้าง key ก่อน โดยใช้คำสั่ง “openssl genrsa -des3 -out server.key 1024” จากนั้น ให้กรอก password ของ key ลงไป (จำเอาไว้ด้วย เพราะเดี๋ยวต้องเอาไปใช้ตอน สร้าง csr เพื่อขอ certificate)

4. เมื่อสร้าง key สำเร็จจะได้ไฟล์ชื่อ server.key มา ต่อไปให้สร้าง csr (CSR: Certificate Signing Request)

csr คืออะไร? คือ เรียกง่ายๆ ว่า เป็น public key เพื่อใช้ในการขอ cert จาก พวก verisign วิธีการสร้าง csr ก็ใช้คำสั่ง

openssl req -new -key server.key -out server.csr

เมื่อเราใช้คำสั่งเพื่อสร้าง  csr นั้น มันก็จะถามหา password ของ key ที่เราสร้างไปในขั้นตอนที่สาม และจะถามรายละเอียดของ server ที่เราจะติดตั้ง SSL สิ่งที่สำคัญที่สุดคือ Common Name ตรงนี้ต้องใส่เป็น domain ที่เราต้องการจะทำ SSL ตัวอย่างเช่น “www.sample.com

หลังจากทำขั้นตอนที่ 4 เสร็จ จะได้ไฟล์ ดังนี้ครับ

5. หลังจากเราสร้าง csr สำเร็จก็ให้นำ csr นี้ส่งไปยัง verisign เพื่อให้ทาง verisign ออก cert  กลับมาให้เรา

โดยทาง verisign จะส่งไฟล์ cert.crt กลับมาให้เรา ให้เราทำการ เปลี่ยนนามสกุล เป็น *.cer เ่ช่น cert.crt –> cert.cer ครับ

6. สร้าง p12 เพื่อ  add ลง key database วิธีการสร้าง p12 นั้นจะใช้ไฟล์ ที่สำคัญอยู่ 2 ไฟล์ คือ server.key ที่เราสร้างเอาไว้ในขั้นตอนที่ี 2 และ cert.cer ที่เราได้รับมาจาก verisign ได้เรานำไฟล์ทั้งหมดไปเก็บใน dir เดียวกันเพื่อความสะดวกครับ

คำสั่งที่ใช้ในงานสร้างไฟล์ p12 คือ openssl pkcs12 –export –in cert.cer –inkey server.key –out server.p12

กรอกรหัสผ่านที่ใช้ในการสร้าง server.key อีกครั้งเพื่อทำการ เปรียบเทียบว่าเป็น certificate ตัวเดียวกันหรือไม่

ถ้ารหัสผ่านถูกต้อง จะได้ไฟล์ server.p12 ซึ่งจะนำเอาไปใช้ในขั้นตอนต่อไป

7.ไปที่ directory /data/IBMIHS/bin และใช้คำสั่ง ./ikeymanเพื่อเปิดโปรแกรม

IBM Key Management ขึ้นมา จะพบกับหน้าจอดังภาพด้านล่างนี้

8. จากเมนูด้านบนให้เลือก “Key Database File -> New ”

9. เลือกประเภท “CMS” และตั้งชื่อไฟล์ตามที่ต้องการและเลือก Path ที่ต้องการเก็บ Key เอาไว้ดังภาพ

ระบบจะให้ตั้งรหัสผ่าน และ ให้เลือก Stash the password to a file? และกด ok หากสร้างได้สำเร็จจะพบหน้าจอดังรูปด้านล่างนี้

10. จากนั้นให้ทำการ Add Signer-Certificates ลงไปเนื่องจาก Certificate ที่ทาง VeriSign ได้ออกมาให้นั้นใน Database File ยังไม่มี ข้อมูลของ Signer ดังกล่าว

ข้อมูลของ Signer นั้นสามารถ Download ได้จากเวบไซต์ของ VeriSign

11. หลังจากที่ได้เพิ่ม Signer-Certificates แล้วให้ทำการ Add Personal Certificates

ทำการ Import server.p12 ที่ได้สร้างเอาไว้ในขั้นตอนก่อนหน้านี้

เมื่อกด OK จะเสร็จขั้นตอนการ เพิ่ม Personal Certificates ลงสู่ Key Database File ที่ได้สร้างในขั้นตอนก่อนหน้านี้

12. เข้าไปกำหนด Config ในไฟล์ httpd.conf เพื่อเปิดใช้งาน SSL ด้วย Key Database ที่ได้สร้างเอาไว้

13. ทำการ Restart Apache เพื่อทำให้อ่านค่า Config ใหม่ที่ได้การแก้ในขั้นตอนที่ 12

โดยใช้คำสั่ง ./apachectl restart


Follow

Get every new post delivered to your Inbox.