2012年6月29日金曜日

ubuntu12.04 on beagleboard ルータ構築の手順
bind9は使わずDNSキャッシュを使用
% sudo apt-get remove bind9
% sudo apt-get install dnsmasq

/etc/rc.localに
/usr/sbin/dnsmasq &
をexit文の前に追加
DHCP serverのインストール
% sudo apt-get install isc-dhcp-server
option domain-name-servers "プロバイダのアドレス設定"
subnet 192.168.0.0 netmask 255.255.255.0 {
  range 192.168.0.60 192.168.0.70;
  option routers 192.168.0.100;
  default-lease-time 600;
  max-lease-time 7200;
}
などのようにDHCPをセッティング。
ufwの設定 iptableの簡略版という位置づけか。
ルータであれば特定のポートを開ける必要はない。
% sudo vi /etc/default/ufw
DEFAULT_FORWARD_POLICY="ACCEPT"
とACCEPTに変更

% sudo ufw allow from 192.168.0.0/24
とローカルからの接続は許可

% sudo vi /etc/ufw/sysctl.conf
net.ipv4.ip_forward=1

% sudo sysctl -p

接続確認
Proxy設定は外れていることを確認。
DNSが引けるか
gatewayが今回セッティングしたサーバーのIPアドレスになっているか確認

2012年6月19日火曜日

redmine2.0.2 install problem
redmine2.0.2インストール時に環境不足でエラーが発生。 下記のように事前に環境を用意しておくのと、postgresqlとかsqlite などを使わないのであればbundle install時に指定する。 bundle install --without development test below message >Could not create Makefile due to some reason, probably lack of >necessary libraries and/or headers. Check the mkmf.log file for more >details. You may need configuration options
yum install ImageMagick-devel
yum install ruby-devel  % ( for /usr/lib/ruby/ruby.h undefined )
yum install mysql-devel
gem install mysql

if DATABASE Server Soft is mysql that sqlite and postgresql is not need to install.

bundle install --without development test postgresql sqlite


2012年6月17日日曜日

mantis(mantisbt-1.2.11)のカスタムフィールドにTEXTAREAを選択可能なように変更。
mantisではカスタムフィールドで255までの文字列はサポートされていますが フリーのtextareaを使うことができません。そこでソースを修正してカスタムフィールドとして 選択できるようにする。ただし、255文字以上を扱えるようにするためにはDBの型も修正する必要あり。
mantis custom_field string only supports up to 255 characters string and 1line. mantis custom_field can't select by textarea. So,Source code is modify. Custom_Field can select the textarea.DataBase kind of format is C(255) to XL. Although, If TextArea is 255 character, don't have to change.
admin/schema.php
DataBaseの構造が定義されているが、ここを修正してinstall.phpを起動させても Versionが同じもののため変更されない。これの修正方法がわからず。 下記の型修正はmysqlのツールを使って変更。ただし255文字以内であれば修正不要。
154c154
<   value   C(255) NOTNULL DEFAULT \" '' \"
---
>   value   XL NOTNULL DEFAULT \" '' \"
mantisbt-1.2.11/config_defaults_inc.php
custom_fieldとしてtextarea型が認識できるように追加。
3031c3031
<  $g_custom_field_type_enum_string    = '0:string,1:numeric,2:float,3:enum,4:email,5:checkbox,6:list,7:multiselection list,8:date,9:radio';
---
>  $g_custom_field_type_enum_string    = '0:string,1:numeric,2:float,3:enum,4:email,5:checkbox,6:list,7:multiselection list,8:date,9:radio,10:textarea';
mantisbt-1.2.11/core/cfdefs/cfdef_standard.php
選択されたtextareaの実体の定義
33a34,47
> $g_custom_field_type_definition[ CUSTOM_FIELD_TYPE_TEXTAREA ] = array (
>  '#display_possible_values' => TRUE,
>  '#display_valid_regexp' => TRUE,
>  '#display_length_min' => TRUE,
>  '#display_length_max' => TRUE,
>  '#display_default_value' => TRUE,
>  '#function_return_distinct_values' => null,
>  '#function_value_to_database' => null,
>  '#function_database_to_value' => null,
>  '#function_print_input' => 'cfdef_input_textarea',
>  '#function_string_value' => null,
>  '#function_string_value_for_email' => null,
> );
> 
300a315,324
> }
> 
> function cfdef_input_textarea($p_field_def, $t_custom_field_value) {
>   echo '<textarea    if( 0 < $p_field_def['length_max'] ) {
>     echo ' maxlength="' . $p_field_def['length_max'] . '"';
>   } else {
>     echo ' maxlength="65535">';
>   }
>   echo string_attribute( $t_custom_field_value ) .'</textarea>';
mantisbt-1.2.11/core/constant_inc.php
Custom_Fieldの型を10として登録
417a418 > define( 'CUSTOM_FIELD_TYPE_TEXTAREA', 10 );
mantisbt-1.2.11/lang/strings_english.txt
画面上に表示するためのTextArea文字列の定義
1311c1311
< $s_custom_field_type_enum_string = '0:String,1:Numeric,2:Float,3:Enumeration,4:E-mail,5:Checkbox,6:List,7:Multiselection list,8:Date,9:Radio';
---
> $s_custom_field_type_enum_string = '0:String,1:Numeric,2:Float,3:Enumeration,4:E-mail,5:Checkbox,6:List,7:Multiselection list,8:Date,9:Radio,10:TextArea';
mantisbt-1.2.11/lang/strings_japanese.txt
日本語のテキストエリアの定義
1019c1019
< $s_custom_field_type_enum_string = '0:文字列,1:整数,2:浮動小数点,3:列挙,4:メール,5:チェックボックス,6:リスト,7:複数選択リスト,8:日付,9:ラジオボタン';
---
> $s_custom_field_type_enum_string = '0:文字列,1:整数,2:浮動小数点,3:列挙,4:メール,5:チェックボックス,6:リスト,7:複数選択リスト,8:日付,9:ラジオボタン,10:テキストエリア';