Jak nastavit Phabricator (rychlý start)

Autor Hanz
Publikováno 30.03.2020 (update: 18.10.2020)
Kategorie Článek
Phabricator je zjednodušené řečeno sada nástrojů pro řízení a správu projektů. Umí toho hodně - úkoly, projekty, podprojekty, tagování, přiřazování uživatelům, rozumí si mimo jiné s repořitáři Git atd. Webové rozhraní vám nabídne moderní a intuitivní (velké plus oproti Redmine) vzhled, nalezneme zde i kanban nástěnku atd... Phabricator toho obsahuje tolik, že je problém vše vyzdvihnout a představit. Je distribuován pod Apache licencí , takže se jedná o opensource nástroj, běží na LAMP serveru.

Nyní už ale k prvotnímu nastavení. Předpokládá se, že máte svůj LAMP server a umíte základně spravovat Nginx (či Apache) a MySQL.

Zdrojové soubory


# zkopírujeme zdrojové soubory na náš server
mkdir /var/www/phabricator
cd /var/www/phabricator
git clone https://github.com/phacility/libphutil.git
git clone https://github.com/phacility/arcanist.git
git clone https://github.com/phacility/phabricator.git

Databáze


# nastavíme přístup k databázi
vim conf/local/local.json

{
"mysql.pass": "pass",
"mysql.user": "user",
"mysql.host": "localhost",
}


Práva


# nastavíme práva a vlastnictví souborům a adresářům
chown -R www-data:www-data /var/www/phabricator
chmod -R 755 /var/www/phabricator/

Nginx - virtualhost


# nastavíme virtualhost na portu 88 s použitím php7.3-fpm.sock
# pokud chcete nastavit apache virtualhost, podívejte se do dokumentace, je to tam jednoduše popsané
vim /etc/nginx/sites-available/88_phabricator.conf

server {
listen 88;
root /var/www/phabricator/phabricator/webroot;

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

location /index.php {
#fastcgi_pass localhost:9000;
#fastcgi_index index.php;

include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;


#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;
}
}




Možné chyby


Git repositář se nesynchronizuje


ERROR:
R1
Importing (0.00%)...
Empty Repository
This repository does not have any commits yet.
---------------------------------------
FIX:
# nastavit base uri
./bin/config set phabricator.base-uri 'http://192.168.1.100:88/'

Nelze odesílat emaily


ERROR:
./bin/mail list-outbound
42 Queued email No Subject
43 Queued email No Subject
....
-------------------------------------
FIX:
# nastavit smtp server
vim conf/local/local.json

"cluster.mailers": [
{
"key": "smtp",
"type": "smtp",
"options": {
"host": "smtp.helpdesk.up4.cz",
"port": 587,
"user": "user942",
"password": "pass754",
"protocol" : "tls"
}
}


Nelze odeslat testovací email - Invalid address: noreply@


ERROR:
./bin/mail send-test --to user264@helpdesk.up4.cz
Reading message body from stdin...
hello this is test message
^A[2020-03-26 19:46:01] EXCEPTION: (phpmailerException) Invalid address: noreply@192.168.1.100 at [/externals/phpmailer/class.phpmailer.php:494]
---------------------------------
FIX:
# nastavit email FROM
vim conf/local/local.json

"metamta.default-address": "user53@helpdesk.up4.cz"



Testovací email projde, ale z fronty nic nedorazí


ERROR:
1 Sent email [Phabricator] Email Verification
2 Voided email [Phabricator] New User "hanz" Awaiting Approval
3 Voided email [Phabricator] Phabricator Account "hanz" Approved
4 Voided email helpdesk.up4.cz
5 Voided email Phabricator
6 Voided email Phabricator

FIX:
Je třeba potvrdit Email Verification, pak začnou emaily chodit
Je třeba zapnout démona /bin/phd start
Ručně je možné jednotlivé emaily odeslat /bin/mail resend --id 71



0

The English language is translated by machine - the translator can modify eg cited codes = it is better to use codes from the Czech original.

How to set up Phabricator (quick start)

Phabricator is a simplified set of tools for project management and management. He can do a lot - tasks, projects, subprojects, tagging, assigning to users, he understands among other things Git reporters, etc. it contains so much that it is a problem to pick up everything and introduce it. It is distributed under Apache license, so it is an opensource tool, running on LAMP server.

But now for the initial setup. It is assumed that you have your LAMP server and can basically manage Nginx (or Apache) and MySQL.

Source files


# copy the source files to our server
mkdir / var / www / phabricator
cd / var / www / phabricator
git clone https://github.com/phacility/libphutil.git
git clone https://github.com/phacility/arcanist.git
git clone https://github.com/phacility/phabricator.git

Database


# set database access
vim conf / local / local.json

{
"mysql.pass": "pass"
"mysql.user":
"mysql.host": "localhost"
}


Rights


# set permissions and ownership of files and directories
chown -R www-data: www-data / var / www / phabricator
chmod -R 755 / var / www / phabricator /

Nginx - virtualhost


# set up virtualhost on port 88 using php7.3-fpm.sock
# if you want to set up apache virtualhost, see the documentation, it is simply described there
vim /etc/nginx/sites-available/88_phabricator.conf

server {
listen 88;
root /var/www/phabricator/phabricator/webroot;

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

location /index.php {
#fastcgi_pass localhost:9000;
#fastcgi_index index.php;

include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;


#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;
}




Possible Errors


Git repository is not syncing


ERROR:
R1
Importing (0.00%) ...
Empty Repository
This repository does not have any commits yet.
---------------------------------------
FIX:
# set base uri
./bin/config set phabricator.base-uri 'http://192.168.1.100:88/'

Unable to send emails


ERROR:
./bin/mail list-outbound
42 Queued email No Subject
43 Queued email No Subject
....
-------------------------------------
FIX:
# set up smtp server
vim conf / local / local.json

"cluster.mailers":
{
"key": "smtp"
"type": "smtp"
"options": {
"guest": "smtp.superuser.com",
"Port": 587
"user": "user942"
"password": "pass755",
"protocol": "tls"
}
}


Unable to send test email - Invalid address: noreply @


ERROR:
./bin/mail send-test --to user264@superuser.com
Reading message body from ...
hello this is test message
^ A [2020-03-26 19:46:01] EXCEPTION: (phpmailerException) Invalid address: noreply@191.168.1.100 at [ /externals/phpmailer/class.phpmailer.php:494]
---------------------------------
FIX:
# set email FROM
vim conf / local / local.json

"metamta.default-address": "user53@superuser.com"



The test email passes, but nothing arrives from the queue


ERROR:
Sent email [Phabricator] Email Verification
2 Voided Email [Phabricator] New User "hanz" Awaiting Approval
3 Voided Email Phabricator Phabricator Account "hanz" Approved
4 Voided e-mail helpdesk.up4.cz
4 Voided email Phabricator
6 Voided Email Phabricator

FIX:
You need to confirm Email Verification, then the emails will begin to arrive
You need to turn on the / bin / phd start daemon
You can manually send individual emails / bin / mail resend --id 71
Vaše reakce na článek Jak nastavit Phabricator (rychlý start)

Napsat komentář k článku

Tento web používá k poskytování služeb, personalizaci reklam a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tím souhlasíte. Další informace