一、介绍
1. 源码的review与审核
2. 代码托管,代码浏览
3. BUG跟踪
4. 项目管理
5. 团队成员交流
6. 组织风险讨论
7. 事件备注,以及回顾(统计等)
8. 权限设置
9. 其他功能
官网地址:https://www.phacility.com/
项目地址: https://github.com/phacility
二、phabricator安装:
系统环境:centos 7.5
php:7.1.9
nginx:1.17.10
mysql:5.7
1、创建安装目录:
[root@localhost ~]# mkdir /data
[root@localhost ~]# cd /data
[root@localhost data]# ls
nginx-1.17.10.tar.gz php-7.1.9.tar.gz mysql nginx phabricator
2、安装nginx:
2.1:安装nginx依赖包
[root@localhost data]# yum install gcc gcc-c++ glibc -y
[root@localhost data]# yum install pcre-devel -y
[root@localhost data]# yum install zlib-devel -y
[root@localhost data]# yum install openssl-devel -y
[root@localhost data]#yum install gd gd-devel
2.2:解压nginx并编译安装,先创建普通用户pha
[root@localhost data]#tar xf nginx-1.17.10.tar.gz
[root@localhost data]# cd nginx-1.17.10
[root@localhost data]# /configure --prefix=/data/nginx --user=pha --group=pha --with-http_ssl_module --with-http_stub_status_module --with-stream --with-pcre --with-threads --with-file-aio --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_image_filter_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_secure_link_module
[root@localhost data]# make && make install
3、安装php
3.1:安装依赖包
[root@localhost data]# yum install libxml2
[root@localhost data]# yum install libxml2-devel -y
[root@localhost data]# yum -y install curl-devel
[root@localhost data]# yum install libxml2-devel -y
[root@localhost data]# yum -y install curl-devel
[root@localhost data]# yum install libjpeg libjpeg-devel -y
[root@localhost data]# yum -y install libpng libpng-devel
[root@localhost data]# yum install freetype-devel
3.2:解压、编译并安装
[root@localhost data]# tar xf php-7.1.9.tar.gz
[root@localhost data]# cd php-7.1.9
[root@localhost data]# ./configure --prefix=/usr/local/php7.1.9 --with-config-file-path=/usr/local/php7/etc --with-curl --with-jpeg-dir --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-mhash --with-libxml-dir --with-mysqli=mysqlnd --with-openssl --with-pdo-mysql=mysqlnd --with-pear --with-png-dir --with-xmlrpc --with-zlib --with-pdo-mysql --with-fpm-user=www --with-fpm-group=www --enable-fpm --enable-bcmath --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-xml --enable-zip --enable-mysqlnd --enable-maintainer-zts --enable-ftp --with-mrypt --enable-fileinfo --disable-rpath
[root@localhost data]# make && make install
3.3:整理php配置文件,使用php-fpm方式启动,php不能使用root用户启动,可以随意指定一个普通用户
[root@localhost php7.1.9]# cp /usr/local/php7.1.9/etc/php-fpm.conf.default /usr/local/php7.1.9/etc/php-fpm.conf
[root@localhost php7.1.9]# cp /usr/local/php7.1.9/etc/php-fpm.d/www.conf.default /usr/local/php7.1.9/etc/php-fpm.d/www.conf
[root@localhost php7.1.9]# cp php.ini-development /usr/local/php7.1.9/etc/php.ini
[root@localhost php7.1.9]# cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
[root@localhost php7.1.9]# chmod +x /etc/init.d/php-fpm
[root@localhost php7.1.9]# echo 'PATH=/usr/local/php7.1.9/bin:$PATH' >> /etc/profile
[root@localhost php7.1.9]# source /etc/profile
[root@localhost php7.1.9]# grep -Ev "^;|^$" /usr/local/php7.1.9/etc/php-fpm.d/www.conf
[www]
user = pha
group = pha
listen = 127.0.0.1:9000
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
4、/data目录下下载phabricator包
[root@localhost data]# git clone https://github.com/phacility/libphutil.git
[root@localhost data]# git clone https://github.com/phacility/arcanist.git
[root@localhost data]# git clone https://github.com/phacility/phabricator.git
5、安装mysql
服务器自带mariadb,可以直接使用,也可以自行安装mysql
6、配置与mysql的连接,将phabricator库文件导入mysql
[root@localhost ~]# cd /data/phabricator/
[root@localhost phabricator]# ./bin/config set mysql.host 192.168.197.129
[root@localhost phabricator]# ./bin/config set mysql.port 3306
[root@localhost phabricator]# ./bin/config set mysql.user root
[root@localhost phabricator]# ./bin/config set mysql.pass centos
[root@localhost phabricator]# ./bin/storage upgrade
7、nginx配置文件:
server{
listen 80;
server_name 192.168.197.129;
root /data/phabricator/webroot;
location / {
index index.php;
rewrite ^/(.*)$ /index.php?__path__=/$1 last;
}
location /index.php {
fastcgi_pass localhost:9000;
fastcgi_index index.php;
#required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
#variables to make the $_SERVER populate in PHP
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
8、确定以上步骤都正确执行,且返回结果没有报错。可在浏览器访问
http://192.168.197.129
9、phabricator邮箱配置
9.1 新建文件mailers.json文件,并添加用来发送邮件的邮箱信息
[root@localhost phabricator]# cat conf/local/mailers.json
[
{
"key": "smtp-mail",
"type": "smtp",
"options": {
"host": "smtp.163.com",
"port": 465,
"user": "pha@163.com",
"password": "xxxxxx",
"protocol": "ssl"
}
}
]
key:发送邮箱的id,可随意指定,要求唯一
type:发送邮件的协议类型
host:邮箱服务器地址
port:发送邮件使用的端口,不加密是25,加密465
user:发送邮箱的账户
password:发送邮箱的密码
protocol:是否加密,如果端口是25,这行可掠过
9.2 mailers.json加入到phabricator的配置文件中
[root@localhost phabricator]# ./bin/config set cluster.mailers --stdin < ./conf/local/mailers.json
后续如果修改发送邮箱,只需要修改mailers.json后执行该命令即可
9.3 启动发送邮件服务
[root@localhost phabricator]# ./bin/phd restart
9.4 验证邮箱是否能正常发送邮件
[root@tet-mysql phabricator]# ./bin/mail send-test --to dadao@163.com --subject hello < ./conf/local/mailers.json
Reading message body from stdin...
Mail sent! You can view details by running this command:
phabricator/ $ ./bin/mail show-outbound --id 12
返回以上信息则发送成功