下記のような日本語(マルチバイト文字)を含んだリエクストを送りたい場合、
- curl http://www.hoge.jp/test/?query=テスト
--data(クエリをPOSTで送信する)オプションを使うことで解決できる。
- curl --data query=テスト http://www.hoge.jp/test/
yum -y install subversion mod_dav_svn
mkdir -p /usr/local/svn/repos/xxxxx svnadmin create /usr/local/svn/repos/xxxxx svn mkdir file://localhost/usr/local/svn/repos/xxxxx/trunk -m "create" svn mkdir file://localhost/usr/local/svn/repos/xxxxx/branches -m "create" svn mkdir file://localhost/usr/local/svn/repos/xxxxx/tags -m "create" chown -R apache:apache /usr/local/svn/repos
vi /etc/httpd/conf.d/subversion.conf
<Location /repos> DAV svn SVNParentPath /usr/local/svn/repos SVNAutoversioning on Order deny,allow Deny from all Allow from 127.0.0.1 Allow from xxxxx # Require SSL connection for password protection. # SSLRequireSSL AuthType Basic AuthName "Authorization Realm" AuthUserFile /usr/local/svn/repos/.htpasswd Require valid-user AuthzSVNAccessFile /usr/local/svn/repos/.svnaccess </Location>
htpasswd -c /usr/local/svn/repos/.htpasswd 【ユーザ名】
vi /usr/local/svn/repos/.svnaccess
[xxxxx:/] 【ユーザ名】 = rw
/etc/rc.d/init.d/httpd reloadブラウザでhttp://サーバのIP/repos/xxxxx/にアクセス
yum -y update
yum -y install httpd sudo /etc/init.d/httpd start cd /etc/httpd/conf vi httpd.conf
cd /var/www/html/ブラウザで"http://localhost/"にアクセス
vi index.html
cd /usr/
wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u21-linux-i586-rpm.bin?BundledLineItemUUID=DQWJ_hCw41sAAAEqm4JXq9H9&OrderID=SIiJ_hCwlToAAAEqf4JXq9H9&ProductID=LxaJ_hCy4mIAAAEpXLwzBGsB&FileName=/jdk-6u21-linux-i586-rpm.bin
mv jdk-6u21-linux-i586-rpm.bin\?AuthParam\=1283423415_c1918db3414d4a954796606ab22aa14b\&TicketId\=nod3BFkSR3V6leEhnU+ZUZeRcQ\=\=\&GroupName\=CDS\&FilePath\=%2FESD6%2FJSCDL%2Fjdk%2F6u21-b06%2Fjdk-6u21-linux-i586-rpm.bin\&File\=jdk-6u21-linux-i586-rpm.bin jdk6-rpm.bin
mkdir java
mv jdk6-rpm.bin java/
cd java/
chmod a+x jdk6-rpm.bin
./jdk6-rpm.bin
java -version
wget http://ftp.riken.jp/net/apache/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz
tar zxvf apache-tomcat-6.0.29.tar.gz
rm -rf apache-tomcat-6.0.29.tar.gz
mv apache-tomcat-6.0.29/ /usr/local/tomcat
vi /etc/profile.d/tomcat.sh
export JAVA_HOME=/usr/java/default
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
export TOMCAT_HOME=/usr/local/tomcat
export CATALINA_HOME=/usr/local/tomcat
export CLASSPATH=$CLASSPATH:$CATALINA_HOME/common/lib
vi /etc/rc.d/init.d/tomcat
#!/bin/bash
# Startup script for the tomcat
# chkconfig: 345 80 15
# description: Tomcat is a Servlet+JSP Engine.
# Source function library.
. /etc/rc.d/init.d/functions
source /etc/profile.d/tomcat.sh
start(){
if [ -z $(/sbin/pidof java) ]; then
echo "Starting tomcat"
/usr/local/tomcat/bin/startup.sh
touch /var/lock/subsys/tomcat
else
echo "tomcat allready running"
fi
}
stop(){
if [ ! -z $(/sbin/pidof java) ]; then
echo "Shutting down tomcat"
/usr/local/tomcat/bin/shutdown.sh
until [ -z $(/sbin/pidof java) ]; do :; done
rm -f /var/lock/subsys/tomcat
else
echo "tomcat not running"
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
/usr/local/tomcat/bin/catalina.sh version
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
esac
exit 0
chmod +x /etc/rc.d/init.d/tomcat
/etc/rc.d/init.d/tomcat start
vi /etc/httpd/conf.d/proxy_ajp.conf
ProxyPass /tomcat/ ajp://localhost:8009/
ProxyPass /examples/ ajp://localhost:8009/examples/jsp/
/etc/rc.d/init.d/httpd reload
yum -y install mysql-server
vi /etc/my.cnf
default-character-set = utf8 [mysql] default-character-set = utf8
/etc/rc.d/init.d/mysqld start
mysql -uroot -p
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>↓↓↓
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true" URIEncoding="UTF-8"/>
<filter> <filter-name>encodingfilter</filter-name> <filter-class>org.seasar.extension.filter.EncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> </filter>・・・
<filter-mapping> <filter-name>encodingfilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>注意として、 上記のフィルタはSolrRequestFilterより上に書くこと。 SeasarとかStrutsを使ってない人は、自分でフィルタのクラスを作って設定してあげてください。
<?xml version="1.0" encoding="UTF-8" ?> <schema name="example" version="1.2"> <types> <fieldType name="text_sen" class="solr.TextField"> <analyzer class="org.apache.lucene.analysis.ja.JapaneseAnalyzer" /> </fieldType> </types> <fields> ・・・ </fields> </schema>
private int num;
public int getNum(){
return num;
}
public void setNum(int なむ){
num = なむ;
}
public void update(){
System.out.println(num); //-----(1)
int i;
for(i=0; i < num; i++); //-----(2)
System.out.println(i);
}
<env-entry> <env-entry-name>solr/home</env-entry-name> <env-entry-value>C:/project/aaa/bbb/ccc</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry>
@Component(instance = InstanceType.SESSION) //←コイツ public class SampleDto implements Serializable { private static final long serialVersionUID = 1L; public String name; }
RequestUtil.getRequest().getSession().setAttribute("sampleDto", sampleDto);
<Proxy balancer://cluster/> BalancerMember ajp://xxx.xxx.xxx.xxx:8009 route=MAP1 loadfactor=10 keepalive=on BalancerMember ajp://xxx.xxx.xxx.xxx:8009 route=MAP2 loadfactor=10 keepalive=on </Proxy>
/*以下は192.168.0.102の設定。192.168.0.103はjvmRoute=MAP2, tcpListenAddress=192.168.0.103とする。*/ <Engine name="Catalina" defaultHost="localhost" jvmRoute="MAP1"> <Host name="localhost" appBase="webapps" /> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" managerClassName="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false" useDirtyFlag="true" printToScreen="true"> <Membership className="org.apache.catalina.ha.mcast.McastService" mcastAddr="228.0.0.4" mcastPort="45564" mcastFrequency="500" mcastDropTime="3000"/> <Receiver className="org.apache.catalina.ha.tcp.ReplicationListener" tcpListenAddress="192.168.0.102" tcpListenPort="4001" tcpSelectorTimeout="100" tcpThreadCount="2"/> <Sender className="org.apache.catalina.ha.tcp.ReplicationTransmitter" replicationMode="pooled"/> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;.*\.xhtml"/> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer" tempDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/" watchDir="/tmp/war-listen/" watchEnabled="false"/> </Cluster> </Engine>
<!-- Session Clustering --> <distributable />
Copyright (c) 2010 arito. All rights reserved. Design by Free CSS Templates | Blogger Templates by TeknoMobi | Sponsored by Bodrum48.