Bo's blog

Saturday, December 17, 2005

install subversion on linux with httpd

1. download source code (apache 2.2.0, subversion 1.2.3)
2. build and install apache 2.2.0 (eg. installed to /usr/local/apache-2.2.0 )
./configure --prefix=/usr/local/apache-2.2.0 --enable-mods-shared=all
make
make install

3. change to subversion source code directory
4. use the following command to configure SVN:

./configure --with-apxs=/usr/local/apache-2.2.0/bin/apxs --with-apr=/usr/local/apache-2.2.0/bin/apr-1-config --with-apr-util=/usr/local/apache-2.2.0/bin/apu-1-config
make
make insall

6. then copy mod_dav_svn.so and mod_dav_auth_svn.so to /usr/local/apache-2.2.0/modules

7. use command to create svn repo
svnadmin create --fs-type fsfs /home/svnrepos

8. theb edit the apache config file httpd.conf
add the following:

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /svn>
DAV svn
SVNPath /home/svnrepos

# how to authenticate a user
#AuthType Basic
#AuthName "Subversion repository"
#AuthUserFile /home/svnrepos/conf/userfile

# only authenticated users may access the repository
#Require valid-user
</Location>

Labels:

Wednesday, December 14, 2005




BuildingAndConfiguring




Note

This documentation is a little out of date. Any volunteers to update it?


There are a number of packages involved in PicoGUI. For most users, you'll want to build pgserver, cli_c, and a few programs from apps or even ports. In general, C programs depend on cli_c being built and installed while Perl programs will require cli_perl.

See also BuildingWithMinGW if you want to run a suitably defenestratable build.




  • Building and configuring pgserver

    • Prerequisites: JPEG and SDL libraries including headers. Can be disabled.

    • Prepare the environment by running ''./autogen.sh'' if you downloaded PicoGUI from CVS.

    • Run ''./configure'' to create the makefiles. There are some important ConfigurationOptions you might want to set. You might also consider how to set up the server for a CrossCompilation?.

    • Run ''make menuconfig'' and choose how to set your server up. Important settings:

      • Target system

        • ''Use UNIX sockets instead of TCP/IP'' If you select this, you must also specify ''--enable-unix-sockets'' when running configure for cli_c.




      • Debugging

        • ''Electric Fence malloc debugging'' Disable this if you don't have Electric Fence installed.




      • Fonts

        • ''Fixed 13 ja (Japanese Unicode)'' This font is ''huge''. Do not select it unless you intend to work on PicoGUI's Unicode support.




      • Input Drivers

        • ''Touchscreen calibration'' Enable this if you intend to use a touchscreen. So far only the Palmax driver uses this, and you won't be able to select that driver without enabling touchscreen calibration.







    • Build the pgserver with ''make''. You may run into errors with undefined references to something_regfunc; this is generally because of cross-dependencies between input and output drivers (for instance, ncurses, X11 and SDL all have one driver of each type - both must be enabled together).

    • Optionally, install with ''make install''. You can also run pgserver in place; it has no external dependencies, and can be told where to find its configuration using the flag ''-c pgserver.conf''.

    • NOTE: Now that cli_c and themetools don't have their own copy of the picogui headers, you'll need to install pgserver or just copy the headers to /usr/local/include to compile cli_c and themetools. There are probably some ./configure settings to work around this but MicahDowty? sucks at build systems...

    • Write an appropriate [pgserver.conf]?




  • Building and installing the C client library (cli_c)

    • Prepare the environment using ''./autogen.sh'' (only for code from CVS) .

    • Generate the makefiles using ''./configure''. Remember to add the option ''--enable-unix-sockets'' if you enabled them in the server, as the current version only supports either one or the other. You can use the CrossCompilation? options used for the server to configure the client.

    • Build the library by running ''make''

    • Install it by running ''make install'' as root.

    • Make sure that the library can be found:

      • Verify that /usr/local/lib is listed in /etc/ld.so.conf

      • Run ldconfig







  • Building and installing the theme file utilities (themetools)

    • Prepare the environment using ''./autogen.sh'' (only for code from CVS) .

    • Generate the makefiles using ''./configure''. If you want support for compiling OpenGL themes, you need to have the OpenGL headers installed, and add the ''--enable-opengl'' flag to ''./configure''.

    • Build the tools with ''make''

    • Install it by running ''make install'' as root.

    • You should now have ''themec'' and ''thdump'' binaries on your system
























Labels: ,

Friday, December 09, 2005

Apache httpd-2.0.47 + Tomcat 5.0 OR tomcat-4.1.24 + jk2 +
http://www.douzhe.com 作者:iHero 发表于:2003-11-06 18:32:11

务器环境:

RedHat Linux 8.0
J2sdk1.4.1_02
Tomcat 4.1.24 binary OR Tomcat 5.0.12 binary
Apache 2.0.47 built from source
jk2 connector source from jakarta.apache.org


安装JDK:

下载: j2sdk-1_4_1_02-linux-i586.bin
把jdk 安装在/usr/local/j2sdk1.4.1_02
在/usr/local 下建立 软连接 jdk
#ln -s /usr/local/j2sdk1.4.1_02 /usr/local/jdk

[user@host]# cat /etc/profile.d/java.sh
# set java environment
export JAVA_HOME=/usr/local/jdk
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib

#更改shell文件属性:
#chmod 755 /etc/profile.d/java.sh

#查看是否正确
#which java
/usr/local/jdk/bin/java



【发表回复】【查看论坛原帖】【添加到收藏夹】【关闭】

--------------------------------------------------------------------------------
iHero 回复于:2003-11-06 18:32:51
安装apache :

#cd /usr/local/src/
#tar -xzvf httpd-2.0.47.tar.gz
#cd httpd-2.0.47
#配置apache 支持动态module 加载
#./configure \
"--with-layout=Apache" \
"--prefix=/usr/local/apache" \
"--enable-module=so" \
"--enable-module=setenvif" \
"--enable-module=rewrite" \
"--with-mpm=prefork"

#make
#make install

#修改http.conf 具体的修改请参考apache2.0文档
# 或者查看 http://www.cnfug.org/journal/3/02.html

StartServers 10
MinSpareServers 25
MaxSpareServers 50
ServerLimit 2000
MaxClients 1500 #Apache可以同时处理的请求
MaxRequestsPerChild 10000




--------------------------------------------------------------------------------
iHero 回复于:2003-11-06 18:33:30
安装Php :
下载: php-4.3.3.tar.gz
#cd /usr/local/src
#tar -xzvf

#php for apache 以apache modules的方式运行
./configure --with-apxs2=/usr/local/apache/bin/apxs

#php run like shell 以单独的shell方式运行
./configure --prefix=/usr/local/php

#php for apache
./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--enable-track-vars \
--enable-debug \
--enable-url-includes \
--enable-sockets \
--with-config-file-path=/usr/local/apache/conf #php.ini文件放的目录
#下面的参数是安装PHP + gd库
--with-gd=/usr/local \
--enable-gd-native-ttf \
--with-ttf=/usr/local \
--with-jpeg-dir=/usr/local \
--with-zlib-dir=/usr/local \
--with-png-dir=/usr/local
#make
#make install
#ls -l /usr/local/apache/modules/libphp4.so #存在 安装成功

#修改apache http.conf
添加
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php



--------------------------------------------------------------------------------
iHero 回复于:2003-11-06 18:34:31
安装Tomcat:
#cd /usr/local
#tar -xzvf jakarta-tomcat-4.1.24.tar.gz
#ln -s jakarta-tomcat-4.1.24 tomcat
#测试Tomcat正常安装:
#/usr/local/tomcat/bin/startup.sh

#通过IE http://yourIP:8080/ Tomcat的页面正常显示


安装JK2 :
#cd /usr/local/src
#tar -xzvf jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz
#cd jakarta-tomcat-connectors-jk2-2.0.2-src
#cd jk/native2
#chmod 755 buildconf.sh
#./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-EAPI
#make
#make install
#如果make install 不成功需要手工发布mod_jk2.so
#cd /usr/local/src/jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2
#cp *.so /usr/local/apache/modules/



--------------------------------------------------------------------------------
iHero 回复于:2003-11-06 18:35:22
配置$CATLINA/conf/server.xml


debug="0"/>
debug="0"/>



port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="-1"
useURIValidationHack="false" disableUploadTimeout="true" />

port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="-1"
useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>








prefix="catalina_log." suffix=".txt"
timestamp="true"/>


unpackWARs="true" autoDeploy="true">

directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>









--------------------------------------------------------------------------------
iHero 回复于:2003-11-06 18:36:57
这个地方tomcat4.* 和tomcat 5.* 少有不同.

对tomcat5. 可以注释掉.



--------------------------------------------------------------------------------
iHero 回复于:2003-11-06 18:37:42
编辑
#vi /usr/local/tomcat/conf/jk2.properties
# list of needed handlers.
handler.list=channelSocket,request
# Override the default port for the channelSocket
channelSocket.port=8009


#编辑文件:

#vi /usr/local/apache/conf/workers2.properties

# only at beginnin. In production uncomment it out
[logger.apache2]
level=DEBUG

[shm]
file=/usr/local/apache/logs/shm.file
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

# Uri mapping
[uri:192.168.0.90/*.jsp]
worker=ajp13:localhost:8009



--------------------------------------------------------------------------------
iHero 回复于:2003-11-06 18:38:29
编辑http.conf
#修改
DocumentRoot "/usr/local/tomcat/webapps"
#添加index.jsp
DirectoryIndex index.html index.html.var index.jsp


LoadModule jk2_module modules/mod_jk2.so


Order deny,allow
Deny from all

#
# Order deny,allow
# Deny from all
#



Order Allow,Deny



ServerName www.home.net
ServerAlias www
ServerAlias localhost
ServerAlias 192.168.0.90
ServerAdmin webmater@xxx.com
DocumentRoot /usr/local/tomcat/webapps

ErrorLog logs/home.net-errorlog
CustomLog logs/home.net-access.log common


JkUriSet worker ajp13:localhost:8009





--------------------------------------------------------------------------------
iHero 回复于:2003-11-06 18:40:39
启动apache . 和tomcat
从$TOMCAT_HOME/logs/catalina.out中可以看到启动的记录.
如果通过HTTP访问到了证明你的安装成功了.
总体感觉安装TOMCAT 没有安装RESION 方便!



--------------------------------------------------------------------------------
houji 回复于:2003-11-07 11:51:11
楼主,你的tomcat5的安装方法和4的一样吗?我装5就是不成功,4装好后使用正常,三个环境变量都设好了,无论是解包后,bin/startup.sh还是按apache网站的说明,
cd $CATALINA_HOME/bin
tar xvfz jsvc.tar.gz
cd jsvc-src
autoconf
./configure
make
cp jsvc ..
cd ..
cd $CATALINA_HOME
./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap
两种方法启动后都不对,小猫没出来。能说说5的安装、培植方法吗?



--------------------------------------------------------------------------------
iHero 回复于:2003-11-08 13:23:52
tomcat5的安装方法和4的安装方法是一样的.
1.请确认同一时间只启动一个TOMCAT .
2.可以通过$TOMCAT_HOME/logs/catalina.out看看错误在什么地方.



--------------------------------------------------------------------------------
双眼皮的猪 回复于:2004-03-16 11:44:34
[code:1:af5d6d896e]
安装JK2 :
#cd /usr/local/src
#tar -xzvf jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz
#cd jakarta-tomcat-connectors-jk2-2.0.2-src
#cd jk/native2
#chmod 755 buildconf.sh
#./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-EAPI
#make
#make install
#如果make install 不成功需要手工发布mod_jk2.so
#cd /usr/local/src/jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2
#cp *.so /usr/local/apache/modules/
[/code:1:af5d6d896e]
中间少了一步,当然不能make install成功
还有一个执行buildconf.sh的步骤:)



--------------------------------------------------------------------------------
双眼皮的猪 回复于:2004-03-16 16:28:17
[quote:5509fe6f69]
#./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-EAPI[/quote:5509fe6f69]
这个也有点问题,根据tomcat-doc中的apache-howto

有这么一句
[code:1:5509fe6f69]
--enable-EAPI This parameter is needed when using Apache-1.3 and mod_ssl, otherwise you will get the error message: "this module might crash under EAPI!" when loading mod_jk.so in httpd. Not needed when --with-apxs has been used
[/code:1:5509fe6f69]

这个是用于1.3.x并要使用mod_ssl的情况下才要,而您使用的是2.0.X的,所以,个人认为不需要...
2.0好象默认就带了ssl

Labels: