SvnManager1.0.5+httpd2.2.3+SVN1.4.6+PHP5.2.8+MySQL5.1.51

来源:互联网 发布:沉迷网络英语作文 编辑:程序博客网 时间:2024/06/05 19:54

准备SVNManager源代码包(v1.05):下载地址:http://nchc.dl.sourceforge.net/sourceforge/svnmanager/svnmanager-1.05.tar.gz

 

1. 将svnmanager解压至/usr/local/apache/htdocs下:

[root@localhost htdocs]# mv  /opt/svnmanager-1.05.tar.gz  .

[root@localhost htdocs]# tar zxvf  svnmanager-1.05.tar.gz

[root@localhost htdocs]# mv svnmanager-1.05    svnmanager

 

2. 安装MySQL。

SVNManager是一个基于PHP的网络工具来管理Apache的Subversion仓库服务器.所以必须安装上PHP。而PHP的安装需要先安装MySQL

[root@localhost svnmanager]# rpm -ivhMySQL-server-community-5.1.50-1.rhel5.i386.rpm

[root@localhost svnmanager]# rpm -ivhMySQL-client-community-5.1.50-1.rhel5.i386.rpm
[root@localhost svnmanager]# rpm -ivhMySQL-devel-community-5.1.50-1.rhel5.i386.rpm


 

3. 安装PHP

[root@localhost opt]# tar zxvf php-5.2.8.tar.gz

[root@localhost opt]# cd php-5.2.8
[root@localhost php-5.2.8]# ./configure --prefix=/usr/local/php  --with-apxs2=/usr/local/apache/bin/apxs   --with-mysql --with-zlib    --with-gd     --with-pear    --with-config-file-path=/etc/   --with-gettext

[root@localhost php-5.2.8]# make

[root@localhost php-5.2.8]#make install

 

4. 配置PHP

[root@localhost php-5.2.8]# cp php.ini-dist    /etc/php.ini
[root@localhost php-5.2.8]# vi /etc/php.ini

添加一行:  include_path = ".:/usr/local/php/lib/php"

 

 

5. 安装完毕后,查看/usr/local/apache/conf/httpd.conf文件,发现多了一行


LoadModulephp5_module       modules/libphp5.so

(说明php模块已经添加)

 
在“#AddType application/x-gzip .gz .tgz” 下加二行
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps (解析php用)

 
将 DirectoryIndex index.html 改为 DirectoryIndex index.html  index.php

(自动打开目录下的index.php )

 

 

6. 测试php
vi /usr/local/apache/htdocs/test.php

vi /usr/local/apache/htdocs/test.php

<?
phpinfo();
?>

访问http://192.168.44.47:8000/test.php, 如果显示PHP的版本信息,说明PHP安装成功。


7. Pear 安装VersionControl_SVN-0.3.4

[root@huadi-160219095359 bin]# ./pear install VersionControl_SVN
No releases available for package "pear.php.net/VersionControl_SVN"
Cannot initialize 'channel://pear.php.net/VersionControl_SVN', invalid or missing package file
Package "channel://pear.php.net/VersionControl_SVN" is not valid
install failed

说明无法从网站上取得包,于是把VersionControl_SVN-0.3.4下载到本地,问题就解决了。

# ./pear install /backup/XML_Parser-1.3.6.gz
install ok: channel://pear.php.net/XML_Parser-1.3.6

# ./pear install /usr/local/php/bin/VersionControl_SVN-0.3.4.gz
install ok: channel://pear.php.net/VersionControl_SVN-0.3.4


8. 创建svnmanager数据库

[root@svn tools]# /use/local/mysql/bin/mysql -u root -p
mysql>create database svnmanager;
mysql>grant all privileges on svnmanager.* to svnadmin@localhost identified by 'newpassword';
mysql>flush privileges;
mysql>quit;


9.配置svnmanager中的config.php文件

svnmanager的配置文件在/usr/local/apache/htdocs/svnmanager目录下,有一个config.php.linuxconfig.php.win,分别针对LinuxWindows操作系统下的配置模板.Copy config.php.linux 到config.php.

修改如下:
$htpassword_cmd = "/usr/local/apache/bin/htpasswd";

$svn_cmd = "/usr/local/svn/bin/svn";

$svnadmin_cmd = "/usr/local/svn/bin/svnadmin";

$svn_repos_loc = "/opt/svndata";

$svn_passwd_file = "/opt/svndata/passwdfile";

$svn_access_file = "/opt/svndata/accessfile";

$smtp_server = "smtp.domain.org";

$dsn = "mysql://svnadmin:newpassword@localhost/svnmanager";

//Administrator account

$admin_name = "admin";

$admin_temp_password = "admin";


访问http://192.168.44.47:8000/svnmanager   就会出现svnmanager的登陆界面了。

 


1 0
原创粉丝点击