1. Install the Apacheapt-getinstallapache22. Install the MySQLapt-getinstallmysql-server3. Install the subversionapt-getinstallsubversionlibapache2-svnlibapache2-mod-auth-mysql4. Create a subversion project to modify the user so that
1. install Apache
Apt-get install apache2
2. Install MySQL
Apt-get install mysql-server
3. Install subversion
Apt-get install subversion libapache2-svn libapache2-mod-auth-mysql
4. Create a subversion project and modify users so that they can be accessed through HTTP
Svnadmin create/var/www/svn
Chown-R www-data/home/www/svn
5. Import the project
Svn import/tmp/shou/project file: // var/www/svn-m "comment"
6. Create a user verification database
- Creata table svn;
- CREATETABLEuser (
- Id INTEGERNOTNULLPRIMARYKEY AUTO_INCREMENT,
- Username char (128) notnull comment 'username ',
- Passwordchar (128) notnull comment 'Password'
- ) ENGINE = InnoDB default charset = utf8;
- INSERTINTOuser (username, password) VALUES ('admin', MD5 ('admin '));
7. Configure the Apache file, open the file/etc/apache2/sites-available/default, and add the following configuration information
-
- DAV svn
- SVNPath/var/www/svn
- AuthType Basic
- AuthName "Subversion Repository"
- Auth_MySQL On
- Auth_MySQL_Authoritative On
- Auth_MySQL_Host localhost
- Auth_MySQL_DB svn
- Auth_MySQL_User root
- Auth_MySQL_Password rootadmin
- Auth_MySQL_Password_Table user
- Auth_MySQL_Username_Field username
- Auth_MySQL_Password_Field password
- Auth_MySQL_Empty_Passwords Off
- Auth_MySQL_Encrypted_Passwords On
- Auth_MySQL_Encryption_Types PHP_MD5
- AuthBasicAuthoritative Off
- AuthUserFile/dev/null
- Require valid-user
-
※The preceding configuration information is recommended to be defined in the/etc/apache2/mod-available/dav_svn.conf file.