สวัสดีครับ...ก็เรามันจนนี่น่ามีตังค์ซื้อโฮสแต่ไม่มีตังค์ซื้อ Cpanel บังเอิ๊ญบังเอิญในโฮสติ้งตัวนี้ดันมียุหลายโดเมนหน่ะสิ งานเข้าซะแล้วเรา จะเปิด register_globals = On ไว้ก็กะไรยุ จะ Off ไว้บางเว็บก็รันไม่ขึ้น โชคดีที่ทำ Vhost ไว้ ถ้าเป็น Apache2 ก็แจ่มเลยครับ เข้าไปแก้ที่ apache2/extra/httpd-vhost.conf แล้วเพิ่มบรรทัดนี้เข้าไปในโดเมนที่เราต้องการเปิด register_globals = On ไว้ตามนี้นะครับ
php_admin_flag register_globals on
จากนั้นสั่ง restart service apache อีกครั้งด้วยคำสั่งดังนี้
/usr/local/etc/rc.d/apache2 restart (Base on FreeBSD)
เพียงเท่านี้ก็เรียบร้อยแล้วคร๊าบบบพี่น้อง
Wednesday, August 17, 2011
Wednesday, August 10, 2011
ย้ายโฮสติ้งให้ Drupal 6
สำหรับการใช้ CMS นั้นนะครับ ปัญหาอย่างหนึ่งที่เรามักจะพบอยู่บ่อย ๆ นั้นก็คือปัญหาด้านการดูแล ในกรณีที่มีการย้ายโฮสติ้งให้กับระบบ Drupal แต่ต้องการใช้ฐานข้อมูลตัวเดิม หลังจากที่เราอัปโหลดเว็บขึ้นไปยังโฮสติ้งตัวใหม่เป็นที่เรียบร้อยแล้ว เราจะไม่สามารถเรียกใช้เว็บนั้นได้ทันทีทันใด เนื่องจาก CMS จากค่าย Drupal จะต้องมีขั้นตอนการสั่ง Build Module และ Themes ซึ่งขั้นตอนการทำตามนี้ครับ
1. เรียกเข้าไปยังเว็บไซต์ของเราด้วยการใช้ Query String เข้ามาช่วยดังนี้ครับ http://www.your-domain.com/?q=user
2. ผลจากการใช้ Qurey String ดังกล่าวข้างต้นจะมีหน้าจอให้เราทำการ Login ให้เรากรอกชื่อผุ้ใช้ และรหัสของผู้ดูแลระบบเข้าไปนะครับ
3. เมื่อ Login เข้ามาในระบบได้แล้วให้สั่ง Build Module ด้วยการใช้ query string ตามนี้ http://www.your-domain.com/?q=admin/build/modules ให้เลือกบันทึกค่าในหน้านี้
4. ขั้นตอนสุดท้ายสั่ง Build Themes ด้วยการใช้ query string ตามนี้ http://www.your-domain.com/?q=admin/build/themes แล้วให้เลือก themes ที่เราต้องการใช้
เพียงเท่านี้เราก็จะได้เว็บ Drupal กลับมาใช้งาน หรือเปิดให้บริการได้เหมือนเดิมแล้วครับ
อ้างอิงจาก http://drupal.org/node/376202
1. เรียกเข้าไปยังเว็บไซต์ของเราด้วยการใช้ Query String เข้ามาช่วยดังนี้ครับ http://www.your-domain.com/?q=user
2. ผลจากการใช้ Qurey String ดังกล่าวข้างต้นจะมีหน้าจอให้เราทำการ Login ให้เรากรอกชื่อผุ้ใช้ และรหัสของผู้ดูแลระบบเข้าไปนะครับ
3. เมื่อ Login เข้ามาในระบบได้แล้วให้สั่ง Build Module ด้วยการใช้ query string ตามนี้ http://www.your-domain.com/?q=admin/build/modules ให้เลือกบันทึกค่าในหน้านี้
4. ขั้นตอนสุดท้ายสั่ง Build Themes ด้วยการใช้ query string ตามนี้ http://www.your-domain.com/?q=admin/build/themes แล้วให้เลือก themes ที่เราต้องการใช้
เพียงเท่านี้เราก็จะได้เว็บ Drupal กลับมาใช้งาน หรือเปิดให้บริการได้เหมือนเดิมแล้วครับ
อ้างอิงจาก http://drupal.org/node/376202
Tuesday, January 4, 2011
คำสั่งตรวจสอบสถาปัตยกรรม CPU ของ Linux
(บันทึกกันลืม)
#uname -m
#uname -a
#cat /proc/cpuinfo
#getconf -a | grep FILESIZEBITS
#uname -m
#uname -a
#cat /proc/cpuinfo
#getconf -a | grep FILESIZEBITS
Wednesday, July 7, 2010
How to Install and Configure Webmin (Web-based Interface) base on FreeBSD 8.0
สวัสดีชาวโอเพ่นซอร์สทุกท่านนะครับ หลังจากไม่ได้เข้ามานานเลย วันนี้ไม่ขอเกริ่นยาว สำหรับผู้ที่ไม่สะดวกที่จะรีโมทเข้ามายังเครื่องแม่ข่าย หากเป็นผม ผมคงต้องเลือกใช้ Web-based Interface แน่นอนครับ ในที่นี้ผมใช้ Webmin (Install with FreeBSD 8.0) ผมขออนุญาติบันทึกกันลืมก็แล้วกันครับ
1. Upgrade port tree.
#portsnap fetch update (อัปพอร์ตให้เป็นปัจจุบันก่อนนะครับ)
2. Install webmin with port (ตามคำสั่งด้านล่างนี้เลยครับ)
#cd /usr/ports/sysutils/webmin
#make install clean (หลังจากเข้าไปใน port tree แล้วก็สั่ง install เลยครับ จิบกาแฟรอสักครู่ 555+)
3. Configure rc.conf (สั่งให้ webmin ทำงานทุกครั้งที่เปิดเครื่อง)
#vi /etc/rc.conf
webmin_enable="YES" <-- เพิ่มบรรทัดนี้เข้าไปครับ
4. ขั้นตอนสุดท้าย เราจะทำการ Setup script ให้กับ webmin ด้วยคำสั่งด้านล่างนี้นะครับ
#/usr/local/lib/webmin/setup.sh
ผลลัพธ์จากการใช้คำสั่งดังกล่าว (ทำตามขั้นตอนในหน้าจอได้เลยครับ)
***********************************************************************
* Welcome to the Webmin setup script, version 1.420 *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin in /usr/local/lib/webmin ...
***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Log file directory [/var/log/webmin]: [Press Enter]
***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl): [Press Enter]
Testing Perl ...
Perl seems to be installed ok
***********************************************************************
Operating system name: FreeBSD
Operating system version: 8.0
***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
- What port to run the web server on. There must not be another
web server already using this port.
- The login name required to access the web server.
- The password required to access the web server.
- If the webserver should use SSL (if your system supports it).
- Whether to start webmin at boot time.
Web server port (default 10000): [Press Enter]
Login name (default admin): [Press Enter]
Login password: [type password]
Password again:
Use SSL (y/n): y
***********************************************************************
Creating web server config files..
..done
Creating access control file..
..done
Creating start and stop scripts..
..done
Copying config files..
..done
Changing ownership and permissions ..
..done
Running postinstall scripts ..
..done
เป็นอันเสร็จสิ้นการติดตั้ง webmin แล้วครับ ส่วนวิธีการเรียกใช้งานก็สามารถเรียกผ่าน Browser ได้เลยครับ
https://your-domain.com:10000/
หรือจะเรียกเป้นไอพีเลยก็ได้ครับ
https://your-server-ip:10000/
Enjoy...
1. Upgrade port tree.
#portsnap fetch update (อัปพอร์ตให้เป็นปัจจุบันก่อนนะครับ)
2. Install webmin with port (ตามคำสั่งด้านล่างนี้เลยครับ)
#cd /usr/ports/sysutils/webmin
#make install clean (หลังจากเข้าไปใน port tree แล้วก็สั่ง install เลยครับ จิบกาแฟรอสักครู่ 555+)
3. Configure rc.conf (สั่งให้ webmin ทำงานทุกครั้งที่เปิดเครื่อง)
#vi /etc/rc.conf
webmin_enable="YES" <-- เพิ่มบรรทัดนี้เข้าไปครับ
4. ขั้นตอนสุดท้าย เราจะทำการ Setup script ให้กับ webmin ด้วยคำสั่งด้านล่างนี้นะครับ
#/usr/local/lib/webmin/setup.sh
ผลลัพธ์จากการใช้คำสั่งดังกล่าว (ทำตามขั้นตอนในหน้าจอได้เลยครับ)
***********************************************************************
* Welcome to the Webmin setup script, version 1.420 *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin in /usr/local/lib/webmin ...
***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Log file directory [/var/log/webmin]: [Press Enter]
***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl): [Press Enter]
Testing Perl ...
Perl seems to be installed ok
***********************************************************************
Operating system name: FreeBSD
Operating system version: 8.0
***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
- What port to run the web server on. There must not be another
web server already using this port.
- The login name required to access the web server.
- The password required to access the web server.
- If the webserver should use SSL (if your system supports it).
- Whether to start webmin at boot time.
Web server port (default 10000): [Press Enter]
Login name (default admin): [Press Enter]
Login password: [type password]
Password again:
Use SSL (y/n): y
***********************************************************************
Creating web server config files..
..done
Creating access control file..
..done
Creating start and stop scripts..
..done
Copying config files..
..done
Changing ownership and permissions ..
..done
Running postinstall scripts ..
..done
เป็นอันเสร็จสิ้นการติดตั้ง webmin แล้วครับ ส่วนวิธีการเรียกใช้งานก็สามารถเรียกผ่าน Browser ได้เลยครับ
https://your-domain.com:10000/
หรือจะเรียกเป้นไอพีเลยก็ได้ครับ
https://your-server-ip:10000/
Enjoy...
Friday, July 17, 2009
HP DL120 G5 and DL380 G5 VS FreeBSD 7.2 (Part I)
สวัสดีครับพี่น้อง ไม่ได้เข้ามาอัปเดรตบล็อคตัวเองซะนานเลย ช่วงนี้ได้ Server มาใหม่สามตัว เป็น HP DL120 G5 หนึ่งตัว และ HP DL380 G5 อีกสองตัว ก็เลยจับลง FreeBSD 7.2 ซะให้รู้แล้วรู้รอดไปเลย ผลการติดตั้ง ปรากฏว่าเวิร์กครับ เจ้า FreeBSD 7.2 สามารถมองเห็น RAID Controller ของทั้งสองรุ่นนี้ได้อย่างไม่มีปัญหา หลังจากติดตั้งเสร็จก็จัดการ Update ports ด้วยคำสั่งนี้ครับ
#cd /usr/ports/net/cvsup-without-gui
#make install && make clean
#rehash
จากนั้นทำการ Synchronize ports index กับ cvsup server ที่ทาง FreeBSD Engineer หรือ Mirror ได้จัดเตรียมไว้ให้ ด้วยคำสั่งนี้ครับ
#/usr/local/bin/cvsup -g -L 2 -h cvsup2.freebsd.org /usr/share/examples/cvsup/ports-supfile
จากนั้นเคาะ enter 1 ครั้ง แล้วอดใจรอสักครู่ (ช้าหรือเร็วขึ้นอยู่กับ Bandwith ท่านนะครับ) เมื่อเรียบร้อยทุกอย่างแล้ว เราก็สั่งให้ FreeBSD fetch index เพื่อทำการปรับปรุง pkg ต่าง ๆ ใน ports ให้เราด้วยคำสั่งนี้
#cd /usr/ports && make fetchindex
ก็เป็นอันเสร็จสิ้นกระบวนการ update ports เรียบร้อยแล้วครับ เดี๋ยวตอนต่อไปผมจะ guide เรื่องของการติดตั้ง FAMP บน FreeBSD 7.2 ให้สาวก FreeBSD ได้เป็นแนวทางในการ Config web server. สำหรับบทความนี้แค่นี้ก่อนนะครับ
Good luck && Enjoin.
#cd /usr/ports/net/cvsup-without-gui
#make install && make clean
#rehash
จากนั้นทำการ Synchronize ports index กับ cvsup server ที่ทาง FreeBSD Engineer หรือ Mirror ได้จัดเตรียมไว้ให้ ด้วยคำสั่งนี้ครับ
#/usr/local/bin/cvsup -g -L 2 -h cvsup2.freebsd.org /usr/share/examples/cvsup/ports-supfile
จากนั้นเคาะ enter 1 ครั้ง แล้วอดใจรอสักครู่ (ช้าหรือเร็วขึ้นอยู่กับ Bandwith ท่านนะครับ) เมื่อเรียบร้อยทุกอย่างแล้ว เราก็สั่งให้ FreeBSD fetch index เพื่อทำการปรับปรุง pkg ต่าง ๆ ใน ports ให้เราด้วยคำสั่งนี้
#cd /usr/ports && make fetchindex
ก็เป็นอันเสร็จสิ้นกระบวนการ update ports เรียบร้อยแล้วครับ เดี๋ยวตอนต่อไปผมจะ guide เรื่องของการติดตั้ง FAMP บน FreeBSD 7.2 ให้สาวก FreeBSD ได้เป็นแนวทางในการ Config web server. สำหรับบทความนี้แค่นี้ก่อนนะครับ
Good luck && Enjoin.
Subscribe to:
Posts (Atom)