歡迎走進zozo的學習之旅。php
在考慮用項目管理軟件來提升團隊協做的效率,需求項目管理及平常管理,固然有項目文件管理,文檔協做那就更加理想,部門其餘人有在用Team Foundation Server(TFS),可是這個是和 Visual studio 結合在 Microsoft平臺上用的,不是很感冒,因此找了一下開源的輕便型的項目管理軟件,看了下知乎上的推薦:有哪些比較好用的開源項目管理工具?html
項目名稱:開源項目管理系統 Jitami 項目簡介:Jitamin
、是一款免費、開源,使用PHP語言開發的項目管理系統。Jitamin靈感來自於Vitamin,並結合了Just In
Time(準時)和敏的拼音min,意指效率和敏捷是項目管理的維他命。項目地址:jitamin/jitamin - 碼雲 Gitee.commysql做者:碼雲 Gitee
連接:https://www.zhihu.com/question/19684062/answer/293771325 來源:知乎
著做權歸做者全部。商業轉載請聯繫做者得到受權,非商業轉載請註明出處。nginx
官網有個演示版本,看板結合日曆和甘特圖,能夠導入project的項目,因此打算動手在部門的centos7上搭一個,安裝參考:
github/jitamin
CentOS7 安裝Jitamin的詳細過程git
很不幸,php+mysql不太熟,最後網站沒有運行起來,轉投了kanboard,kanboard直接提供 docker 版本,運行起來就比較方便,但還須要加一些插件,等摸熟了再上那個教程.
下面就是入坑記錄github
參考 如何在CentOS 7安裝Linux,Nginx,MySQL和PHP(LEMP)web
安裝Nginxsql
sudo yum install epel-release
sudo yum install nginx
sudo service nginx start
驗證docker
安裝MySQL(MariaDB[1])shell
sudo yum install mariadb-server mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb
添加 mysql 默認端口至 firewall
sudo firewall-cmd --zone=public --add-port=3306/tcp --permanent sudo firewall-cmd --reload
設置 root 密碼
mysqladmin -u root password "new_password";
登陸
[root@host]# mysql -u root -p
Enter password:*******
創建jitamin數據庫
mysql> create database jitamin;
MariaDB [(none)]> show databases;
+--------------------+
| Database | +--------------------+
| information_schema | | jitamin | | mysql | | performance_schema |
| test | +--------------------+
5 rows in set (0.00 sec)
安裝PHP
sudo yum install php php-mysql php-fpm sudo vim /etc/php-fpm.d/www.conf`
修改
cgi.fix_pathinfo=0
配置文件www.conf
sudo vim /etc/php-fpm.d/www.conf
修改內容
listen = /var/run/php-fpm/php-fpm.sock
user = nginx
group = nginx
可是由於在後面 對jitamin 用composer install 依賴關係的時候出現了php版本過低的問題,這裏補充下php升級的過程:
php版本問題 錯誤信息
php >=5.6.0 but your PHP version (5.4.16) 升級
vim composer.json //指定 版本
php -v //查看當前版本
PHP 5.4.16 (cli) (built: Apr 12 2018 19:02:01)
解決思路
從新安裝高版本php
做者:一指彈風
連接:https://www.jianshu.com/p/055aca089506
來源:簡書
簡書著做權歸做者全部,任何形式的轉載都請聯繫做者得到受權並註明出處。
yum list installed | grep php
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
yum list installed | grep php
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
sudo yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64
yum list installed | grep php
php56w.x86_64 5.6.37-1.w7 @webtatic
php56w-cli.x86_64 5.6.37-1.w7 @webtatic
php56w-common.x86_64 5.6.37-1.w7 @webtatic
php56w-gd.x86_64 5.6.37-1.w7 @webtatic
php56w-ldap.x86_64 5.6.37-1.w7 @webtatic
php56w-mbstring.x86_64 5.6.37-1.w7 @webtatic
php56w-mcrypt.x86_64 5.6.37-1.w7 @webtatic
php56w-mysql.x86_64 5.6.37-1.w7 @webtatic
php56w-pdo.x86_64 5.6.37-1.w7 @webtatic
yum install php56w-fpm
從新安裝後出現 權限錯誤,錯誤信息以下:
2002#0: *6 connect() to unix:/var/run/php-fpm/php-fpm.sock failed (13:
Permission denied) while connecting to upstream, client: 10.1.6.2,
server: 10.16.10.166, request: "GET /info.php HTTP/1.1", upstream:
"fastcgi://unix:/var/run/php-fpm/php- fpm.sock:", host: "10.16.10.166"
解決方案
參考 https://blog.wu-boy.com/2014/06/ngnix-php5-fpm-sock-failed-permission-denied/
sudo vim /etc/php-fpm.d/www.conf
listen.owner = nginx
listen.group = nginx
listen.mode = 0666
user = nginx
group = nginx
配置Nginx來處理PHP頁面
vim /etc/nginx/conf.d/default.conf
修改
server {
listen 80;
server_name 10.16.10.166;
# note that these lines are originally from the "location /" block
root /var/www/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
從新啓動服務
systemctl restart php-fpm.service
systemctl enable nginx.service
systemctl enable php-fpm.service
驗證
下載composer.phar
curl -sS https://getcomposer.org/installer | php
可執行
mv composer.phar /usr/local/bin/composer
下載源文件https://github.com/jitamin/jitamin
yum install git
cd /var/www/html
sudo git clone https://github.com/jitamin/jitamin.git jitamin
配置 config file 建立 database 設置
cd jitamin
cp .env.example .env
sudo vim .env //修改數據庫相關配置
修改成
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=jitamin DB_USERNAME=root DB_PASSWORD=xxxxx //root密碼 vim config/config.php
修改成
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'jitamin'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', 'xxxxx'),//root 密碼
'port' => env('DB_PORT', '3306'),
'charset' => 'utf8',
],
安裝依賴包(出現了php版本問題如前描述)
composer install -o --no-dev //
又出現權限問題
[RuntimeException]
/var/www/html/jitamin/vendor does not exist and could not be created.
解決思路
chmod -R 777 /var/www
成功
> php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 27 installs, 0 updates, 0 removals
- Installing christian-riesen/base32 (1.3.1): Downloading (100%) - Installing christian-riesen/otp (1.4.3): Downloading (100%) - Installing eluceo/ical (0.10.1): Downloading (100%) - Installing erusev/parsedown (1.6.0): Downloading (100%) - Installing gregwar/captcha (v1.1.1): Downloading (100%) - Installing jitamin/json-rpc (v1.2.2): Downloading (100%) - Installing jitamin/picodb (v1.0.15): Downloading (100%) - Installing jitamin/picofeed (v0.1.25): Downloading (100%) - Installing jitamin/simple-logger (v1.0.2): Downloading (100%) - Installing jitamin/simple-queue (v1.0.1): Downloading (100%) - Installing jitamin/simple-validator (v1.0.2): Downloading (100%) - Installing symfony/polyfill-mbstring (v1.9.0): Downloading (100%) - Installing symfony/translation (v3.2.14): Downloading (100%) - Installing nesbot/carbon (1.33.0): Downloading (100%) - Installing paragonie/random_compat (v2.0.11): Downloading (100%) - Installing pimple/pimple (v3.0.2): Downloading (100%) - Installing symfony/yaml (v2.8.7): Downloading (100%) - Installing psr/log (1.0.2): Downloading (100%) - Installing symfony/debug (v3.4.14): Downloading (100%) - Installing symfony/console (v3.4.14): Downloading (100%) - Installing symfony/polyfill-ctype (v1.9.0): Downloading (100%) - Installing symfony/filesystem (v3.4.14): Downloading (100%) - Installing symfony/config (v3.4.14): Downloading (100%) - Installing robmorgan/phinx (v0.6.6): Downloading (100%) - Installing swiftmailer/swiftmailer (v5.4.5): Downloading (100%) - Installing symfony/event-dispatcher (v3.4.14): Downloading (100%) - Installing vlucas/phpdotenv (v2.5.1): Downloading (100%) Generating optimized autoload files
作數據遷移
vendor/bin/phinx migrate
vendor/bin/phinx seed:run
成功後,登陸數據庫 jitamin 查看 數據表格
mysql -u root -p MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| jitamin |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.00 sec)
MariaDB [(none)]> use jitamin
Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [jitamin]> show tables;
+--------------------------------+
| Tables_in_jitamin |
+--------------------------------+
| action_has_params |
| actions |
| column_has_move_restrictions |
| column_has_restrictions |
| columns |
| comments |
| custom_filters |
| group_has_users |
| groups |
| last_logins |
| links |
| migrations |
| password_reset |
| plugin_schema_versions |
| project_activities |
| project_daily_column_stats |
| project_daily_stats |
| project_has_categories |
| project_has_files |
| project_has_groups |
| project_has_metadata |
| project_has_notification_types |
| project_has_roles |
| project_has_stars |
| project_has_users |
| project_role_has_restrictions |
| projects |
| remember_me |
| schema_version |
| settings |
| subtask_time_tracking |
| subtasks |
| swimlanes |
| tags |
| task_has_external_links |
| task_has_files |
| task_has_links |
| task_has_metadata |
| task_has_tags |
| tasks |
| transitions |
| user_has_metadata |
| user_has_notification_types |
| user_has_notifications |
| user_has_unread_notifications |
| users |
+--------------------------------+
46 rows in set (0.00 sec)
設置文件夾權限
$ chmod -R 0777 bootstrap/cache
$ chmod -R 0777 storage
$ php artisan config:cache
Configuration cached successfully!
$ php artisan route:cache
Routes cached successfully!
此時登陸 網頁查看,失敗顯示以下:
看到了 issue裏面有這樣的描述:
無支持,不活躍,投奔kanboard · Issue #286 · jitamin/jitamin
如今咱們已經開始運行Web服務器,如今是安裝MariaDB的時候了,這是一個MySQL插件替換。 MariaDB是MySQL關係數據庫管理系統的社區開發的分支。基本上,它將組織並提供對咱們的網站能夠存儲信息的數據庫的訪問。 ↩︎