CentOS6.5安装testlink1.9.14

来源:互联网 发布:安徽中港数据 编辑:程序博客网 时间:2024/06/06 09:49

前提条件:准备一台CentOS6.5虚拟机,配置好IP,关闭iptables和selinux。

这里提供上我的云盘软件,可以去这里下载:http://pan.baidu.com/s/1qXymele

1.   首先安装Apache软件

     首先在系统上面查询一下是否已经安装了apache 软件:rpm -qa|grep httpd

     如果没有,使用yum安装:yum -y install httpd

     chkconfig    httpd  on

     service httpd start  启动软件

     http://127.0.0.1/


2.   追加CentOS 6.5的epel及remi源

     rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

     rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
     使用yum list命令查看可安装的包(Packege)。
     yum list --enablerepo=remi --enablerepo=remi-php56 | grep php

3.   yum源安装好了,下一步配置PHP5.6
     yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof 

4.   用php命令查看版本
     php --version
     [root@localhost ~]# php --version
     PHP 5.6.16 (cli) (built: Nov 26 2015 08:01:30)
     Copyright (c) 1997-2015 The PHP Group
     Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
     with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
     with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans

5.   安装mysql
     rpm -qa|grep mysql
     如果没有安装,则使用yum源进行安装
     yum -y install mysql-server mysql-client
     启动mysql服务:/etc/init.d/mysqld start
     mysql -u root -p    初始密码为空
     进入设置mysql密码:set password for root@localhost=password('新密码');
     exit
     重新进入mysql时需要所设置的密码

6.   安装phpMyAdmin
     去官网下载:phpMyAdmin-3.5.7-all-languages.tar
     gunzip phpMyAdmin-3.5.7-all-languages.tar.gz
     tar xvf phpMyAdmin-3.5.7-all-languages.tar
     mv phpMyAdmin-3.5.7-all-languages phpmyadmin
     把phpmyadmin包放置在/var/www/html目录下
     进入到/var/www/html/phpmyadmin目录下,cp config.sample.inc.php config.inc.php
     chmod 777 /var/www/html
     重启服务:service httpd restart
     在浏览器中测试phpmyadmin安装是否成功:
     http://127.0.0.1/phpmyadmin    出现phpmyadmin的登录页面即成功。

7.   下载testlink1.9.14安装包,如第六步解压命名方式,
     把testlink包放在/var/www/html目录下,进入testlink目录:
     vim config.inc.php修改如下几项:
    
     $g_repositoryPath = '/var/testlink/upload_area/';      该路径可默认
     $tlCfg->log_path = '/var/testlink/logs/';              该路径可默认
     $tlCfg->default_language = 'zh_CN';           修改
     $tlCfg->config_check_warning_mode = 'SILENT'; 修改

     若上面两个路径没有改动,新建这两个路径:
     cd /var
     mkdir testlink
     cd testlink
     mkdir logs
     mkdir upload_area
     修改这两个目录的权限    chmod 777 logs
                             chmod 777 upload_area
     cd ..
     chmod -R 777 testlink
     重新启动apache服务:service httpd restart
    
     安装testlink
     http://127.0.0.1/testlink    进入testlink安装页面,点击new installation,
     设置数据库账号密码(账号root,密码默认情况为空)
     设置操作testlink数据库的账号和密码(账号为admin,密码为admin)

     +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     安装过程中如果出现如下错误:
     TestLink setup will now attempt to setup the database:

     Creating connection to Database Server:OK!

     Connecting to database `testlink`:OK!
     Creating Testlink DB user `testlink`:OK! (ok - user_exists ok - grant assignment) 
     Processing:sql/mysql/testlink_create_tables.sql
     OK!
     Writing configuration file:Failed!

     TestLink couldn't write the config file. Please copy the following into the ../config_db.inc.php file:
     <?php
        // Automatically Generated by TestLink Installer
        define('DB_TYPE', 'mysql');
        define('DB_USER', 'root');
        define('DB_PASS', 'password');
        define('DB_HOST', 'localhost');
        define('DB_NAME', 'testlink');
        define('DB_TABLE_PREFIX', '');
?>

Once that's been done, you can log into TestLink by pointing your browser at your TestLink site.

解决方式:
在testlink目录中创建config_db.inc.php文件,并拷贝php的代码即可

[cpp]view plaincopyprint?
  1. [root@NanjingBaseServer testlink]$ vim config.inc.php  
  2. [root@NanjingBaseServer testlink]$ touch config_db.inc.php; vim config_db.inc.php  

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
登陆:
http://192.168.1.28/testlink
默认登陆账号密码都是admin




    

0 0