install

MSDE and SAPWD

MSDE is short for Microsoft Database Engine. It uses the same engine with SQL Server 2000 with some limitations. It comes with the minimal but hard-to-use osql command and no GUI.

The installation step is somewhat complicated. To install MSDE, the installer will not let you install the database engine unless you supply the sa password so you can't just double click on Setup file and wait for the rest. But you must run the installer from command prompt instead. And the problem begins

Normally, at least in linux, a space works as a separator for arguments, It doesn't work with MSDE installer. So this following command doesn't work.

C:\MSDERelA>setup /sapwd passwordhere

It took me about 10 minutes to figure out how I did it many years ago. And I tried with this.

C:\MSDERelA>setup sapwd=passwordhere

Then everything was clear to my mind. I feel happy Microsoft provides us with SQL Server Express with easier to use tools and installer since 2005.

PS. To enter the instance name at the setup time, use "instancename" parameter.

C:\MSDERelA>setup sapwd=passwordhere  INSTANCENAME="NetSDK"

Welcome to Pylons

ลง Pylons ใช้มันก็ง่ายๆครับ ก่อนอื่นลง Setuptools ให้เรียบร้อยก่อน ใครใคร่ลงแบบไหนก็ตามสบาย ตัวผมเองเลือกลงแบบ virtual python ลองทำดูไม่ยากอะไร

พอลง setuptools เสร็จก็ได้เวลาลง pylons ด้วยการพิมพ์

easy_install Pylons==0.9.6.2

เพื่อบอกว่าจะเอา 0.9.6.2 มา แต่ถ้าไม่ระบุเวอร์ชันก็จะได้ล่าสุด ณ ปัจจุบันคือ 0.97rc1 มาแทน รอซักพัก พอเห็นพร้อมท์ขึ้นมาอีกทีก็แปลว่าลงเสร็จแล้ว

ลองสร้าง Project ดูด้วย paste

paster create -t pylons helloproject

ตอบคำถามเรื่อง template กับ SQLAlchemy ผ่านก็จะได้ project มาหนึ่งอันชื่อ helloproject

ไม่ต้องพูดพร่ำทำเพลง เปิดขึ้นมารันซะ

cd helloproject paster serve --reload development.ini

ถ้ารันได้ก็ลองวิ่งไปที่ http://localhost:5000/ ต้องเห็นหน้าตาประมาณนี้ Pylons (รูปจาก vee's blog) ต่อไปสร้าง controller ด้วยคำสั่ง

paster controller hello

แล้วลองเข้า http://localhost:5000/hello/index ดู ต้องมีคำว่า Hello World ปรากฏ

Hello world

ก็ง่ายๆแค่นี้แหละ ด้วยรักและไพลอนส์