kanboard 安装配置教程

kanboard 安装配置教程

唠个5毛钱的

kanboard是一个开源的项目管理软件,很是强大,有兴趣的朋友可以点击这里去看官方介绍

环境

  • redhat 7.4
  • git 2.16.2
  • 以root账户运行

操作

  1. 安装apache 2.4
yum install httpd -y # 安装 apache
httpd -version # 查看apache版本号
  1. 安装php72及拓展

可参考:https://webtatic.com/packages/php72

# 安装php源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

# 安装php及拓展
yum install mod_php72w php72w-opcache
yum install php72w-common php72w-mbstring php72w-pdo php72w-xml 
yum install php72w-gd php72w-ldap 
  1. 配置apache

可参考[7,8章节]:http://php.net/manual/zh/install.unix.apache2.php

# [vim /etc/hpptd/conf/httpd.conf] 添加以下内容
<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>
LoadModule php7_module /usr/lib64/httpd/modules/libphp7.so
  1. 下载配置kanboard

可参考:https://docs.kanboard.org/en/latest/admin_guide/rhel_installation.html

# 获取kanboard
cd /var/www/html
git clone https://github.com/kanboard/kanboard.git

# 配置权限
chown -R apache:apache /var/www/html/kanboard
chcon -R -t httpd_sys_content_rw_t /var/www/html/kanboard/data
chcon -R -t httpd_sys_content_rw_t /var/www/html/kanboard/plugins
setsebool -P httpd_can_network_connect=1

PS:至此kanboard已经可以使用,默认使用的是sqlite数据库,不过如果使用者较多的话建议继续操作,使用postgresql数据库

配置使用postgres 10

安装postgres 10

可参考:https://www.postgresql.org/download/linux/redhat

  1. Install the repository RPM:
yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm
  1. Install the client packages:
yum install postgresql10
  1. Optionally install the server packages:
yum install postgresql10-server
  1. Optionally initialize the database and enable automatic start:
/usr/pgsql-10/bin/postgresql-10-setup initdb
systemctl enable postgresql-10
systemctl start postgresql-10

配置kanboard,使用postgres 10

可参考:https://docs.kanboard.org/en/latest/admin_guide/postgresql.html

  1. 配置 postgres
# 导入数据库
cd /var/www/html/kanboard
su postgres
psql # 进入psql
ALERT USER 'postgres' WITH PASSWORD 'postgres'; # 修改postgres登录密码
CREATE DATABASE kanboard; # 创建kanboard数据库
psql -U postgres kanboard < app/Schema/Sql/postgres.sql # 执行postgres.sql脚本
\c kanboard # 切换到kanboard数据库
\d # 查看所有表,有则继续,没有请重复以上步骤或自行百度
\q # 退出psql
exit # 退出postgres

# 配置postgres 10连接限制
vim /var/lib/pgsql/10/data/pg_hba.conf
  • vim /var/lib/pgsql/10/data/pg_hba.conf 配置部分如下
# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             postgres                                trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
  1. 配置 kanboard
# 配置kanboard
cd /var/www/html/kanboard
mv config.default.php config.php
vim config.php
vim app/constants.php # 如果配置过config.php之后不起作用的话再编辑配置该文件,配置内容参照以上config.php文件做的修改
  • vim config.php 配置部分如下
// Database driver: sqlite, mysql or postgres (sqlite by default)
define('DB_DRIVER', 'postgres');

// Mysql/Postgres username
define('DB_USERNAME', 'postgres');

// Mysql/Postgres password
define('DB_PASSWORD', 'postgres');

// Mysql/Postgres hostname
define('DB_HOSTNAME', 'localhost');

// Mysql/Postgres database name
define('DB_NAME', 'kanboard');

总结

到此,kanboard就安装完毕了,过程很是曲折,因为想要用php的最新版,所以最开始的时候想的是直接编译php,不过各种的依赖包,折腾一通之后php编译成功了,不过编译的时候没有加相应的拓展参数,还需要重新编译,我弃了,幸好在网上搜到了上面的php安装方法,快捷省力,总算是把kanboard给架起来了,特此记录备忘。

  • PS:kanboard主页镇楼

    《kanboard 安装配置教程》 kanboard主页

    原文作者:默浑秩
    原文地址: https://www.jianshu.com/p/9120e8a825b9
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞