PHABRICATOR on NS

I did some more cosmetics for getting the issues away in dashboard:

mkdir /var/repo

yum -y remove php-mysql
yum -y install php-mysqlnd python-pygments

config setprop php PostMaxSize 32
signal-event nethserver-php-update

config setprop mysqld MaxAllowedPacket 32M
signal-event nethserver-mysql-save

/var/lib/nethserver/vhost/phab/phabricator/bin/config set phabricator.base-uri 'https://yourdomain.tld/'

Create /etc/php.d/phabricator.ini with following content:

always_populate_raw_post_data = "-1"

Create /etc/my.cnf.d/phabricator.cnf:

[mysqld]
sql_mode=STRICT_ALL_TABLES
innodb_buffer_pool_size=1600M

Restart httpd and mysqld:

systemctl restart httpd mysqld

Finally enable syntax highlighting (pygments) via web UI, just click on the issue to configure it.

I’d caught some of those after installation, but this catches more. It still looks like the daemons need to be started manually after restart.

I’m not sure about the complaint about APC. When I do yum install php-apc, I get Package php-pecl-apcu-4.0.11-1.el7.x86_64 already installed and latest version. But Phabricator doesn’t seem to either see that it’s installed, or consider it to be equivalent.

You’re right, to start the daemons:

/var/lib/nethserver/vhost/phab/phabricator/bin/phd start

I even tried to compile it with pecl install apc but no luck so far.

This remains for me after installing account provider, which I am actually working on:

grafik

Sure, that’s easy enough–but it would be good to have it auto-start on boot. The “alternate file domain” sounds like it’s going to depend on having your file storage somewhere else, so it just might not be available for a simple installation.

The “large file storage” looks like it would be resolved by

chown apache:apache /var/repo
bin/config set storage.local-disk.path /var/repo
1 Like

Right, we have to put it to systemd and make a nethservice out of it or be lazy and put the line to /etc/rc.local

Agree, it’s not mandatory.

For AD account provider I had to add the “ldap server require strong auth = no” to /var/lib/machines/nsdc/etc/samba/smb.conf, didn’t try TLS. I set auth.require-approval to false in web UI.

LDAP Hostname: ldap://ad.domain.local
LDAP Port: 389
Base Distinguished Name: cn=Users,dc=AD,dc=DOMAIN,dc=LOCAL
Search Attributes: cn
Username Attribute: cn
Realname Attributes: displayName
ActiveDirectory Domain: ad.domain.local

After switching to LDAP account provider, I couldn’t login as admin anymore but AD users working so I had to recover the admin:

/var/lib/nethserver/vhost/phab/phabricator/bin/auth recover admin

I am slightly lost here.

but thanks for setting it up,highly appreciated, will try to set it up on my side

the below cosemtics are they after the procedure of @danb35 or somewhere in the middle.

I think creating a new mysql user for phabricator would be the better way to go here and then grant all permissions on the phabricator database to that new mysql user.

In mysql prompt:

CREATE DATABASE database-name;
GRANT ALL PRIVILEGES ON database-name.* TO “user”@“hostname” IDENTIFIED BY “password”;

Where you can change ‘user’ to phab (or something else you like) and if you run mysql/mariadb on the same server (usualy the case on NethServer) hostname should be localhost, and where database-name is the name of the db. You can give that any name you want. It might be a good idea to name it phabricator.

The “cosmetics” have to be done after the install procedure explained by Dan.

There’s a root password for MySQL. When you’re logged in as root, MySQL reads that password from /root/.my.cnf. However, the bin/storage script isn’t smart enough to do that, even when running as root. So this command:

tells it to use the password that’s stored in /var/lib/nethserver/secrets/mysql. Edit: If your confusion was in what to type, type (or copy/paste) that exact thing–dollar sign, parens, etc.

In retrospect, I’m inclined to agree.

Edit: but it doesn’t look like it’d be enough to grant all on phabricator.* to...–Phabricator creates about 60 databases with names of phabricator_something, each with multiple tables.

I’ve created a repo in Phabricator and set it to observe one of my github projects, and that seems to be working as expected. If you want to work with subversion, just do yum install svn.

Thanks all for your efforts,
I finally managed to setup the phabricator service on my domain.
the challenge I am currently facing is with setting up ldap authentication.

has anyone managed to setup ldap authentication correctly. I have a separate nethserver setup for the ldap authentication.

kindly if possible a step by step process

Did you try a google search. Probably others have encountered the same.
for instance for AD: https://brablc.com/2013/08/21/phabricator-ldap-ad/
for LDAP: https://rekinyz.wordpress.com/2016/02/05/how-to-configure-the-phabricator-ldap-login/

Probably more examples. I must say that the Phabricator docs are a big MESS on this…

I’d say “absolutely useless” on this, as they’ve honestly been for a number of other things.

Advocat-of-the-devil-mode: Would docs deliberately be that useless so they can sell more hosted versions of Phabricator?
/devil-mode

I guess that’s their tactic.
they have made most of the documentations not usefull to sell more hosted version.
the unfortunate bit, the hosted version does not even support ldap.

I have been tinkering and having a look at the software, I managed to setup internal account manager, but it can not send email verification. getting information on how to setup smtp, no usefull information on their official documentation.

I noticed its impossible to install a letsencrypt ssl after installing phabricator,

I seriously doubt that’s the case, but I got a cert before installing it, and I use DNS validation.

Edit: I probably need to tweak the virtual host configuration so that .well-known goes to the right place. Since I use DNS validation, I don’t use that path.

Edit 2: Yeah, it’s something in the vhost configuration. I’m 99% sure you can fix it by putting the contents of /etc/httpd/conf.d/letsencrypt.conf just before the </VirtualHost> tag in the template fragment, but I won’t be able to test this for a few hours at least.

Looks like that answer might be here:
https://discourse.phabricator-community.org/t/how-to-start-phd-automatically/1640