Strictly speaking, configuration management is not in the scope of Ci, but I personally think that as a process improvement practice, the better configuration management is, the more conducive to CI implementation. How to manage configuration, not this articleArticle. I want to introduce Version Control in two key aspects of Configuration Management (Configuration Policy and version control. Starting from the use of version management tool SVN, this article mainly introduces how to build SVN servers.
SVN (subversion) is a well-known open-source version control software. I believe many developers are using it.CodeManagement. For more information, see http://subversion.apache.org /. You may know how to use SVN for daily code check in and check out, but you may not necessarily know how to build a SVN server. This blog is mainly about this. All of the following operations are performed on Ubuntu, so you may need to know something about ubuntu.
The first step for building SVN is to install it. You can do this in Ubuntu.
Sudo apt-Get install subversion libapache2-svn libapache-mod-Dav apache2
If the installation fails because the installation package cannot be found, runApt-Get Install update.
Step 2: Enable SSL,
Sudo a2enmod sslsudo sh-c "Echo 'Listen 443 '>/etc/apache2/ports. conf"
Because the default SSL port is port 443, we add it to the Apache port configuration file.
The third step is to generate SSL authentication. here we need to install the SSL authentication service first.
Sudo apt-Get install SSL-certsudo mkdir/etc/apache2/sslsudo/usr/sbin/make-SSL-Cert/usr/share/SSL-Cert/ssleay. CNF/etc/apache2/SSL/Apache. PEM
Step 4: Create a site. The $ sitename environment variable here can be a name you like.
Sudo CP/etc/apache2/sites-available/default/etc/apache2/sites-available/$ sitenamesudo Vim/etc/apache2/sites-available/$ sitename
Then modify the site configuration file as follows:
The next step is to configure an account for SVN access:
Sudo htpasswd2-C-M/etc/apache2/dav_svn.passwd $ auth_user
Restart the apache service to start the site.
Sudo a2ensite $ sitenamesudo/etc/init. d/apache2 restart
If it fails, it may be that the VM is not found by Apache. Add this line.Servername $ servername To/Etc/apache2/apache2.confFile.
Step 5: when creating the svn knowledge base, create a directory to store SVN configuration information, and then create an environment variable $ repos to store the content and change its access permissions.
Sudo mkdir/var/svnsudo export repos = path of your knowledge base sudo svnadmin create/var/SVN/$ repossudo chown-r www-data: WWW-data/var/SVN/$ repossudo chmod-r g + WS/var/SVN/$ Repos
Step 6 Add the basic authentication information. $ auth_user just gives the user name you like.
Sudo htpasswd2-C-M/etc/apache2/dav_svn.passwd $ auth_user
Modify the WebDAV and SVN configuration files.Sudo Vim/etc/apache2/mod-available/dav_svn.confAdd the following content:
Dav svnsvnparentpath/var/svnauthtype basicauthname "Subversion repository" authuserfile/etc/apache2/dav_svn.passwdrequire valid-usersslrequiressl
And cancel the comments of the two rows.
# <Limittransfert get PROPFIND Options Report> # </limittransfert>
Alas! Configuring the svn server is really troublesome! Fortunately, this is the last step. For the rest, restart Apache to enable our configuration.
Sudo/etc/init. d/apache2 restart
If everything is normal and you haven't typed the wrong letter, Apache should be able to start normally. Let's test it.
Enter https: // localhost/SVN/your knowledge base name in your browser address bar. The prompt "enter user name and password" dialog box appears. After you pass the authentication, you will see the following interface (test.html is imported by myself, and there should be no files by default ).
If no error occurs in the above steps, the interface will be displayed normally. If it fails, the error 403 is used in most cases. Check the port and directory permissions. (PS: I have not configured the HTTP protocol successfully, but unfortunately ).