Noyzi!!a’s Blog


Gentoo - FreeRadius and MySQL

Posted in Gentoo, Linux by Noyzi!!a on the May 31st, 2007

การติดตั้ง FreeRadius บน Gentoo Linux โดยใช้ MySQL เป็นฐานข้อมูลครับ

install freeradius

USE=”mysql” emerge -av freeradius

สร้างฐานข้อมูลสำหรับเก็บข้อมูลของ freeradius โดยในที่นี้เราใช้ชื่อฐานข้อมูลว่า radius

mysql -u root -p
CREATE DATABASE radius;

ในที่นี้ผมใช้ root นะครับถ้าใครต้องการสร้าง user ให้ใช้งานได้อีกก็เพิ่มข้างล่างนี้ลงไป

GRANT ALL PRIVILEGES ON radius.* to ‘radiususer’@'localhost’ IDENTIFIED BY ‘radiuspass’;

จากนั้นก็สร้าง tables โดยใช้ sql script จาก freeradius นะครับโดยจะอยุ่ที่ /usr/share/doc/freeradius-<–version–>/examples/mysql.sql

cat /usr/share/doc/freeradius-1.1.3-r2/examples/mysql.sql | mysql -u radiususer -p radius

จากนั้นแก้ไขไฟล์ /etc/raddb/sql.conf ให้ตรงตามค่าที่เราใช้

# Connect info
server = “localhost”
login = “root”
password = “**********************”
# Database table configuration
radius_db = “radius”

จากนั้นแก้ไฟล์ /etc/raddb/radiusd.conf ให้เลือกใช้ sql ในการตรวจสอบ
อันคอมเม้นบรรทัด sql ออก

accounting {
unix
radutmp
sql
}

อ้างอิงจาก
http://gentoo-wiki.com/HOWTO_Chillispot_with_FreeRadius_and_MySQL

http://gotoknow.org/blog/linux/5905

4 Responses to 'Gentoo - FreeRadius and MySQL'

Subscribe to comments with RSS or TrackBack to 'Gentoo - FreeRadius and MySQL'.

  1. chuan said,

    on December 20th, 2007 at 2:14 pm

    พอดีทำบริการ Radius Server พร้อมระบบจัดการ เลยมาแนะนำคับ http://www.easyzonecorp.net - Radius Server and Billing Module

  2. Noyzi!!a said,

    on January 7th, 2008 at 4:42 pm

    :)

  3. Spl1nt3rC3ll said,

    on April 11th, 2008 at 1:25 pm

    My best friend has this kind of website. It’s so much better than this one. So you better go away from here

  4. londra said,

    on September 14th, 2008 at 3:41 am

    вы знаете данные по муравея о этом в других языках?

Leave a Reply