Apache: Configure svn, php apache: Configure svn and php environments
Tools to be prepared
Apache: http://mirror.bit.edu.cn/apache//httpd/binaries/win32/
Svn client: http://tortoisesvn.net/downloads.html
Svn server: http://subversion.apache.org/packages.html
Php: http://windows.php.net/download/
Mysql: http://dev.mysql.com/downloads/mysql/
The required tools are all here. configure the php environment first.
1. install apache. my apache path is D: \ Php \ apache.
2. install mysql data
3. decompress the downloaded Php file in D:/Php, for example, D: \ php \ Php.
4. configure the httpd. conf file in the conf directory of apache as follows:
Find the # LoadModule code segment and add the following code after it:
LoadModule php5_module "D:/Php/php/php5apache2_2.dll"PHPIniDir "D:/Php/php"AddType application/x-httpd-php .php .html .htm
Modify the apache project release Directory
DocumentRoot "F:/Work/Php"
DirectoryIndex index.php index.html
5. change php. ini-developement in the php directory to php. ini.
Open the file and modify it as follows:
Find # extension_dir = "ext" and remove #. replace ext with the following path:
Extension_dir = "D:/Php/php/ext"
Found; code starting with extension
Open the following configuration:
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_xmlrpc.dll
Change the time zone and find # date. timezone = change to date. timezone = Asia/Shanghai.
Restart apache. if the restart succeeds, the php environment is successfully configured.
Configure the svn server environment
1. install the svn server
2. install the svn client (if you test it yourself, you can install it for testing convenience. if you install it on a real server, you do not need to install it)
3. find the following code in the httpd. conf directory of apache and remove the comment.
#LoadModule dav_module modules/mod_dav.so#LoadModule dav_fs_module modules/mod_dav_fs.so
After removing the comment, add the following code:
LoadModule dav_svn_module "C:/Program Files (x86)/Subversion/bin/mod_dav_svn.so"LoadModule authz_svn_module "C:/Program Files (x86)/Subversion/bin/mod_authz_svn.so"
Add the following at the end of the file:
DAV svnSVNListParentPath onSVNParentPath D:/share/# core repository directory AuthType BasicAuthName "Subversion repositories" AuthUserFile D:/Php/apache/conf/svn/passwd # username/password AuthzSVNAccessFile D: /Php/apache/conf/svn/authz # store permission files
Require valid-user
Create the svn directory in the conf directory and add the passwd and authz files to the directory.
Passwd is used to store user/password
Authz is a permission file
4. create the username and password, open the doc command, and switch to the bin directory under apache.
Enter the following command
Htpasswd-c D:/Php/apache/conf/svn/passwd username
Press enter to enter the password twice.
To add another user, remove-c as follows:
Htpasswd D:/Php/apache/conf/svn/passwd username
5. configure permissions
[groups]admin=arvin[/]*=r@admin=rw
6. create a core repository and run the following command:
svnadmin create D:/Share/svnrepo
Now you have configured the svn server environment and restarted apache.
Enter http: // 127.0.0.1/svn in the browser, and enter the user name and password to access the repository.