• Linux下搭建Testlink1.9.17


    软件准备

    需要搭建LAMP环境,下载testlink安装包:

    1. 搭建LAMP所需的集成包 xampp-linux-x64-7.2.11-0-installer.run 下载地址
    2. testlink-1.9.17.tar.gz 下载地址

    安装XAMPP

    1.检查系统中是否有LAMP,分别检查这四个包,如果有则一个个删除
    2.安装XAMMP,下载后以root身份进入所在目录:
     #chmod 755 xampp-linux-x64-7.2.11-0-installer.run  
     #./xampp-linux-x64-7.2.11-0-installer.run  
    

    执行安装就可以了

    配置XAMPP

    • 开启XAMPP服务设置密码
     #/opt/lampp/lampp start  
    

    默认安装的是开发模式,此条命令可以进入设置MySQL、Apache、PHP的用户名、密码

    XAMPP: Quick security check...  XAMPP: Your XAMPP pages are NOT secured by a password.  XAMPP: Do you want to set a password? [yes] yes  XAMPP: Password:  
    XAMPP: Password (again):   
    XAMPP: Password protection active. Please use 'lampp' as user name!  XAMPP: mysql is accessable via network.  XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes  XAMPP: Turned off. 
    XAMPP: Stopping MySQL... 
    XAMPP: Starting MySQL... 
    XAMPP: The MySQL
    phpMyAdmin user pma has no password set!!!  XAMPP: Do you want to set a password? [yes] yes 
    XAMPP: Password:  
    XAMPP: Password (again):  
    XAMPP: Setting new MySQL pma password. 
    XAMPP: Setting phpMyAdmin's pma password to the new one. 
    XAMPP: MySQL has no root passwort set!!! 
    XAMPP: Do you want to set a password? [yes] yes 
    XAMPP: Write the password somewhere down to make sure you won't forget it!!! 
    XAMPP: Password:   
    XAMPP: Password (again):  
    XAMPP: Setting new MySQL root password. 
    XAMPP: Change phpMyAdmin's authentication method. 
    XAMPP: The FTP password for user 'nobody' is still set to 'lampp'. 
    XAMPP: Do you want to change the password? [yes] yes 
    XAMPP: Password:  
    XAMPP: Password (again):  
    XAMPP: Reload ProFTPD... 
    XAMPP: Done.

    • 配置php.ini文件
    #vim /opt/lampp/etc/php.ini  
    

    延长session时间

    session.gc_maxlifetime = 2880

    修改参数

    max_execution_time = 120

    将内存由8M改为64M

    memory_limit = 64M


    关闭防火墙服务

     # systemctl stop firewalld.service

    永久关闭

     #chkconfig --level 35 iptables off  
    

    安装Testlink

    1.将下载的包解压到/lampp/htdocs/下 (tar -zxvf testlink-1.9.17.tar.gz),重命名为testlink
    2.创建数据库并新建用户(可以使用shell命令,也可以直接访问phpmyadmin进行操作)
     #cd /opt/lampp/bin/  
     #./mysql -uroot -ppassword  
     >create database testlink;  
     >grant all privileges on testlink.* to testlink@"localhost" identified by "<password>"  
    >flush privileges;
    3.打开浏览器,访问http://localhost/testlink进入安装页面(也可以在本地远程访问,只需把localhost改为服务器的地址)

    安装过程中:

    database type:MYSQL
    database host:localhost
    database name :testlink

    填写MYSQL数据库用户名和密码

    Database login: root
    Database password: password

    填写testlink数据库的登录帐号和密码

    testlink DB login: testlink
    testlink DB password: password

    完成。

    1. 如果报错:

    Checking if /var/testlink/logs/ directory exists [S] </B<< td>    Failed!
    Checking if /var/testlink/upload_area/ directory exists [S] </B<< td>  Failed!

    解决方案:修改/opt/lampp/htdocs/testlink/config.inc.php文件:

    $ vim /opt/lampp/htdocs/testlink-1.9.16/config.inc.php
    进入vim模式
    /$tlCfg->log_path = '/var/testlink/logs/'; /* unix example */
    [I]
    注释:/$tlCfg->log_path = '/var/testlink/logs/'; /* unix example */
    添加:$tlCfg->log_path = '[安装目录路径]/testlink/logs/';
    [esc]
    /$g_repositoryPath = '/var/testlink/upload_area/'; /* unix example */
    [I]
    注释:$g_repositoryPath = '/var/testlink/upload_area/'; /* unix example */
    添加:$g_repositoryPath = '[安装目录路径]/testlink/upload_area/';
    [esc]
    :wq
    退出vim模式

    注意:testlinkDir 表示安装目录路径

    2. 如果再报“directory is writable (by user used to run webserver process)”的错误,需要给TestLink目录下的upload_area、gui/templates_c和templates_c文件设置777权限:

    $ chmod 777 /opt/lampp/htdocs/testlink-1.9.17/upload_area/
    $ chmod 777 /opt/lampp/htdocs/testlink-1.9.17/logs/
    $ chmod 777 /opt/lampp/htdocs/testlink-1.9.17/gui/templates_c/

    3. 如果在页面上会显示“Deprecated : …… phpmailer/PHPMailerAutoload.php on line 45”这样的提示文本,需要修改参数:

    $ vi /opt/lampp/htdocs/testlink-1.9.17/third_party/phpmailer/PHPMailerAutoload.php
    进入vi模式
    /function __autoload($classname)
    [I]
    修改为:function spl_autoload_register($classname)
    [esc]
    :wq
    退出vi模式
    3. 如果在页面上会显示“Deprecated : …… phpmailer/PHPMailerAutoload.php on line 45”这样的提示文本,需要修改参数:

    Please copy the following into the ../config_db.inc.php file:
    <?php
    // Automatically Generated by TestLink Installer
    define('DB_TYPE', 'mysql');
    define('DB_USER', 'testlink');
    define('DB_PASS', '<your passwork>');
    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里就可以啦



  • 相关阅读:
    日期格式
    v-model修饰符
    从0到1构建全栈知识体系
    Element组件,v-for循环,表单验证方法
    上传文件转换为base64图片
    gulp4进阶
    gulp4快速入门
    TS-接口
    webpack4.0高级
    webpack4.0基础
  • 原文地址:https://www.cnblogs.com/huxinping8800/p/7159276.html
Copyright © 2020-2023  润新知