jitamin项目管理软件在CentOS 7.2 上面的安装过程

jitamin这个项目管理软件看起来界面清爽, 功能也还实用, 一直想着在自己的主机上面安装一下, 参照说明文档, 经过多次尝试, 终于成功了. 这里把里面的主要步骤整理一下, 软件有一个英文的安装过程, 但是里面还是有一些坑, 要注意的.

jitamin项目在github上面的介绍链接地址:github-Jitamin

安装步骤1. 准备一个CentOS的机器

A web server: Nginx, Apache (with mod_rewrite), or Lighttpd

PHP 5.6+ (PHP7 is recommended)

Database: MySQL is recommended, also you can choose PostgreSQL orSQLite

Composer

翻译一下:

为了方便部署, 我采用的是阿里云的ECS, 加载镜像安装, 默认配置好了PHP运行环境(WDCPv3.0面板 多引擎切换 免费版)

2.从github上面下载源代码

Get the jitamin source code

$gitclonehttps://github.com/jitamin/jitamin.git

补充备注: 这里会提示没有安装git, CentOS7 yum 安装git方法

yuminstallgit3.修改配置文件

Adjust the config file
$ cp config/config{.default,}.php
Adjust the config/config.php according to your environment, especially the database setting.

$viconfig.php

补充备注:
这里要修改一下配置文件 config.php( 从config.default.php复制过来,重命名成为config.php) , 里面的数据库要改成mysql,sqlite有问题, 不能正常使用, 不要用

4.安装相关的包

Install the PHP dependency packages

$composerinstall-o--no-dev

补充备注:
做这个事情之前, 先要安装了composer(php包管理器), 将composer.phar下载到项目中
使用如下代码来下载

curl-sShttps://getcomposer.org/installer|php

这个时候会提示:

bash:PHP:commandnotfound

php没有添加到环境变量里面去, 解决办法:

exportPATH=$PATH:/usr/local/PHP/bin

然后,再echo $PATH看看,就看见php在path里面了(可以在任意目录运行php命令)

usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/php/bin

这时候,你可以试试在系统的任意目录直接敲入php -i

5.创建数据库并初始化

Migrate the database and initialize the database
create database tables
数据库表创建

vendor/bin/phinxmigrate

initialize database
数据库初始化

vendor/bin/phinxseed:run

6.修改缓存目录的权限

确保把目录改成具有写的权限

Confirm that the directory bootstrap/cache and storage have write permission

$chmod-R0777bootstrap/cache$chmod-R0777storage

不能生成缓存文件的话会报错

7.其他步骤:

Optional steps

$phpartisanconfig:cache$phpartisanroute:cache

这个就是用来更新缓存文件的

8.通过浏览器来访问:

Access the service through web browser
Open your web browser, enter the address such ashttp://jitamin.devto access the web service. The initial Super Administrator’s user name and password are listed below:

username:adminoradmin@admin.compassword:admin

9.补充备注:

一定要用二级域名来链接, 比如jit.2ssf.com,比如dev.sod.net
不支持二级目录, 比如, xx.com/jitamin, 里面的跳转逻辑一时没有搞清楚, 只能用二级域名, 这也是一个遗憾

让二级域名直接跳转到jitamin/public这个文件夹下面, 才可以显示
首页是jitamin/public/index.php

每次修改config.php之后, 要更新一下缓存(config 和route文件的缓存), 用这个


$ php artisan config:cache

$ php artisan route:cache