【ubuntu 18.04】安装apache2+php7+phabricator环境

1. 官网文档

https://secure.phabricator.com/book/phabricator/article/configuration_guide/

2. 安装apache2

sudo apt-get install dpkg-dev 
sudo
apt-get install apache2

3. 安装php7.2及支持扩展

sudo apt-get install php php-mysql php-gd php-curl php-apcu php-cli php-json php-mbstring
# 启动支持模块
sudo
a2enmod proxy_fcgi setenvif sudo a2enconf php7.2-fpm sudo a2enmod rewrite && sudo service apache2 restart # sudo a2enmod rewrite && sudo /etc/init.d/apache2 restart sudo systemctl reload apache2

4. 安装mysql5.7

sudo apt-get install mysql-server 

5. 安装git

sudo apt-get install git

6. 拉取项目

cd ~
# git clone https://github.com/phacility/libphutil.git # 新版不需要 git clone https://github.com/phacility/arcanist.git git clone https://github.com/phacility/phabricator.git

7. 配置Apache配置

sudo vim /etc/apache2/sites-enabled/000-default.conf

复制代码
<VirtualHost *>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        # ServerAdmin webmaster@localhost
        ServerName localhost:9999
        DocumentRoot /home/master/phabricator/phabricator/webroot

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
        RewriteEngine on
        RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]

        <Directory "/home/master/phabricator/phabricator/webroot">
          Require all granted
        </Directory>

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
复制代码

sudo vim /etc/apache2/ports.conf

改下默认端口, 因为我的80已经被使用

复制代码
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 9999

<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
复制代码

8. 重启服务生效配置

sudo systemctl reload apache2
sudo systemctl start apache2
# 如果有报错, 可以用下面提示命令查看服务报错原因
journalctl
-xe

9. 访问http://127.0.0.1:9999/ 初始化配置


# 配置数据库
sudo ./bin/config set mysql.host 127.0.0.1
sudo ./bin/config set mysql.user root
sudo ./bin/config set mysql.pass 123456
# 初始化数据库
sudo ./bin/storage upgrade

10. 设置初始管理员账号

11. 启动认证 Username/Password

12. 重新注册用户

 

 手动修改数据库isAprroved为1即可登录

 

 

问题1:管理员设置后,注销了,又没启用认真和注册功能,怎么重新登录

./bin/auth recover <username>

 

参考链接:

https://segmentfault.com/a/1190000011183530

posted @   代码诠释的世界  阅读(202)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示