在ubuntu下安装配置phabricator

来源:互联网 发布:淘宝用户需求分析 编辑:程序博客网 时间:2024/06/08 18:27

在ubuntu下安装配置phabricator

Phabricator 是一个LAMP应用套件, 因此最基本的要求就是LAMP环境:
• Linux:Linux的不同发行版及变种是必需的。Mac OS X是一个可接受的Linux变种,Windows不是。Phabricator不能安装在Windows系统上。在Mac OS X,Amazon Linux,Ubuntu,RHEL和CentOS上运行的 Phabricator 有活跃的贡献者。此处为ubuntu16
• Apache(或nginx,或lighttpd):需要Apache 2.2.7以上版本。
• MySQL:MySQL必需
• PHP:需要PHP5.2以上版本

  • 1、下载phabricator,以及相应的工具包
    从https://secure.phabricator.com/book/phabricator/article/installation_guide/
    下载install-ubuntu.sh(其中已经包括了所有phabricator所需的运行环境)
  • 2、安装前的准备工作
apt-get update                                  #升级apt-get
Sudo add-apt-repository ppa:ondrej/php          #ubuntu16下没有php5的包,需要先导入php源
apt-get install git                             #下载git

将install_ubuntu放在/opt/project下,并给予执行权限

Chmod a+x ./install_ubuntu.sh./install_ubuntu.sh

下载完成后在/opt/project文件夹下生成三个子文件夹
文件夹目录

  • 3、配置apache
    修改/etc/apache2/site-enabled下的000-default.conf
<VirtualHost *:80># Change this to the domain which points to your host.ServerName phabricator.my.com# Change this to the path where you put 'phabricator' when you checked it# out from GitHub when following the Installation Guide.## Make sure you include "/webroot" at the end!DocumentRoot /opt/project/phabricator/webroot   #your project dirRewriteEngine onRewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]RewriteRule ^/rsrc/(.*)     -                       [L,QSA]RewriteRule ^/favicon.ico   -                       [L,QSA]# If Apache isn't currently configured to serve documents out of the# directory where you put Phabricator, you may also need to add# <Directory /> section. <Directory /opt/project/phabricator/webroot>    #your project dir             Options Indexes FollowSymLinks Includes ExecCGI             AllowOverride None             Require all granted</Directory>ErrorLog ${APACHE_LOG_DIR}/error.logCustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>

启动apache2.7

a2enmod rewrite                     #开放rewrite/etc/inii.d/apache2 start           #启动apache2

访问http://127.0.0.1
这里写图片描述

按提示,切到Phabricator的安装目录,设置数据库配置

./bin/config set mysql.host localhost./bin/config set my.port 3306./bin/comfig set my.user root./bin/config ser my.pass passwd

如果嫌弃这样太麻烦,也可以直接编辑phabricator/conf/local/local.json

{  "mysql.host": "192.168.106.133",  "mysql.pass": "bbkb_dev",  "mysql.user": "root",  "mysql.port": "3306" }

配置完成后执行

./bin/storage upgrade

生成数据库后刷新http://127.0.0.1便能进入首页

原创粉丝点击