博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CentOS7上部署taiga项目管理软件
阅读量:6139 次
发布时间:2019-06-21

本文共 6240 字,大约阅读时间需要 20 分钟。

:waringid 


一、简介

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

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

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

yum install -y gcc autoconf flex bison libjpeg-turbo-develyum install -y freetype-devel zlib-devel zeromq-devel gdbm-devel ncurses-develyum install -y automake libtool libffi-devel curl git tmuxyum install -y libxml2-devel libxslt-develyum 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.rpmrpm -ivh pgdg-centos95-9.5-2.noarch.rpmyum install -y postgresql95-server postgresql95-devel postgresql95-contribexport PATH=$PATH:/usr/pgsql-9.5/bin
  • 修改验证方式为md5

vim /var/lib/pgsql/9.5/data/pg_hba.conf
QQ--20161205175319.png
postgresql95-setup initdbsystemctl start postgresql-9.5.service
  • 安装Python 3.5.1

wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xztar xvf Python-3.5.1.tar.xzcd Python-3.5.1/./configure --prefix=/opt/python3.5makemake installexport PATH=$PATH:/opt/python3.5/bin

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

  • 新建用户及数据库

useradd taigasudo -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 virtualenvwrapperVIRTUALENVWRAPPER_PYTHON=/opt/python3.5/bin/python3.5source /opt/python3.5/bin/virtualenvwrapper.shmkvirtualenv -p /opt/python3.5/bin/python3.5 taigadeactivate

四、配置taiga-back

  • 下载内容

cd /home/taigagit clone https://github.com/taigaio/taiga-back.git taiga-backcd 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.txtpip3.5 install -r requirements.txtchown -R taiga:taiga /home/taiga/sed -i -e '1a #!/opt/python3.5/bin/python3.5' -e '1d' manage.py
  • 初始化启动配置

su taigacd /home/taiga/taiga-backpython3.5 manage.py migrate --noinputpython3.5 manage.py loaddata initial_userpython3.5 manage.py loaddata initial_project_templatespython3.5 manage.py loaddata initial_rolepython3.5 manage.py compilemessagespython3.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

--_005.png

  • 安装异步消息交互组件

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

cd /home/taigagit clone https://github.com/circus-tent/circus.git circuscd /home/taiga/circus/python3.5 setup.py installln -s /opt/python3.5/bin/circusd /usr/local/bin/circusdln -s /opt/python3.5/bin/gunicorn /usr/local/bin/gunicorn

  • 配置circus

mkdir -p /home/taiga/confvim circus.ini

[circus]check_delay = 5endpoint = tcp://127.0.0.1:5555pubsub_endpoint = tcp://127.0.0.1:5556statsd = true[watcher:taiga]working_dir = /home/taiga/taiga-backcmd = gunicornargs = -w 3 -t 60 --pythonpath=. -b 127.0.0.1:8001 taiga.wsgiuid = taiganumprocesses = 1autostart = truesend_hup = truestdout_stream.class = FileStreamstdout_stream.filename = /home/taiga/logs/gunicorn.stdout.logstdout_stream.max_bytes = 10485760stdout_stream.backup_count = 4stderr_stream.class = FileStreamstderr_stream.filename = /home/taiga/logs/gunicorn.stderr.logstderr_stream.max_bytes = 10485760stderr_stream.backup_count = 4[env:taiga]PATH = /home/taiga/.virtualenvs/taiga/bin:$PATHTERM=rxvt-256colorSHELL=/bin/bashUSER=taigaLANG=en_US.UTF-8HOME=/home/taigaPYTHONPATH=/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/logstouch /home/taiga/logs/gunicorn.stdout.logtouch /home/taiga/logs/gunicorn.stderr.log

五、配置taiga-front

  • 安装前端

cd /home/taigagit clone https://github.com/taigaio/taiga-front-dist.git taiga-front-distcd taiga-front-dist/git checkout stablecd dist/sed -e 's/localhost/YOURIP/' conf.example.json > conf.jsonsystemctl start circus.service

  • 安装nginx

vim /etc/yum.repos.d/nginx.repo
[nginx]name=nginx repobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=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

--_006.png

--_007.png

转载地址:http://irkya.baihongyu.com/

你可能感兴趣的文章
分享:动态库的链接和链接选项-L,-rpath-link,-rpath
查看>>
阿里云企业邮箱 在Foxmail 7.0上POP3/IMAP协议设置方法
查看>>
Javascript一些小细节
查看>>
canvas学习总结
查看>>
Javascript的if判断
查看>>
spring cloud gateway 源码解析(3)记录请求参数及返回的json
查看>>
阿里云ECS数据盘格式化与挂载图文教程
查看>>
Flexbox响应式网页布局 - W3Schools视频02
查看>>
【手牵手】搭建前端组件库(二)
查看>>
怎么给视频添加音频或配乐
查看>>
怎么转换音乐格式
查看>>
Leaflet-Develop-Guide
查看>>
每隔1s打印0-5
查看>>
Angular6错误 Service: No provider for Renderer2
查看>>
聊聊flink的BlobStoreService
查看>>
洗牌算法具体指的是什么?
查看>>
HBuilder打包手机app的方法
查看>>
解决Mac下SSH闲时自动中断的问题
查看>>
在JavaScript中理解策略模式
查看>>
ArchSummit 深圳 2017 成功举办,探索未来互联网架构
查看>>