A memorandum when installing PHP-made USVN that can manage Subversion on the web.

Using USVN, you can create repositories, manage users/groups, and set permissions for each folder from the web management screen.

Environment: CentOS 8.1, Apache 2.4.37, PHP 7.3.5, USVN 1.0.9

1. Install PHP7

php module list

# dnf module list php

install php7.3

# dnf module install php:7.3/common

Install other PHP modules

# dnf install php-mysqlnd php-gd

From CentOS8, php-fpm is used by default instead of Apache module.

Start, automatic start ON, confirmation

# systemctl start php-fpm

# systemctl enable php-fpm

# systemctl list-unit-files -t service | grep php-fpm

# php –version

Check if the execution user is apache

# less /etc/php-fpm.d/www.conf

Check php.conf

# less /etc/httpd/conf.d/php.conf

Apache reload

# apachectl configtest

# systemctl reload httpd

Create php file for confirmation

# vi /var/www/html/index.php

Enter the IP address in the browser and check if it is displayed.

Don’t forget to open the port.

2. Install MariaDB and phpMyAdmin

Omitted because it is almost same as before

3. Install USVN

USVN (User-friendly SVN) allows you to create repositories and manage users without using the svnadmin command.

Install it referring to the document on GitHub.

Check if various apache modules are installed

# cd /etc/httpd/conf.modules.d/

# grep dav ./*

# grep rewrite ./*

# grep authz ./*

git clone.

# cd /home/svn/

# git clone https://github.com/usvn/usvn.git

# cd usvn/

# git tag

# git checkout 1.0.9

Apache configuration

# less /etc/httpd/conf.d/01_svn.conf

<VirtualHost *:80>

ServerName svn.hoge.co.jp

DocumentRoot /home/svn/repo

<Location /.well-known/>

Require all granted

#USVN

Alias ​​/usvn /opt/software/usvn/src/public

<Location /usvn>

Options +SymLinksIfOwnerMatch

AllowOverride All

For Apache HTTP 2.2

#Order allow,deny

#Allow from all

For Apache HTTP 2.4

Require all granted

Reload

# apachectl configtest

# systemctl reload httpd

Display it in a browser.

The installation tutorial will start, so follow the instructions.

Setting access permissions

# cd /home/svn/usvn/src/

# chown apache.public/

# chown apache.config/

error.

PHP7 cannot use php_flog.

Change to .user.ini

# less public/.htaccess

#php_flag short_open_tag on

#php_flag magic_quotes_gpc off

# vi public/.user.ini

short_open_tag = on

magic_quotes_gpc = off

Even in STEP3, .htaccess is overwritten, so it was necessary to edit .htaccess.

Set permissions for Basic authentication

# chown apache. files/

In addition, I haven’t been setting up Apache for the first time in a long time, so I tried various errors and completed the installation.

4. Create a project for trial

Try to create a project from the management screen.

subversion.path + “svnadmin create” to’/svn/’.

Since I wrote it directly in the source code, I have to give up.

5. Import an existing svn project

I found a script so I will try it.

# cd src/library/tools/

# chmod +x usvn-import-svn-repositories.php

Run without arguments to display help.

# ./usvn-import-svn-repositories.php

Import execution, authorization

# ./usvn-import-svn-repositories.php ../../config/config.ini /home/old/project/

# chown apache.-R /home/svn/repo/svn/project/

The commit log is not displayed even when viewed on the management screen.

Same after importing after svnadmin upgrade.

Moving the whole directory worked.

# cd /home/svn/repo/

# svnadmin upgrade /home/old/project/

# rm -rf svn/project/

# mv /home/old/project/ svn/

# chown apache.-R svn/project/

Set write permission on the management screen.

If you are admin, you cannot set the write permission.

It could be set by adding another administrator.

I also set up SSL.

I don’t know much about the server because I don’t have much documentation on USVN.

The administration screen UI of USVN is difficult to understand, so I was urged to create it, but it is only used when creating a repository, so I think it’s okay.