Apache2.4.16+SVN1.7.9+svnmanager1.10 升級 (三)

PHP最新版本下載地址:http://php.net/downloads.php

PHP舊版本的下載地址:http://php.net/releases/

1. 安裝PHP


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

[root@huadi-160219095359 php-5.6.11]# make && make install


2. 配置PHP

2.1 修改/etc/php.ini文件

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

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

 

2.2. 安裝完畢後,查看/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 )

 

2.3  測試php

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

<?
phpinfo();
?>

訪問http://192.168.44.47:8000/test.php, 如果顯示PHP的版本信息,說明PHP安裝成功。


3. 安裝svnmanager

svnmanager 1.10的下載地址: https://sourceforge.net/projects/svnmanager/files/svnmanager/

VersionControl_SVN-0.5.2的下載地址:http://pear.php.net/package/VersionControl_SVN/download


3.1. 將svnmanager解壓至/usr/local/apache/htdocs下:

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

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

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

3.2. pear安裝VersionControl_SVN-0.5.2 (與之前的版本不同,不需要再安裝XML_Parser包)

[root@huadi-160219095359 test_svn]# /usr/local/php/bin/pear install  trunk/src/dir1/VersionControl_SVN-0.5.2.gz
Package "pear.php.net/VersionControl_SVN" dependency "pear.php.net/PEAR" has no releases
install ok: channel://pear.php.net/VersionControl_SVN-0.5.2


4.MySQL5.1.51的安裝請參看http://blog.csdn.net/w171066/article/details/50825539


5. 創建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;


6.配置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_config_dir    =       "/tmp";

$svn_repos_loc = "/opt/svndata";

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

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

$smtp_server = "smtp.domain.org";

$dsn = "mysqli://svnadmin:newpassword@localhost/svnmanager";               (請注意這裏使用的是mysqli)

//Administrator account

$admin_name = "admin";

$admin_temp_password = "admin";





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章