linux svn客戶端通過 https訪問windows VisualSVN Server Manager

 2023-12-25 阅读 32 评论 0

摘要:1)需求: ? 已經在阿里云windwos系統 下面安裝了VisualSVN Server Manager 做為svn服務器; ? ? ? ? ? ? ? ? ? ?現在要在騰訊云源碼安裝新版本客戶端 ?? 2)開始源碼編譯安裝TortoiseSVN: ? ? ?1)卸載當前自動安裝的svn? yum remove

1)需求:

? 已經在阿里云windwos系統 下面安裝了VisualSVN Server Manager 做為svn服務器;

? ? ? ? ? ? ? ? ? ?現在要在騰訊云源碼安裝新版本客戶端

??

2)開始源碼編譯安裝TortoiseSVN:

? ? ?1)卸載當前自動安裝的svn?

             yum remove subversion

? ? ?2 )下載依賴包 如下:

? ? ? ? ? ?1、subversion-1.10.0.zip(http://subversion.apache.org/download/)

? ? ? ? ? ?2、apr-1.6.3.tar.bz2 (http://apr.apache.org/download.cgi)隱藏操作系統細節共享庫

? ? ? ? ? ?3、apr-util-1.6.1.tar.bz2 (http://apr.apache.org/download.cgi)

? ? ? ? ? ?4、serf? ?(http://serf.apache.org/download)subversion1.8.0之前都是用neon來支持http/https,之后都是用serf來支持的;

? ? ? ? ? ?5、scons? (https://www.scons.org/pages/download.html)注意:類似于cmake (這個源碼安裝不好裝 直接yum install scons就行了 反正版本差別不大就行)

? ? ? ? ? ?6、sqlite 3.8.2 (http://www.sqlite.org/download.html)( 這里要是版本號,注意)

? ? ? ? ? ?7、httpd 2.4.7 ?(http://httpd.apache.org/)??

命令history?

3030 2018-06-29 07:41:48?wget http://mirrors.hust.edu.cn/apache/subversion/subversion-1.10.0.tar.gz?
3038 2018-06-29 07:46:20 wget https://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.3.tar.bz2
3040 2018-06-29 07:55:16 wget https://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.bz2
3044 2018-06-29 08:17:31 wget http://mirrors.hust.edu.cn/apache//httpd/httpd-2.4.33.tar.gz
3047 2018-06-29 08:20:57 wget https://www.apache.org/dist/serf/serf-1.3.9.tar.bz2
3049 2018-06-29 08:23:31 wget https://jaist.dl.sourceforge.net/project/scons/scons/3.0.0/scons-3.0.0.tar.gz
3052 2018-06-29 08:27:14 wget?https://www.sqlite.org/2018/sqlite-autoconf-3240000.tar.gz

安裝基本的庫和工具

? ? ? yum install gcc gcc-++ make pcre-develzlib-devel openssl openssl-devel pcre pcre-devel -y (因為我己經安裝了 gcc g++ make openssl 所以跳過這步)

3)解壓下載的包

3056 2018-06-29 08:35:42 tar -jxvf apr-1.6.3.tar.bz2??
3058 2018-06-29 08:35:54 tar -jxvf apr-util-1.6.1.tar.bz2??
3062 2018-06-29 08:36:37 tar -zxvf httpd-2.4.33.tar.gz??
3064 2018-06-29 08:36:54 tar -jxvf serf-1.3.9.tar.bz2??
3066 2018-06-29 08:37:13?tar -zvxf sqlite-autoconf-3240000.tar.gz

?

4)開始安裝

? ? ? ??安裝?sqlite?apr???apr-util

3068 2018-06-29 08:37:57 cd apr-1.6.3/?
3070 2018-06-29 08:38:02 ./configure --prefix=/usr/local/apr
3071 2018-06-29 08:38:46 make && make install
3075 2018-06-29 08:39:38 cd apr-util-1.6.1/
3076 2018-06-29 08:39:45 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
3077 2018-06-29 08:39:57 make && make install??
在CentOS7最小安裝版下,編譯安裝apr-util時報錯:

fatal error: expat.h: No such file or directory?

解決辦法:yum install expat-devel

?3080 2018-06-29 08:42:25 yum install expat-devel
3081 2018-06-29 08:42:37 make && make install?

安裝?sqlite

3099 2018-06-29 08:48:37 cd sqlite-autoconf-3240000/
3100 2018-06-29 08:48:39 ./configure
3101 2018-06-29 08:49:36 make && make install

?安裝?scons

?3107? 2018-06-29 08:55:28 yum install scons

編譯安裝serf

3116 2018-06-29 09:01:21 cd serf-1.3.9/
3117 2018-06-29 09:01:35 scons APR=/usr/local/apr APU=/usr/local/apr-util OPENSSL=/usr/bin PREFIX=/usr/local/ser
3118 2018-06-29 09:01:53 scons install

編譯安裝httpd

./configure --prefix=/usr/local/apache --enable-dav --enable-so-nable-rewrite --enable-maintainer-mode --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

make?&&?make?install

今天編譯安裝apache 2.2 時,到了make后出現如下錯誤,

make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.0.63/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.0.63/support'
make: *** [all-recursive] Error 1?

解決辦法

#mv /usr/lib/libm.a /usr/lib/libm.a.bak 這句?
#ln -s /usr/lib64/libm.a /usr/lib/libm.a 這句??

分析

由于我的CENTOS 是 64bit的,在編譯配置中并沒有指定?--with-included-apr的具體引用路徑,導致找不到相應的庫文件,而?--with-included-apr 默認是查找/usr/lib下的庫文件,而,正確的引用應該是/usr/lib64下的。這類情況在64bit下非常常見,請L友們注意了!

搞不清楚,還是有錯,

然后回滾了一下。。。

3122 2018-06-29 09:04:17 ./configure --prefix=/usr/local/apache --enable-dav --enable-so-nable-rewrite --enable-maintainer-mode --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
3123 2018-06-29 09:04:40 make && make install
3124 2018-06-29 09:07:57 mv /usr/lib/libm.a /usr/lib/libm.a.bak?
3128 2018-06-29 09:08:37 ln -s /usr/lib64/libm.a /usr/lib/libm.a
3129 2018-06-29 09:08:47 make && make install??
3133 2018-06-29 09:10:49 mv /usr/lib/libm.a.bak /usr/lib/libm.a
3134 2018-06-29 09:11:22 make && make install??

不知什么情況遇到下面情況,因為我的apr版本是1.6 會有這個問題是少庫

/usr/local/apr-util/lib/libaprutil-1.so:?undefined?reference?to?`XML_GetErrorCode'
/usr/local/apr-util/lib/libaprutil-1.so:?undefined?reference?to?`XML_SetEntityDeclHandler'
/usr/local/apr-util/lib/libaprutil-1.so:?undefined?reference?to?`XML_ParserCreate'
/usr/local/apr-util/lib/libaprutil-1.so:?undefined?reference?to?`XML_SetCharacterDataHandler'
/usr/local/apr-util/lib/libaprutil-1.so:?undefined?reference?to?`XML_ParserFree'
/usr/local/apr-util/lib/libaprutil-1.so:?undefined?reference?to?`XML_SetUserData'
/usr/local/apr-util/lib/libaprutil-1.so:?undefined?reference?to?`XML_StopParser'
/usr/local/apr-util/lib/libaprutil-1.so:?undefined?reference?to?`XML_Parse'
/usr/local/apr-util/lib/libaprutil-1.so:?undefined?reference?to?`XML_ErrorString'
/usr/local/apr-util/lib/libaprutil-1.so:?undefined?reference?to?`XML_SetElementHandler'
collect2:?error:?ld?returned?1?exit?status
make[2]:?***?[htpasswd]?Error?1
make[2]:?Leaving?directory?`/usr/local/httpd-2.4.26/support'
make[1]:?***?[all-recursive]?Error?1
make[1]:?Leaving?directory?`/usr/local/httpd-2.4.26/support'
make:?***?[all-recursive]?Error?1
于是乎

3140 2018-06-29 09:16:09 yum install -y libxml2-devel
3141 2018-06-29 09:16:27 cd ..?

//刪掉己裝的/apr-util
3143 2018-06-29 09:16:42 rm -rf /usr/local/apr-util
3144 2018-06-29 09:17:27 cd apr-util-1.6.1/

重新裝一遍/apr-util
3145 2018-06-29 09:17:29 make clean
3146 2018-06-29 09:17:48 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
3147 2018-06-29 09:17:58 make && make install

?再試試?httpd-2.4.33/
3150 2018-06-29 09:18:32 cd httpd-2.4.33/
3151 2018-06-29 09:18:55 ./configure --prefix=/usr/local/apache --enable-dav --enable-so-nable-rewrite --enable-maintainer-mode --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
3152 2018-06-29 09:19:26 make && make install?

httpd-2.4.33 ok了 沒報錯

接下來安裝? ? subversion ??

2955 2018-06-29 09:48:48 tar -zvxf subversion-1.10.0.tar.gz??
2957 2018-06-29 09:48:52 cd subversion-1.10.0/?
2959 2018-06-29 09:49:20 ./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-openssl --with-serf=/usr/local/serf
2960 2018-06-29 09:49:36 make && make install?

報錯需要先安裝?serf-1.3.9
2963 2018-06-29 09:50:47 cd serf-1.3.9/?
2965 2018-06-29 09:51:11 scons APR=/usr/local/apr APU=/usr/local/apr-util OPENSSL=/usr/bin PREFIX=/usr/local/serf
2966 2018-06-29 09:51:49 scons install?

再試?subversion 報錯
2970 2018-06-29 09:52:35 cd subversion-1.10.0/??
2986 2018-06-29 09:55:19 ./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-openssl --with-serf=/usr/local/serf
2987 2018-06-29 09:55:33 make && make install

報錯原因是沒有?--with-lz4庫 要手動指定一下選項??--with-lz4=internal?再試?subversion?
2989 2018-06-29 09:56:07 make clean?
2991 2018-06-29 10:00:46 ./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-openssl --with-serf=/usr/local/serf --with-lz4=internal
2992 2018-06-29 10:01:15 make && make install

報錯原因是沒有?--with-utf8proc庫 要手動指定一下選項??---with-utf8proc=internal? (?with-utf8proc=internal:如果您安裝了可選的依賴關系,請將其刪除。)?再試?subversion?
2993 2018-06-29 10:01:24 ./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-openssl --with-serf=/usr/local/serf --with-lz4=internal
2994 2018-06-29 10:05:06 yum install utf8proc? 也沒用 必須?internal?

3050 2018-06-29 18:01:20 ./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-openssl=/usr/local/ssl --with-serf=/usr/local/serf --with-lz4=internal --with-utf8proc=internal
3053 2018-06-29 18:01:55 make clean
3054 2018-06-29 18:01:58 make
3055 2018-06-29 18:07:54 make install

subversion?安裝成功

拷貝依賴的動態庫

3059 2018-06-29 18:08:51 cd serf-1.3.9/?
3061 2018-06-29 18:09:51 cp libserf-1.so.1 /usr/local/subversion/lib/

添加環境變量
3062 2018-06-29 18:10:10 vim /etc/profile 行尾加上

export PATH=/usr/local/subversion/bin/:${PATH}

立即生效

.??/etc/profile?

svn -version?

成功看到輸出信息

[root@VM_162_1_centos subversion]# svn --version
svn, version 1.10.0 (r1827917)
compiled Jun 29 2018, 18:02:41 on x86_64-unknown-linux-gnu

Copyright (C) 2018 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
- using serf 1.3.9 (compiled with 1.3.9)
- handles 'http' scheme
- handles 'https' scheme

The following authentication credential caches are available:

* Plaintext cache in /root/.subversion
* GPG-Agent

[root@VM_162_1_centos subversion]#

?

到這就源碼安裝完成了?

3)發現在centos 7.5 下面 sqlite3 是低版本的,通過源碼安裝之后 再運行 報錯了
? ? ? ? ? ? ? ? ? SQLite compiled for 3.24.0, but running with 3.7.17
? ? ? ? ?自己編譯安裝的是 3.24 以前自帶的是 3.7?
? ? ? ? ?而編譯subversion 的時候己經源碼安裝了?3.24.0 引用的是?3.24.0的頭文
? ? ? 但是不知道是?sqlite3 源碼安裝錯了還是怎么回事(沒有報錯,但是sqlite3都沒有拷到 use/bin目錄,是我手動拷的,拷完還是不行)
? ? ? 拷完之后執行?sqlite3 --version 版本就變正確了但還是報??? ? ? ? SQLite compiled for 3.24.0, but running with 3.7.17 重啟也不行
? ? ? 也許是環境變量的問題?有可能是之前某個地方用到了原來的?3.7.17 的東西,再到 /etc/profile 或者說沒 依賴/etc/profile。
?
? ? 最后還是沒有解決
4 最后還是不要用源碼安裝了?
? ? ? ?不用源碼安裝? 用默認的版本 yum install svn??
? ? ? ?svn --version?
?

[root@VM_162_1_centos svntest]# svn --version
svn, version 1.7.14 (r1542130)
compiled Apr 11 2018, 02:40:28

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
- handles 'http' scheme
- handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- with Cyrus SASL authentication
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme

[root@VM_162_1_centos svntest]#

?

好吧,測試了 yum install 出來的 1.7.14,能用。

?

3010 2018-06-29 21:07:29 svn co https://(公網ip):443/svn/myCode/branches/game . --username usss?
3015 2018-06-29 21:08:43 ll >> info?
3017 2018-06-29 21:09:15 svn add info??
3027 2018-06-29 21:13:46 svn update?
3033 2018-06-29 21:15:36 svn ci info -m"test"?

?

弄了半天是白拆騰

? ? ? ? ? 原來之前就是可以用的 只不過提示 接受https 證書時提示不安全要求輸入p繼續。然后就可以了。。。不過好像??httpd 2.4.7 裝了是有用的。不管它了,現在svn 能工作就行了。

?

?

??
? ?

轉載于:https://www.cnblogs.com/heling/p/9241644.html

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/2/194953.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息