为了修复安全问题,升级OS由REDHAT 5.4到5.11。
[root@svnsubv etc]# hostname
svnsubv
[root@svnsubv etc]# more redhat-release
Red Hat Enterprise Linux Server release 5.11 (Tikanga)
[root@svnsubv etc]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:ad:30:b8 brd ff:ff:ff:ff:ff:ff
inet 10.96.91.54/24 brd 10.96.91.255 scope global eth0
inet6 fe80::250:56ff:fead:30b8/64 scope link
valid_lft forever preferred_lft forever
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:ad:70:90 brd ff:ff:ff:ff:ff:ff
inet6 fe80::250:56ff:fead:7090/64 scope link
valid_lft forever preferred_lft forever
[root@svnsubv etc]#
1 下载安装apr-1.5.2.tar和apr-util-1.5.4.tar。
[root@svnsubv apr-1.5.2]# ./configure --prefix=/usr/local/apr
省略
[root@svnsubv apr-1.5.2]# make
[root@svnsubv apr-1.5.2]# make install
[root@svnsubv apr-1.5.2]# /usr/local/apr/bin/apr-1-config --version
1.5.2
[root@svnsubv apr-1.5.2]#
[root@svnsubv apr-util-1.5.4]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
[root@svnsubv apr-util-1.5.4]# make
[root@svnsubv apr-util-1.5.4]# make install
[root@svnsubv apr-util-1.5.4]# /usr/local/apr-util/bin/apu-1-config --version
1.5.4
[root@svnsubv apr-util-1.5.4]#
2 安装OpenSSL,版本openssl-1.0.2h。
保留旧版本的OpenSSL。
config运行后有make depend的提示,所以增加了make depend的操作,之后再做make | make install。
./config shared zlib --prefix=/usr/local/openssl
make depend
make
make install
这里注意umask需要设置为0022。我安装时没注意是0077,安装后OpenSSL的文件权限有问题,改之。
安装在/usr/local/openssl/bin/openssl,而/usr/bin/openssl是老的版本,将老版本替换为新版本。
cp /usr/local/openssl/bin/openssl /usr/bin/openssl
这里在config后提示做make depend操作。在Linux下编译安装软件的命令执行顺序是:
config -> make depend -> make -> make install
这里有个问题,第一次安装时使用的如下命令:
./config --prefix=/usr/local --openssldir=/usr/local/openssl
这个的结果是导致安装HTTPD时,发生如下错误。尝试很多方案都无法修复。所以重新安装OpenSSL,不再使用--openssldir参数。
/root/91.54/httpd-2.2.31/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -DAP_DEBUG -I/root/91.54/httpd-2.2.31/srclib/pcre -I. -I/root/91.54/httpd-2.2.31/os/unix -I/root/91.54/httpd-2.2.31/server/mpm/prefork -I/root/91.54/httpd-2.2.31/modules/http -I/root/91.54/httpd-2.2.31/modules/filters -I/root/91.54/httpd-2.2.31/modules/proxy -I/root/91.54/httpd-2.2.31/include -I/root/91.54/httpd-2.2.31/modules/generators -I/root/91.54/httpd-2.2.31/modules/mappers -I/root/91.54/httpd-2.2.31/modules/database -I/root/91.54/httpd-2.2.31/srclib/apr/include -I/root/91.54/httpd-2.2.31/srclib/apr-util/include -I/root/91.54/httpd-2.2.31/modules/proxy/../generators -I/usr/local/openssl/include -I/usr/kerberos/include -I/root/91.54/httpd-2.2.31/modules/ssl -I/root/91.54/httpd-2.2.31/modules/dav/main -prefer-non-pic -static -c ab.c && touch ab.lo
/root/91.54/httpd-2.2.31/srclib/apr/libtool --silent --mode=link gcc -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread -L/usr/local/openssl/lib -L/usr/kerberos/lib64 -o ab -static ab.lo -lm /root/91.54/httpd-2.2.31/srclib/pcre/libpcre.la /root/91.54/httpd-2.2.31/srclib/apr-util/libaprutil-1.la -lexpat /root/91.54/httpd-2.2.31/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl -lssl -lcrypto -ldl -lz
.libs/ab.o: In function `main':
/root/91.54/httpd-2.2.31/support/ab.c:2239: undefined reference to `TLSv1_1_client_method'
/root/91.54/httpd-2.2.31/support/ab.c:2241: undefined reference to `TLSv1_2_client_method'
collect2: ld returned 1 exit status
make[2]: *** [ab] Error 1
make[2]: Leaving directory `/root/91.54/httpd-2.2.31/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/91.54/httpd-2.2.31/support'
make: *** [all-recursive] Error 1
[root@svnsubv httpd-2.2.31]#
3 安装HTTPD。
首先设置环境变量:
export LDFLAGS=-ldl
然后开始编译安装:
./configure --prefix=/usr/local/apache2/ --sysconfdir=/etc/httpd/ --with-included-apr --disable-userdir --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --enable-dav --enable-so --enable-maintainer-mode --enable-ssl=static --with-ssl=/usr/local/openssl
make
make install
4 安装Subversion。
两种报错:
<1> 在httpd中找不到libssl.so.1.0.0和libcrypto.so.1.0.0。
checking for unistd.h... yes
configure: serf library configuration via pkg-config
checking for serf-2 library... no
checking for serf-1 library... no
checking was serf enabled... no
An appropriate version of serf could not be found, so libsvn_ra_serf
will not be built. If you want to build libsvn_ra_serf, please
install serf 1.3.4 or newer.
configure: looking for apr_memcache as part of apr-util
checking apr_memcache.h usability... yes
checking apr_memcache.h presence... yes
checking for apr_memcache.h... yes
checking for apr_memcache_create in -laprutil-1... yes
checking for Apache module support via DSO through APXS... /usr/local/apache2//bin/httpd: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary `/usr/local/apache2//bin/httpd'..
configure: error: no - APXS refers to an old version of Apache
Unable to locate /mod_dav.h
解决方法:
[root@svnsubv lib]# pwd
/usr/local/apache2/lib
[root@svnsubv lib]# ln -s /usr/local/openssl/lib/libssl.so.1.0.0 libssl.so.1.0.0
[root@svnsubv lib]# ln -s /usr/local/openssl/lib/libcrypto.so.1.0.0 libcrypto.so.1.0.0
<2> 报缺少SQLite,其实是SQLite版本太低。
checking sqlite3.h presence... yes
checking for sqlite3.h... yes
checking sqlite library version (via header)... unsupported SQLite version
checking sqlite library version (via pkg-config)... none or unsupported 3.3
no
An appropriate version of sqlite could not be found. We recommmend
3.7.15.1, but require at least 3.7.12.
Please either install a newer sqlite on this system
or
get the sqlite 3.7.15.1 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3071501.zip
unpack the archive using unzip and rename the resulting
directory to:
/root/subversion-1.9.4/sqlite-amalgamation
configure: error: Subversion requires SQLite
[root@svnsubv lib]# rpm -qa|grep -i SQLite
sqlite-3.3.6-7
sqlite-devel-3.3.6-7
python-sqlite-1.1.7-1.2.1
sqlite-3.3.6-7
[root@svnsubv lib]#
安装sqlite:
./configure --prefix=/usr/local/sqlite
make
make install
再次安装subversion:
./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-sqlite=/usr/local/sqlite --with-openssl
make
make install
5 升级Bugzilla到4.4.12。
进入/opt/bugzilla-4.4.12。
[root@svnsubv bugzilla-4.4.12]# ./checksetup.pl
Can't locate version.pm in @INC (@INC contains: . lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8) at Bugzilla/Install/Requirements.pm line 17.
BEGIN failed--compilation aborted at Bugzilla/Install/Requirements.pm line 17.
Compilation failed in require at ./checksetup.pl line 26.
BEGIN failed--compilation aborted at ./checksetup.pl line 26.
[root@svnsubv bugzilla-4.4.12]#
解决:
[root@svnsubv bugzilla-4.4.12]# cpan
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')
cpan>o conf http_proxy http://10.99.93.33:8080/
#省略......
cpan> install version
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Wed, 03 Feb 2016 03:53:49 GMT
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
#省略......
Installing /usr/share/man/man3/version.3pm
Writing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/version/.packlist
Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
/usr/bin/make install -- OK
cpan>
再次运行./checkout.pl。
[root@svnsubv bugzilla-4.4.12]# ./checksetup.pl
* This is Bugzilla 4.4.12 on perl 5.8.8
* Running on Linux 2.6.18-398.el5 #1 SMP Tue Aug 12 06:26:17 EDT 2014
Checking perl modules...
Checking for CGI.pm (v3.51) found v3.15
Checking for Digest-SHA (any) not found
Checking for TimeDate (v2.23) ok: found v2.23
Checking for DateTime (v0.28) not found
Checking for DateTime-TimeZone (v0.71) not found
Checking for DBI (v1.54) found v1.52
Checking for Template-Toolkit (v2.22) ok: found v2.22
Checking for Email-Send (v2.04) ok: found v2.198
Checking for Email-MIME (v1.904) found v1.863
Checking for URI (v1.37) found v1.35
Checking for List-MoreUtils (v0.32) not found
Checking for Math-Random-ISAAC (v1.0.1) not found
Checking available perl DBD modules...
Checking for DBD-Pg (v2.7.0) found v1.49
Checking for DBD-mysql (v4.001) ok: found v4.013
Checking for DBD-SQLite (v1.29) not found
Checking for DBD-Oracle (v1.19) not found
The following Perl modules are optional:
Checking for GD (v1.20) ok: found v2.44
Checking for Chart (v2.1.0) ok: found v2.4.1
Checking for Template-GD (any) ok: found v1.56
Checking for GDTextUtil (any) ok: found v0.86
Checking for GDGraph (any) ok: found v1.44
Checking for MIME-tools (v5.406) not found
Checking for libwww-perl (any) ok: found v2.033
Checking for XML-Twig (any) ok: found v3.32
Checking for PatchReader (v0.9.6) found v0.9.5
Checking for perl-ldap (any) ok: found v0.39
Checking for Authen-SASL (any) not found
Checking for Net-SMTP-SSL (v1.01) not found
Checking for RadiusPerl (any) not found
Checking for SOAP-Lite (v0.712) found v0.710.08
Checking for XMLRPC-Lite (v0.712) found v0.710.06
Checking for JSON-RPC (any) not found
Checking for JSON-XS (v2.0) not found
Checking for Test-Taint (any) not found
Checking for HTML-Parser (v3.40) ok: found v3.55
Checking for HTML-Scrubber (any) ok: found v0.08
Checking for Encode (v2.21) found v2.12
Checking for Encode-Detect (any) not found
"config" is not defined in %MIME::Tools::EXPORT_TAGS at /usr/lib/perl5/site_perl/5.8.8/MIME/Entity.pm line 233
"msgs" is not defined in %MIME::Tools::EXPORT_TAGS at /usr/lib/perl5/site_perl/5.8.8/MIME/Entity.pm line 233
"utils" is not defined in %MIME::Tools::EXPORT_TAGS at /usr/lib/perl5/site_perl/5.8.8/MIME/Entity.pm line 233
Checking for Email-Reply (any) ok: found v1.202
Checking for HTML-FormatText-WithLinks (v0.13) not found
Checking for TheSchwartz (v1.07) not found
Checking for Daemon-Generic (any) not found
Checking for File-Slurp (v9999.13) not found
Checking for mod_perl (v1.999022) ok: found v2.000004
Checking for Apache-SizeLimit (v0.96) not found
Checking for File-MimeInfo (any) not found
Checking for IO-stringy (any) ok: found v2.110
Checking for mod_headers (any) ok
Checking for mod_expires (any) ok
Checking for mod_env (any) ok
***********************************************************************
* REQUIRED MODULES *
***********************************************************************
* Bugzilla requires you to install some Perl modules which are either *
* missing from your system, or the version on your system is too old. *
* See below for commands to install these modules. *
***********************************************************************
* OPTIONAL MODULES *
***********************************************************************
* Certain Perl modules are not required by Bugzilla, but by *
* installing the latest version you gain access to additional *
* features. *
* *
* The optional modules you do not have installed are listed below, *
* with the name of the feature they enable. Below that table are the *
* commands to install each module. *
***********************************************************************
* MODULE NAME * ENABLES FEATURE(S) *
***********************************************************************
* MIME-tools * Move Bugs Between Installations *
* PatchReader * Patch Viewer *
* Authen-SASL * SMTP Authentication *
* Net-SMTP-SSL * SSL Support for SMTP *
* RadiusPerl * RADIUS Authentication *
* SOAP-Lite * XML-RPC Interface *
* XMLRPC-Lite * XML-RPC Interface *
* JSON-RPC * JSON-RPC Interface *
* JSON-XS * Make JSON-RPC Faster *
* Test-Taint * JSON-RPC Interface, XML-RPC Interface *
* Encode * Automatic charset detection for text attachments *
* Encode-Detect * Automatic charset detection for text attachments *
* HTML-FormatText-WithLinks * Inbound Email *
* TheSchwartz * Mail Queueing *
* Daemon-Generic * Mail Queueing *
* File-Slurp * Mail Queueing *
* Apache-SizeLimit * mod_perl *
* File-MimeInfo * Sniff MIME type of attachments *
***********************************************************************
COMMANDS TO INSTALL OPTIONAL MODULES:
MIME-tools: /usr/bin/perl install-module.pl MIME::Parser
PatchReader: /usr/bin/perl install-module.pl PatchReader
Authen-SASL: /usr/bin/perl install-module.pl Authen::SASL
Net-SMTP-SSL: /usr/bin/perl install-module.pl Net::SMTP::SSL
RadiusPerl: /usr/bin/perl install-module.pl Authen::Radius
SOAP-Lite: /usr/bin/perl install-module.pl SOAP::Lite
XMLRPC-Lite: /usr/bin/perl install-module.pl XMLRPC::Lite
JSON-RPC: /usr/bin/perl install-module.pl JSON::RPC
JSON-XS: /usr/bin/perl install-module.pl JSON::XS
Test-Taint: /usr/bin/perl install-module.pl Test::Taint
Encode: /usr/bin/perl install-module.pl Encode
Encode-Detect: /usr/bin/perl install-module.pl Encode::Detect
HTML-FormatText-WithLinks: /usr/bin/perl install-module.pl HTML::FormatText::WithLinks
TheSchwartz: /usr/bin/perl install-module.pl TheSchwartz
Daemon-Generic: /usr/bin/perl install-module.pl Daemon::Generic
File-Slurp: /usr/bin/perl install-module.pl File::Slurp
Apache-SizeLimit: /usr/bin/perl install-module.pl Apache2::SizeLimit
File-MimeInfo: /usr/bin/perl install-module.pl File::MimeInfo::Magic
COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands
and then re-run checksetup.pl):
/usr/bin/perl install-module.pl CGI
/usr/bin/perl install-module.pl Digest::SHA
/usr/bin/perl install-module.pl DateTime
/usr/bin/perl install-module.pl DateTime::TimeZone
/usr/bin/perl install-module.pl DBI
/usr/bin/perl install-module.pl Email::MIME
/usr/bin/perl install-module.pl URI
/usr/bin/perl install-module.pl List::MoreUtils
/usr/bin/perl install-module.pl Math::Random::ISAAC
To attempt an automatic install of every required and optional module
with one command, do:
/usr/bin/perl install-module.pl --all
*** Installation aborted. Read the messages above. ***
[root@svnsubv bugzilla-4.4.12]#
根据提示运行下面命令安装所需模块。也可以在cpan中用install命令安装。
/usr/bin/perl install-module.pl CGI
/usr/bin/perl install-module.pl Digest::SHA
/usr/bin/perl install-module.pl DateTime
/usr/bin/perl install-module.pl DateTime::TimeZone
/usr/bin/perl install-module.pl DBI
/usr/bin/perl install-module.pl Email::MIME
/usr/bin/perl install-module.pl URI
/usr/bin/perl install-module.pl List::MoreUtils
/usr/bin/perl install-module.pl Math::Random::ISAAC
或者运行:perl install-module.pl --all
注意可能需要在cpan中设置代理。
接下来修改localconfig(两个属性),然后再跑checksetup.pl。
$webservergroup = 'csvn';
$db_pass = 'bugs';
[root@svnsubv bugzilla-4.4.12]# ./checksetup.pl
* This is Bugzilla 4.4.12 on perl 5.8.8
* Running on Linux 2.6.18-398.el5 #1 SMP Tue Aug 12 06:26:17 EDT 2014
Checking perl modules...
Checking for CGI.pm (v3.51) ok: found v4.28
Checking for Digest-SHA (any) ok: found v5.95
Checking for TimeDate (v2.23) ok: found v2.23
Checking for DateTime (v0.28) ok: found v1.28
Checking for DateTime-TimeZone (v0.71) ok: found v1.98
Checking for DBI (v1.54) ok: found v1.636
Checking for Template-Toolkit (v2.22) ok: found v2.22
Checking for Email-Send (v2.04) ok: found v2.198
Checking for Email-MIME (v1.904) ok: found v1.937
Checking for URI (v1.37) ok: found v1.71
Checking for List-MoreUtils (v0.32) ok: found v0.415
Checking for Math-Random-ISAAC (v1.0.1) ok: found v1.004
Checking available perl DBD modules...
Checking for DBD-Pg (v2.7.0) found v1.49
Checking for DBD-mysql (v4.001) ok: found v4.013
Checking for DBD-SQLite (v1.29) ok: found v1.50
Checking for DBD-Oracle (v1.19) not found
The following Perl modules are optional:
Checking for GD (v1.20) ok: found v2.44
Checking for Chart (v2.1.0) ok: found v2.4.1
Checking for Template-GD (any) ok: found v1.56
Checking for GDTextUtil (any) ok: found v0.86
Checking for GDGraph (any) ok: found v1.44
Checking for MIME-tools (v5.406) ok: found v5.427
Checking for libwww-perl (any) ok: found v2.033
Checking for XML-Twig (any) ok: found v3.32
Checking for PatchReader (v0.9.6) ok: found v0.9.6
Checking for perl-ldap (any) ok: found v0.39
Checking for Authen-SASL (any) ok: found v2.16
Checking for Net-SMTP-SSL (v1.01) ok: found v1.03
Checking for RadiusPerl (any) ok: found v0.24
Checking for SOAP-Lite (v0.712) ok: found v1.19
Checking for XMLRPC-Lite (v0.712) ok: found v0.717
Checking for JSON-RPC (any) ok: found v1.06
Checking for JSON-XS (v2.0) ok: found v3.02
Checking for Test-Taint (any) ok: found v1.06
Checking for HTML-Parser (v3.40) ok: found v3.72
Checking for HTML-Scrubber (any) ok: found v0.08
Checking for Encode (v2.21) ok: found v2.84
Checking for Encode-Detect (any) ok: found v1.01
Checking for Email-Reply (any) ok: found v1.202
Checking for HTML-FormatText-WithLinks (v0.13) ok: found v0.15
Checking for TheSchwartz (v1.07) ok: found v1.12
Subroutine File::Slurp::O_RDWR redefined at lib/File/Slurp.pm line 11.
Subroutine File::Slurp::O_CREAT redefined at lib/File/Slurp.pm line 11.
Subroutine File::Slurp::O_EXCL redefined at lib/File/Slurp.pm line 11.
Checking for Daemon-Generic (any) ok: found v0.84
Checking for File-Slurp (v9999.13) ok: found v9999.19
Checking for mod_perl (v1.999022) ok: found v2.000004
Checking for Apache-SizeLimit (v0.96) not found
Checking for File-MimeInfo (any) ok: found v0.27
Checking for IO-stringy (any) ok: found v2.110
Checking for mod_headers (any) ok
Checking for mod_expires (any) ok
Checking for mod_env (any) ok
***********************************************************************
* OPTIONAL MODULES *
***********************************************************************
* Certain Perl modules are not required by Bugzilla, but by *
* installing the latest version you gain access to additional *
* features. *
* *
* The optional modules you do not have installed are listed below, *
* with the name of the feature they enable. Below that table are the *
* commands to install each module. *
***********************************************************************
* MODULE NAME * ENABLES FEATURE(S) *
***********************************************************************
* Apache-SizeLimit * mod_perl *
***********************************************************************
COMMANDS TO INSTALL OPTIONAL MODULES:
Apache-SizeLimit: /usr/bin/perl install-module.pl Apache2::SizeLimit
To attempt an automatic install of every required and optional module
with one command, do:
/usr/bin/perl install-module.pl --all
Reading ./localconfig...
Checking for DBD-mysql (v4.001) ok: found v4.013
Checking for MySQL (v5.0.15) ok: found v5.6.20
Creating ./data directory...
Creating ./data/attachments directory...
Creating ./data/db directory...
Creating ./data/extensions directory...
Creating ./data/mining directory...
Creating ./data/webdot directory...
Creating ./graphs directory...
Creating ./skins/custom directory...
Creating ./data/extensions/additional...
Creating ./data/mailer.testfile...
Creating ./Bugzilla/.htaccess...
Creating ./data/.htaccess...
Creating ./data/attachments/.htaccess...
Creating ./data/webdot/.htaccess...
Creating ./graphs/.htaccess...
Creating ./lib/.htaccess...
Creating ./template/.htaccess...
Creating contrib/.htaccess...
Creating t/.htaccess...
Creating xt/.htaccess...
Precompiling templates...done.
Fixing file permissions...
Now that you have installed Bugzilla, you should visit the 'Parameters'
page (linked in the footer of the Administrator account) to ensure it
is set up as you wish - this includes setting the 'urlbase' option to
the correct URL.
checksetup.pl complete.
[root@svnsubv bugzilla-4.4.12]#
[root@svnsubv bugzilla-4.4.12]# pwd
/opt/bugzilla-4.4.12
[root@svnsubv bugzilla-4.4.12]# chmod 755 .
[root@svnsubv bugzilla-4.4.12]# find ./ -type d -exec chmod 755 {} \;
[root@svnsubv bugzilla-4.4.12]# find ./ -type f -exec chmod go+r {} \;
修改data/params中的属性:
'maxattachmentsize' => '10000',
'requirelogin' => '1',
'urlbase' => 'http://10.96.91.54/',
下面几个与AD有关:
'LDAPBaseDN' => 'OU=User Accounts,DC=lenovo,DC=com',
'LDAPbinddn' => 'CN=adplm,OU=Service Accounts,DC=lenovo,DC=com:ZpGf-5494',
'LDAPserver' => 'ldap://lenovo.com:389',
'LDAPuidattribute' => 'cn',
'user_verify_class' => 'LDAP',
(这时可以修改CollabnetSubversion的配置文件)
6 升级svnmanager到1.10。
解压,然后将老版本的config.php文件复制到新版本下。
修改http的配置。
修改svnmanager/MainModule/StartPage.tpl模板文件,这是Jun Li写的介绍。
7 升级PHP到最新的5.6.22。
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --enable-embedded-mysqli --with-zlib --with-pear --enable-mbstring
make
make install
8 配置HTTPD的参数。/etc/httpd/conf/httpd.conf。
LoadModule php5_module modules/libphp5.so
User csvn
Group csvn
<IfModule dir_module>
DirectoryIndex index.php index.cgi index.html
</IfModule>
AddType application/x-httpd-php .php .phtml
<Directory "/opt/bugzilla-4.4.12">
AddHandler cgi-script .cgi
Options Indexes ExecCGI FollowSymLinks
# SetEnv PERL5LIB /opt/bugzilla-4.4.11:/opt/bugzilla-4.4.11/lib
DirectoryIndex index.cgi
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Include /etc/httpd/extra/httpd-vhosts.conf
Include /etc/httpd/extra/httpd-ssl.conf
Include /etc/httpd/subversion.conf
Include /etc/httpd/svnmanager.conf
extra/httpd-vhosts.conf
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)?$ https://%{SERVER_NAME}$1 [L,R]
# RewriteBase /
# RewriteCond %{SERVER_PORT} 443
# RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
</VirtualHost>
extra/httpd-ssl.conf
SSLCertificateFile "/etc/httpd/extra/server.crt"
SSLCertificateKeyFile "/etc/httpd/extra/server.key"
SSLCertificateChainFile "/etc/httpd/extra/server.crt"
subversion.conf
<Location /svn>
DAV svn
SVNParentPath /data/svn/svnroot/
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /data/svn/svnauth/svn_auth_file
AuthzSVNAccessFile /data/svn/svnauth/svn_access_file
Satisfy Any
Require valid-user
#SSLRequireSSL
</Location>
svnmanager.conf
Alias /svnmanager/ "/opt/svnmanager-1.10/"
<Directory "/opt/svnmanager-1.10/">
AllowOverride none
# Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
HTTPD运行报错:
[root@svnsubv bin]# ./apachectl start
httpd: Syntax error on line 58 of /etc/httpd/httpd.conf: Cannot load /usr/local/subversion/libexec/mod_dav_svn.so into server: /usr/local/subversion/lib/libsvn_subr-1.so.0: undefined symbol: sqlite3_clear_bindings
[root@svnsubv bin]# ll /usr/local/subversion/libexec/mod_dav_svn.so
-rwxr-xr-x 1 root root 804628 May 27 16:22 /usr/local/subversion/libexec/mod_dav_svn.so
[root@svnsubv bin]#
出现这个问题的原因是因为sqlite3的包是旧的,用新的替换即可。
[root@svnsubv php-5.6.22]# ll /usr/lib/libsqlite3.so.0.8.6 /usr/lib64/libsqlite3.so.0.8.6 /usr/local/sqlite/lib/libsqlite3.so.0.8.6
-rwxr-xr-x 1 root root 375656 Jul 8 2013 /usr/lib64/libsqlite3.so.0.8.6
-rwxr-xr-x 1 root root 386480 Jul 8 2013 /usr/lib/libsqlite3.so.0.8.6
-rwxr-xr-x 1 root root 3107447 May 27 16:13 /usr/local/sqlite/lib/libsqlite3.so.0.8.6
[root@svnsubv php-5.6.22]#
[root@svnsubv bin]# cp /usr/local/sqlite/lib/libsqlite3.so.0.8.6 /usr/lib/libsqlite3.so.0.8.6
[root@svnsubv bin]# cp /usr/local/sqlite/lib/libsqlite3.so.0.8.6 /usr/lib64/libsqlite3.so.0.8.6