How to Build TestLink
Reference:
http://www.cnblogs.com/fnng/archive/2011/11/24/2262357.html
http://www.ossxp.com/doc/testlink/admin_guide/admin_guide.html#id7
http://www.diybl.com/course/7_databases/mysql/Mysqljs/20110813/558038.html
http://wiki.ubuntu.org.cn/MySQL安裝指南
http://www.nhlcgz.com/blog/u/21/archives/2000/347.html (MySQL 忘記密碼解決辦法)
安裝MySQL
sudo apt-get install mysql-server
密碼少了不安全,多了會經常忘記。這不,把家裡Ubuntu中mysql的root密碼給忘記了,在網上兜了一圈,終於找到解決的辦法。
1、先把mysql給停了
lin@ubuntu:~$ sudo /etc/init.d/mysql stop
2、估計是進入安全模式
sudo mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3、登入mysql
輸入mysql -u root mysql
4、修改密碼,注意這裡要用Password這個函數來設定密碼。現在假設密碼重設為123456。一開是我用set password='123456',始終登入不進去,後來才發現要加個函數,沒詳細瞭解這個password()函數,估計是md5吧。
mysql> update user set password=password('123456') where user='root';
mysql> flush privileges;
mysql> quit
5、一切順利後,重啟mysql
lin@ubuntu:~$ sudo /etc/init.d/mysql restart
終於把密碼給搞定了。
TestLink LDAP 配置
/** LDAP authentication credentials */
$tlCfg->authentication['ldap_server'] = '';
$tlCfg->authentication['ldap_port'] = '3268';
$tlCfg->authentication['ldap_version'] = '3'; // could be '2' in some cases
$tlCfg->authentication['ldap_root_dn'] = '';
$tlCfg->authentication['ldap_organization'] = ''; // e.g. '(organizationname=*Traffic)'
$tlCfg->authentication['ldap_uid_field'] = 'sAMAccountName'; // Use 'sAMAccountName' for Active Directory
$tlCfg->authentication['ldap_bind_dn'] = ''; // Left empty for anonymous LDAP >
$tlCfg->authentication['ldap_bind_passwd'] = ''; // Left empty for anonymous LDAP binding
$tlCfg->authentication['ldap_tls'] = false; // true -> use tls
PS :在設定LDAP認證之後,直接登入會失敗,需要用網域名稱註冊一下,(註冊的時候不會要求輸入密碼),然後採用網域名稱和域密碼登入。
登入成功之後,進入mysql資料庫修改使用者權限
Then go into mysql (mysql -u root -p testlink) and make yourself an admin:
update users set role_id=8 where id=2;
Assuming that you are the first user you created (admin is id=1) (see the users table and the roles table for more information). Now go back and log into the web interface.