TAG:
作者:何千军 文章来源:开放系统世界——赛迪网 2002年11月22日 安装RADIUS Server 要安装整套的IC-RADIUS,首先我们需要如表9所示的几个软件包。需要说明一下:表9中的源码包都是免费得到的,它们可以帮助我们架设一个完整的RADIUS应用环境。 软件源码包 说明 mysql-3.23.39.tar.gz MySQL数据库系统 DBI-1.18.tar.gz Perl调用数据库的通用接口 Msql-Mysql-modules-1.2216.tar.gz Perl DBI针对MySQL的Driver,即DBD for MySQL RadiusPerl-1.05.tar.gz Perl对Radius的Authen模块 icradius-0.18.1.tar.gz IC-RADIUS源码包 假设所有的原码包都被拷贝到了/usr/tmp目录下了。 安装MySQL 1.解压源码包: Linux]#cd /usr/tmp Linux]#gzip zxvf mysql-3.23.39.tar.gz Linux]#cd mysql-3.23.39 2.配置参数,安装软件: //将mysql安装在/usr/local/mysql中 Linux]#./configure prefix=/usr/local/mysql Linux]#make //编译,时间有点长,要有耐心 Linux]#make install //安装到/usr/local/mysql中 3.创建初始数据库: Linux]#cd /usr/local/msyql/bin Linux]#./mysql_install_db 4.创建共享库链接 Linux]#ldconfig //更新系统共享库链接 5.复制启动/停止脚本: Linux]#cp /usr/tmp/mysql-3.23.39/support-files/mysql.server /etc/rc.d/init.d/mysql.server 6.复制并修改初始化配置文件: Linux]#cp /usr/tmp/mysql-3.23.39/support-files/my-medium.cnf /etc/my.cnf 使用vi打开my.cnf,在[client]下加入user=root,password处留空。 7.改变root口令: Linux]#mysqladmin u root p password ‘新口令’ 8.如果有多个版本的mysql共存 在/etc/my.cnf的[mysqld]下加入: 1. Log-bin 2. Server-id=1 //必须是唯一的,以区别于其他的mysql.server的id 安装DBI Linux]#cd /usr/tmp Linux]#tar zxvf DBI-1.18.tar.gz Linux]#cd DBI-1.18 Linux]#perl Makefile.PL Linux]#make test //如果测试不通过,则使用make test TEST_VERBOSE=1 Linux]#make install 安装DBD for MySQL Linux]#cd /usr/tmp Linux]#tar zxvf Msql-Mysql-modules-1.2216.tar.gz Linux]#cd Msql-Mysql-modules-1.2216 Linux]#perl Makefile.PL 这时,系统开始和用户交互,如下: MySQL only mSQL only (either of mSQL 1 or mSQL 2) MySQL and mSQL (either of mSQL 1 or mSQL 2) mSQL 1 and mSQL 2 MySQL,mSQL1andmSQL2 Enter the appropriate number: [3] 1 在我们这里的需求,应该回答1(说明此模块是同时for MySQL和mSQL的) Do you want to install the MysqlPerl emulation? You might keep your old Mysql module (to be distinguished from DBD::mysql!) if you are concerned about compatibility to existing applications! [n] n 这里回答n Where is your MySQL installed? Please tell me the directory that contains the subdir ''include''. [/usr/local/mysql]? 这是缺省的mysql安装目录,我们已经按照上面的方式安装,则MySQL自动被安装到这个目录下,则这里直接回车即可 Which database should I use for testing the MySQL drivers? [test] 直接回车即可 On which host is database test running (hostname, ip address or host:port) [localhost]? 若mysql服务器和icradius服务器安装在同一个服务器上 则这里直接回车即可 User name for connecting to database test? [undef] root? root Password for connecting to database test? [undef] passwd? 这里输入mysql的root用户的密码 make make test make install (何千军) |