参考文章phabricator搭建教程
由于教程是英文的,并且有一些细节和如何使用没讲清楚,这里我将分几篇详细介绍一下部署安装,如何使用以及分享自己做的docker镜像
我在新系统上测试通过,只配置了阿里云镜像源,参考centos7配置阿里云镜像源
根据以下步骤安装基本上不会有问题
1.关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
2.关闭selinux
vi /etc/selinux/config
SELINUX=disabled # 设置selinux为disabled
reboot # 重启机器
3.安装MariaDB
yum install mariadb mariadb-server
启动MariaDB
systemctl start mariadb.service
systemctl enable mariadb.service
设置MariaDB
/usr/bin/mysql_secure_installation
结果如下所示, <your-password>是你的数据库密码
Enter current password for root (enter for none): Enter
Set root password? [Y/n]: Y
New password:<your-password>
Re-enter new password:<your-password>
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
4.安装Apache
yum install httpd
修改httpd默认配置文件
sed -i 's/^/#&/g' /etc/httpd/conf.d/welcome.conf
sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/httpd/conf/httpd.conf
启动Httpd
systemctl start httpd.service
systemctl enable httpd.service
5.安装Php
phabricator的服务需要php5.5版本以上,这里安装7.2版本
yum install epel-release -y
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php72w php72w-mysqli php72w-mbstring php72w-gd php72w-curl php72w-cli php72w-common php72w-process
6.安装Git和Svn
svn如果不需要就可以不装
yum install git
yum install subversion
7.下载安装Phabricator
cd ~
mkdir phabricator
cd 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
cd ~
chown -R apache: ~/phabricator
mv ~/phabricator /var/www/html
8.为Phabricator设置虚拟主机
这里是为了能域名访问,需要把admin@example.com,
phabricator.example.com,
www.phabricator.example.com
,/var/log/httpd/phabricator.example.com-error_log,
/var/log/httpd/phabricator.example.com-access_log 替换成自己的值
但是一般是ip访问,所以直接复制即可
创建配置文件
vi /etc/httpd/conf.d/phabricator.conf
添加
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/phabricator/phabricator/webroot/
ServerName phabricator.example.com
ServerAlias www.phabricator.example.com
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
<Directory /var/www/html/phabricator/phabricator/webroot/>
AllowOverride All
</Directory>
ErrorLog /var/log/httpd/phabricator.example.com-error_log
CustomLog /var/log/httpd/phabricator.example.com-access_log common
</VirtualHost>
重启Httpd服务
systemctl restart httpd
访问服务器ip的80端口即可访问phabricator
9.为Phabricator设置MariaDB证书
<your-MySQL-root-password>是前面你设置MariaDB的密码
cd /var/www/html/phabricator/phabricator/
./bin/config set mysql.host localhost
./bin/config set mysql.port 3306
./bin/config set mysql.user root
./bin/config set mysql.pass <your-MySQL-root-password>
设置
./bin/storage upgrade
结果如下
Before running storage upgrades, you should take down the Phabricator web
interface and stop any running Phabricator daemons (you can disable this
warning with --force).
Are you ready to continue? [y/N] y
...
MySQL needs to copy table data to make some adjustments, so these migrations may take some time.
Fix these schema issues? [y/N] y
10.安装which
不装which会报Cannot find bianary错误
yum install which
11.通过ip访问
http://<your-Vultr-server-IP>
到这里就算安装成功,当然里面还有一些东西要设置,留到下篇文章讲解
效果如图