Linux安装Phabricator

背景

公司管理需要,为开发团队寻找一款代码审查工具,最终选择了Phabricator。

ubuntu14.04 LTS

安装

使用官网上提供的install.sh即可。参考链接:
https://secure.phabricator.com/diviner/find/?name=Installation_Guide&type=article&jump=1

Apache2.4

暂未搞定

Nginx

https://secure.phabricator.com/book/phabricator/article/configuration_guide/ 提供了Nginx的配置。感觉比Apache简单很多。
但是安装完之后就出错了。报错是111.

2016/05/08 01:59:21 [error] 27345#0: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: ph.cgh.com, request: “GET /info.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “ph.cgh.com”

百度了下初步判定为Nginx和PHP之间需要有一个php-fpm。参考了如下文档:
https://www.howtoforge.com/installing-nginx-with-php5-fpm-and-mysql-on-ubuntu-14.04-lts-lemp
主要内容是:
-安装php5-fpm:apt-get install php5-fpm
-配置Nginx,修改之前所提官网上Nginx配置如下:

“`python
server {
server_name ph.cgh.com;
root /home/chang/phabricator/webroot;

location / {
index index.php;
rewrite ^/(.*)/index.php?__path__=/1 last;
}

location = /favicon.ico {
try_files $uri =204;
}

location /index.php {
# fastcgi_pass localhost:9000;
# fastcgi_index index.php;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
#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;

}
}

其中主要调整的是
“`python
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
然后server的配置应该写在http中。
nginx的配置文件在/etc/nginx/nginx.conf

待续

CENTOS 6 安装Nginx

参考:http://shmily2038.iteye.com/blog/1860063
主要是centos直接yum装nginx总是提示:Nothing to do
然后参考上文,先执行了
rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

之后yum install nginx搞定。

php-fpm

注意这里yum install php-fpm而不是php5.靠!!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值