作者:waringid


一、简介

Taiga 是一个免费开源,而且功能非常强大的项目管理平台,用于初创企业和敏捷开发团队。提供一个简单、漂亮的项目管理工具。Taiga 采用 Python Django 框架开发,前端基于 AngularJS 实现。

二、更新必要的组件及系统版本

  • 安装必要的组件并更新系统

yum install -y gcc autoconf flex bison libjpeg-turbo-devel
yum install -y freetype-devel zlib-devel zeromq-devel gdbm-devel ncurses-devel
yum install -y automake libtool libffi-devel curl git tmux
yum install -y libxml2-devel libxslt-devel
yum install -y wget openssl-devel gcc-c++
  • 安装PostgreSQL 9.5

wget http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
rpm -ivh pgdg-centos95-9.5-2.noarch.rpm
yum install -y postgresql95-server postgresql95-devel postgresql95-contrib
export PATH=$PATH:/usr/pgsql-9.5/bin
  • 修改验证方式为md5

vim /var/lib/pgsql/9.5/data/pg_hba.conf

postgresql95-setup initdb
systemctl start postgresql-9.5.service
  • 安装Python 3.5.1

wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz
tar xvf Python-3.5.1.tar.xz
cd Python-3.5.1/
./configure --prefix=/opt/python3.5
make
make install
export PATH=$PATH:/opt/python3.5/bin

三、配置数据库及用户环境

  • 新建用户及数据库

useradd taiga
sudo -u postgres psql
CREATE DATABASE taiga;
CREATE USER taiga WITH PASSWORD 'J5brHrAXFLQSif0K';
GRANT ALL PRIVILEGES ON DATABASE taiga TO taiga;
\q
  • 配置pip环境

pip3.5 install virtualenv virtualenvwrapper
VIRTUALENVWRAPPER_PYTHON=/opt/python3.5/bin/python3.5
source /opt/python3.5/bin/virtualenvwrapper.sh
mkvirtualenv -p /opt/python3.5/bin/python3.5 taiga
deactivate

四、配置taiga-back

  • 下载内容

cd /home/taiga
git clone https://github.com/taigaio/taiga-back.git taiga-back
cd taiga-back/
git checkout stable
  • 配置python组件

sed -i -e '34s/^/#/ig' requirements.txt
sed -i -e '34a git+https://github.com/Xof/django-pglocks.git' requirements.txt
pip3.5 install -r requirements.txt
chown -R taiga:taiga /home/taiga/
sed -i -e '1a #!/opt/python3.5/bin/python3.5' -e '1d' manage.py
  • 初始化启动配置

su taiga
cd /home/taiga/taiga-back
python3.5 manage.py migrate --noinput
python3.5 manage.py loaddata initial_user
python3.5 manage.py loaddata initial_project_templates
python3.5 manage.py loaddata initial_role
python3.5 manage.py compilemessages
python3.5 manage.py collectstatic –noinput
  • 配置文件设定

vim /home/taiga/taiga-back/settings/local.py
from .development import *
from .common import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'taiga',
'USER': 'taiga',
'PASSWORD': 'youpassword',
'HOST': '',
'PORT': '',
}
}
MEDIA_URL = "http://192.168.5.86/media/"
STATIC_URL = "http://192.168.5.86/static/"
ADMIN_MEDIA_PREFIX = "http://192.168.5.86/static/admin/"
SITES["front"]["scheme"] = "http"
SITES["front"]["domain"] = "192.168.5.86"
SECRET_KEY = "2k_DRTqCjy$&-Rul^C23Brf=DY80DLZCl7VF*xU$*ert7-6VccT"
  • 测试启动状态

python3.5 manage.py runserver 0.0.0.0:8000 --insecure

  • 安装异步消息交互组件

cd /home/taiga/
git clone https://github.com/zeromq/libzmq.git libzmq
cd libzmq/
./autogen.sh
./configure --without-libsodium
make
make install
  • 安装进程和socket监控工具circus

cd /home/taiga
git clone https://github.com/circus-tent/circus.git circus
cd /home/taiga/circus/
python3.5 setup.py install
ln -s /opt/python3.5/bin/circusd /usr/local/bin/circusd
ln -s /opt/python3.5/bin/gunicorn /usr/local/bin/gunicorn
  • 配置circus

mkdir -p /home/taiga/conf
vim circus.ini
[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
statsd = true
[watcher:taiga]
working_dir = /home/taiga/taiga-back
cmd = gunicorn
args = -w 3 -t 60 --pythonpath=. -b 127.0.0.1:8001 taiga.wsgi
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/taiga/logs/gunicorn.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 4
stderr_stream.class = FileStream
stderr_stream.filename = /home/taiga/logs/gunicorn.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 4
[env:taiga]
PATH = /home/taiga/.virtualenvs/taiga/bin:$PATH
TERM=rxvt-256color
SHELL=/bin/bash
USER=taiga
LANG=en_US.UTF-8
HOME=/home/taiga
PYTHONPATH=/home/taiga/.virtualenvs/taiga/lib/python3.5/site-packages
vim /usr/lib/systemd/system/circus.service
[Unit]
Description=circus
[Service]
ExecStart=/usr/local/bin/circusd /home/taiga/conf/circus.ini
ln -s '/usr/lib/systemd/system/circus.service' '/etc/systemd/system/circus.service'
  • 配置日志内容

mkdir -p /home/taiga/logs
touch /home/taiga/logs/gunicorn.stdout.log
touch /home/taiga/logs/gunicorn.stderr.log

五、配置taiga-front

  • 安装前端

cd /home/taiga
git clone https://github.com/taigaio/taiga-front-dist.git taiga-front-dist
cd taiga-front-dist/
git checkout stable
cd dist/
sed -e 's/localhost/YOURIP/' conf.example.json > conf.json
systemctl start circus.service
  • 安装nginx

vim /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
yum install -y nginx
  • 配置nginx

vim /etc/nginx/conf.d/taiga.conf
server {
listen 80 default_server;
server_name _; large_client_header_buffers 4 32k;
client_max_body_size 50M;
charset utf-8; access_log /opt/taiga/logs/nginx.access.log;
error_log /opt/taiga/logs/nginx.error.log; # Frontend
location / {
root /opt/taiga/taiga-front-dist/dist/;
try_files $uri $uri/ /index.html;
} # Backend
location /api {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.5.86:8001/api;
proxy_redirect off;
} # Django admin access (/admin/)
location /admin {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.5.86:8001$request_uri;
proxy_redirect off;
} # Static files
location /static {
alias /opt/taiga/taiga-back/static;
} # Media files
location /media {
alias /opt/taiga/taiga-back/media;
}
}

六、启动测试

  • 启动taiga

su taiga -c "python3.5 /home/taiga/taiga-back/manage.py runserver 0.0.0.0:8000 &"
  • 启动nginx

chown -R taiga:taiga /home/taiga/
chmod o+x /home/taiga/
systemctl restart nginx

CentOS7上部署taiga项目管理软件的更多相关文章

  1. 在阿里云ECS CentOS7上部署基于MongoDB+Node.js的博客

    前言:这是一篇教你如何在阿里云的ECS CentOS 7服务器上搭建一个个人博客的教程,教程比较基础,笔者尽可能比较详细的把每一步都罗列下来,包括所需软件的下载安装和域名的绑定,笔者在此之前对Linu ...

  2. 在CentOS7上部署Kubernetes集群

    在CentOS7上部署Kubernetes集群 文/FCBusquest 2015-12-22 18:36:00 简介 Kubernetes(k8s)是Google开源的大规模容器集群管理系统, 本文 ...

  3. CentOS7上部署ASP.Net Core 2.2应用

    前言 在CentOS7上部署ASP.Net Core应用是我的技术路线验证的一部分,下一个产品计划采用ASP.Net Boilerplate Framework开发.因此需要求提前进行一下技术验证,在 ...

  4. centos7上部署dubbo管理控制台dubbo-admin

    centos7上部署dubbo管理控制台dubbo-admin 1 准备工作 服务器:系统centos7, 内存4G, 存储60G, ip 192.168.159.128 软件环境: 安装有jdk1. ...

  5. 在 CentOS7 上部署 MySQL 主从

    在 CentOS7 上部署 MySQL 主从 通过 SecureCRT 连接至 MySQL 主服务器: 找到 my.cnf 文件所在的目录: mysql --help | grep my.cnf 一般 ...

  6. 在 CentOS7 上部署 zookeeper 服务

    在 CentOS7 上部署 zookeeper 服务 1 用 SecureCRT 或 XShell 等 Linux 客户端工具连接至 CentOS7 服务器: 2 进入到 /usr/local/too ...

  7. 【docker】centOS7上部署的mysql和spring boot服务,要求,mysql的时间、java程序服务的时间和宿主机的时间完全保持一致【修改mysql时区,临时和永久】【修改spring boot配置文件时区】【修改docker启动spring boot实例程序时区】

    要求:centOS7上部署的mysql和spring boot服务,要求,mysql的时间.java程序服务的时间和宿主机的时间完全保持一致: ============================ ...

  8. (转)Centos7上部署openstack ocata配置详解

    原文:http://www.cnblogs.com/yaohong/p/7601470.html 随笔-124  文章-2  评论-82  Centos7上部署openstack ocata配置详解 ...

  9. Docker实践(6)—CentOS7上部署Kubernetes

    Kubernetes架构 Kubernetes的整体架构如下: Master为主控节点,上面运行apiserver,scheduler,controller-manager等组件.Minion相当于工 ...

随机推荐

  1. Django admin注册model究竟要怎么写才优雅 批量注册model

    比如在Django admin 注册models时,会用到. 对于APP里自带的models,可以使用这种方式注册. from django.contrib import admin # Regist ...

  2. axios拦截器

    import axios from "axios"; axios.interceptors.response.use(response => { //=>设置响应拦截器 ...

  3. adoop(四)HDFS集群详解

    阅读目录(Content) 一.HDFS概述 1.1.HDFS概述 1.2.HDFS的概念和特性 1.3.HDFS的局限性 1.4.HDFS保证可靠性的措施 二.HDFS基本概念 2.1.HDFS主从 ...

  4. Google Closure Compiler高级压缩混淆Javascript代码

    一.背景 前端开发中,特别是移动端,Javascript代码压缩已经成为上线必备条件. 如今主流的Js代码压缩工具主要有: 1)Uglify http://lisperator.net/uglifyj ...

  5. 雷军微博拧螺丝,CFO为粉丝数发愁

    导读 小米集团联合创始人.品牌战略官黎万强4年前写的书<参与感>,估计又要热卖了. 3月24日,小米CFO周受资发微博,“我刚接受了同事的挑战,要在一定时间内在微博上有更多的粉丝”,并向粉 ...

  6. Android学习第九天

    为什么需要内容提供者 a)        如何创建数据库 b)        文件权限 c)         Chmod linux修改权限 内容提供者原理 a)        内容提供者把数据进行封 ...

  7. macOS Mojave待机耗电大

    这很有可能是待机时依然链接网络导致的.如果不需要待机时链接网络可以执行 sudo pmset -a tcpkeepalive 0 恢复则执行 sudo pmset -a tcpkeepalive 1

  8. iView页面Modal中内嵌Tabs,重新显示Modal时默认选中Tabs的第一项

    文档中说激活面板的name用value,页面第一次加载的时候可以,放在modal里就不好使了,每次打开的时候总显示上一次离开时的界面. 真正能用的是 this.$refs.tabs.activeKey ...

  9. Linux基本命令总结(九)

    接上篇: 46,scp是secure copy的简写,用于在Linux下进行远程拷贝文件的命令,和它类似的命令有cp,不过cp只是在本机进行拷贝不能跨服务器,而且scp传输是加密的.可能会稍微影响一下 ...

  10. B-树(B树)详解

    具体讲解之前,有一点,再次强调下:B-树,即为B树.因为B树的原英文名称为B-tree,而国内很多人喜欢把B-tree译作B-树,其实,这是个非常不好的直译,很容易让人产生误解.如人们可能会以为B-树 ...