Installing Required Components
If you are installing on Ubuntu or an RedHat derivative, there are install scripts available which should handle most of the things discussed in this document for you:
- RedHat Derivatives: http://www.phabricator.com/rsrc/install/install_rhel-derivs.sh
- Ubuntu: http://www.phabricator.com/rsrc/install/install_ubuntu.sh
here's a general description of what you need to install:
- git (usually called "git" in package management systems)
- Apache (usually "httpd" or "apache2") (or nginx)
- MySQL Server (usually "mysqld" or "mysql-server")
- PHP (usually "php")
- Required PHP extensions: mbstring, iconv, mysql (or mysqli), curl, pcntl (these might be something like "php-mysql" or "php5-mysql")
- Optional PHP extensions: gd, apc (special instructions for APC are available below if you have difficulty installing it), xhprof (instructions below, you only need this if you are developing Phabricator)
Now that you have all that stuff installed, grab Phabricator and its dependencies:
$ cd somewhere/ # pick some install directory somewhere/ $ git clone git://github.com/facebook/libphutil.git somewhere/ $ git clone git://github.com/facebook/arcanist.git somewhere/ $ git clone git://github.com/facebook/phabricator.git
from http://www.phabricator.com/docs/phabricator/article/Installation_Guide.html
mysql:
cd /path/to/phabrichator/bin
:/usr/development/facebook/phabricator/bin$ ./config list | grep "mysql" mysql.configuration-provider mysql.host mysql.implementation mysql.pass mysql.user storage.mysql-engine.max-size
./configure set mysql.user root ./configure set mysql.pass passwd ./conffgure set mysql.host localhost
nginx:
502 bad gateway
netstat -an|grep 9000-------------------to see if php5-fpm is using this port ortherwise, sudo apt-get install php5-fpm then, sudo vi /etc/php5/fpm/php.ini---------set>> cgi.fix_pathinfo=0 sudo vi /etc/php5/fpm/pool.d/www.conf---------------set>> listen = 127.0.0.1:9000
nginx.conf
server { listen 520; server_name phabricator.example.com; root /usr/development/facebook/phabricator/webroot; try_files $uri $uri/ /index.php; location / { index index.php; if ( !-f $request_filename ) { rewrite ^/(.*)$ /index.php?__path__=/$1 last; break; } } 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; } }
so,visit via 127.0.0.1:520
notes:
1,http://www.phabricator.com/docs/phabricator/article/Installation_Guide.html
2,http://waynemay.com/using-phabricator-on-nginx/
3,http://www.nginx.cn/76.html