Weblog
2008-12-24: MySQLのテーブルがクラッシュ!
最近サボりすぎでした。なぜか?それは考えることが多すぎて、そんなのを理由にサボってしまた。昔々、ある所にお爺さんとお婆さんが住んでいました。お爺さんは、夏から一生懸命に流木を集め仏様を彫っていました。お爺さんは、良いお正月を迎えるため、創りためて置いた流木の仏様を町に売りにいきました。お爺さんの作った流木の仏様は、「自然にできた木目に温かみがあると」あっというまに全てが売れてしまいました。売れたお金を持って帰り、箪笥の上において置きました。それを見つけたお婆さんは「ホー」と声おあげました。お爺さんはすこし照れくさそうにしていると。お婆さんは「これで借金を返すからね」、「がんばってんな」といいました。お爺さんは「はぁ・」と、やはり照れくさそうにしていたとさ。 おしまいおしまい。
それはさておきMySQLのテーブルがクラッシュしている。ブログをあけるとこんなメッセージが!
Nucleusカウンタプラグインのテーブルです。
mySQL error with query SELECT * FROM nucleus_plugin_counter ORDER BY count_time DESC LIMIT 1: Table './blog_fusakazu_new/nucleus_plugin_counter' is marked as crashed and last (automatic?) repair failed
そんなときはまずmyisamchkでチェック
gentooez8 blog_fusakazu_new # myisamchk nucleus_plugin_counter.MYI
Warning: option 'key_buffer_size': unsigned value 18446744073709551615
adjusted to 4294963200
Warning: option 'read_buffer_size': unsigned value 18446744073709551615
adjusted to 4294967295
Warning: option 'write_buffer_size': unsigned value 18446744073709551615
adjusted to 4294967295
Warning: option 'sort_buffer_size': unsigned value 18446744073709551615
adjusted to 4294967295
Checking MyISAM file: nucleus_plugin_counter.MYI
Data records: 43702 Deleted blocks: 0
myisamchk: warning: Table is marked as crashed and last repair failed
myisamchk: warning: 2 clients are using or haven't closed the table properly
− check file-size
myisamchk: warning: Size of datafile is: 1393112 Should be: 1393048
− check record delete-chain
− check key delete-chain
− check index reference
− check data record references index: 1
myisamchk: error: Found 43704 keys of 43702
− check record links
myisamchk: error: Record-count is not ok; is 43704 Should be: 43702
myisamchk: warning: Found 43704 parts Should be: 43702 parts
MyISAM-table 'nucleus_plugin_counter.MYI' is corrupted
Fix it using switch "-r" or "-o"
クラッシュしてるからオプションに"-r"か"-o"つけて修復
gentooez8 blog_fusakazu_new # myisamchk -r nucleus_plugin_counter.MYI
Warning: option 'key_buffer_size': unsigned value 18446744073709551615
adjusted to 4294963200
Warning: option 'read_buffer_size': unsigned value 18446744073709551615
adjusted to 4294967295
Warning: option 'write_buffer_size': unsigned value 18446744073709551615
adjusted to 4294967295
Warning: option 'sort_buffer_size': unsigned value 18446744073709551615
adjusted to 4294967295
− recovering (with sort) MyISAM-table 'nucleus_plugin_counter.MYI'
Data records: 43702
− Fixing index 1
Data records: 43704
日々の積み重ねをカウントしているデータテーブルも壊れてしまえばおしまい。お爺さんはまた川の流木を集め仏様を彫るでしょう。感謝と優しさを心に持ち続けるために。
2008-04-15: YetiBot(イエティボット)からのアクセス
Yeti/1.0 (+http://help.naver.com/robots/)なるアクセスがここにきてすごい!クローラのアクセスは必要なのかどうか分からないが、下記のLOGのようなアクセスされると(それも短い間隔で)私のサーバはスワップを使い切ってフリーズしちゃいます。
61.247.217.42 - - [05/Apr/2008:00:00:11 +0900] "GET /~ms08/r・・・省略・・・49/catid/22 HTTP/1.1" 200 25906 "-" "Yeti/1.0 (+http://help.naver.com/robots/)"
61.247.217.41 - - [05/Apr/2008:00:00:16 +0900] "GET /~ms08/r・・・省略・・・e/6/2007-11 HTTP/1.1" 200 30028 "-" "Yeti/1.0 (+http://help.naver.com/robots/)"
61.247.217.35 - - [05/Apr/2008:00:00:11 +0900] "GET /~ms08/r・・・省略・・・e/6/2007-11 HTTP/1.1" 200 29880 "-" "Yeti/1.0 (+http://help.naver.com/robots/)"
61.247.217.35 - - [05/Apr/2008:00:00:12 +0900] "GET /~ms08/r・・・省略・・・53/catid/22 HTTP/1.1" 200 28888 "-" "Yeti/1.0 (+http://help.naver.com/robots/)"
61.247.217.34 - - [05/Apr/2008:00:00:32 +0900] "GET /~ms08/r・・・省略・・・11/catid/22 HTTP/1.1" 200 28632 "-" "Yeti/1.0 (+http://help.naver.com/robots/)"
61.247.217.44 - - [05/Apr/2008:00:00:35 +0900] "GET /~ms08/r・・・省略・・・52/catid/22 HTTP/1.1" 200 25599 "-" "Yeti/1.0 (+http://help.naver.com/robots/)"
61.247.217.33 - - [05/Apr/2008:00:00:39 +0900] "GET /~ms08/r・・・省略・・・12/catid/22 HTTP/1.1" 200 30543 "-" "Yeti/1.0 (+http://help.naver.com/robots/)"
61.247.217.35 - - [05/Apr/2008:00:00:43 +0900] "GET /~ms08/r・・・省略・・・12/catid/22 HTTP/1.1" 200 27345 "-" "Yeti/1.0 (+http://help.naver.com/robots/)"
そこでせっかくアクセスして頂いているのですが、すこしばかり制御させてもらいます。
こんな感じ!!
Read More!
2007-12-14: フレームバッファコンソール おさらい!
Kernelが2.6.23になってフレームバッファの取扱いが変わったみたい。そこでもう一度フレームバッファのおさらいをします。2.6.22まではvesafb-tngのドライバを使っていたんだけどuvesafbに変更になったのがポイントみたいです。
※まずは現在の状態
利用中のカーネルは(linux-2.6.22-gentoo-r8)これ!
今回使うのは(linux-2.6.23-gentoo-r3)これ
Read More!
2007-12-10: こんどはpamを削除
これもしたくてしたわけではなく。なんとなく削除してしまった。またこれもとんでもないことになるんですね。ログインできない!(#^.^#)
singleで起動して、改めてpamをインストールする。でも不思議なのは/etc/pam.dが残っているとアップデートできないのはなぜ?
Linuxには関係ないのですが、OvationかRes Polfusか悩んでます。ukuleleですけどね!
2007-10-29: Pythonを消してしまった。
なにを考えていたのか?頭がいかれているのか?Pythonを消してしまった。そんなことするとemergeなんか動かなくなる。それはあたりまえで、Pythonで書かれているから。とほほ・・・・ まあ気をとしなおして(^_^;) 日本Pythonユーザ会あたりから最新をダウンロード(最新は2.5だけど今回消したのは2.4.4なのでそれ)こんな風にwget http://www.python.jp/pub/ftp.python.org/python/2.4.4/Python-2.4.4.tar.bz2
/usr/local/srcあたりにダウンロードする。そして解凍
bzcat -dc Python-2.4.4.tar.bz2| tar -xvf -
ディレクトリをPython-2.4.4に移ってコンパイルの準備そしてmakeにインストール
./configure --prefix=/usr
make
make install
python setup.py install
そしてあらためてgentooバージョンのインストール
emerge dev-lang/python
これで一安心!!!これでよかったのかどうかも不安(#^.^#)
2007-03-19: Yahooのオンラインゲーム
Yahooのオンラインゲームを楽しむために。わが家のgentoo Linuxにこんなことしました。まず、http://www.java.com/ja/download/manual.jspあたりから Linux 版 Java Runtime Environment (JRE) をダウンロードして/optに入れておく。
そしてスーパーユーザになってほげほげほげ・・・・下記参照
hogehoge@gentooez9 ~ $ su -
gentooez9 ~ # cd /opt
gentooez9 opt # ls -al
total 16733
drwxr-xr-x 9 root root 352 Mar 17 15:27 .
drwxr-xr-x 24 root root 632 Feb 12 19:10 ..
-rw-r--r-- 1 root root 0 Oct 8 2005 .keep
drwxr-xr-x 3 root root 72 Dec 6 2005 OpenOffice.org
drwxr-xr-x 9 root root 272 Feb 6 14:18 RealPlayer
drwxr-xr-x 8 root root 192 Jan 10 2006 blackdown-jdk-1.4.2.03
drwxr-xr-x 7 root root 168 Oct 19 16:41 blackdown-jre-1.4.2.03
-rwxr--r-- 1 hogehoge users 17115102 Mar 17 15:14 jre-1_5_0_11-linux-i586.bin
drwxr-xr-x 3 root root 72 Jun 8 2006 netscape
drwxr-xr-x 8 root root 192 Jan 17 11:58 sun-jdk-1.5.0.10
ダウンロードされたのはjre-1_5_0_11-linux-i586.binこれで、permissionに実行権があるのを確認して
gentooez9 opt # ./jre-1_5_0_11-linux-i586.bin
まあいろいろ出てきますが最終的にjre1.5.0_11のディレクトリが出来上がる。
そして入れたいブラウザがfirefoxなら
gentooez9 opt # cd /usr/lib/mozilla-firefox/plugins
gentooez9 plugins # ln -s
/opt/jre1.5.0_11/plugin/i386/ns7/libjavaplugin_oji.so
てなことをしておく。あとはブラウザを起動しさーオンラインゲームだ???
なんとjavaが文字化けつーか□□□□□□□□□こんなのがいっぱい。そこでさっき出来上がったjre1.5.0_11にこんなことをする。
gentooez9 plugins # cd /opt/jre1.5.0_11/lib/fonts
fallbackのフォルダ作成。
gentooez9 fonts # mkdir fallback
gentooez9 fonts # cd fallback
kochiフォントあたりをリンクする。
gentooez9 fallback # ln -s /usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf
gentooez9 fallback # ln -s /usr/share/fonts/kochi-substitute/kochi-mincho-subst.ttf
こんどこそ。ブラウザを再起動してオンラインゲームだ!!!!(*^_^*)
さのしいよ!これで「むろさと君」と大富豪で対戦だ。
2007-01-22: NP_Relatedの文字化け
NP_Related v0.32を使っているのですがamazonの文字化けがなおりません。いろいろ調査してはみたのですがだめ。そもそも私のMySQLの初期設定が悪いのだろうと!なんせこんな設定になっている。
default-character-set=latin1
そこで無理やりこんなエンコードの入れ子で文字化け解消(ちょっと強引かも!)
884と885行あたり
$title = mb_convert_encoding(mb_convert_encoding($r['ProductName'],
"latin1","ISO-2022-JP,ASCII,JIS,UTF-8,EUC-JP,SJIS,ISO-2022-JP"),_CHARSET,"UTF-8");
$snippet = mb_convert_encoding(mb_convert_encoding($snippet,
"latin1","ISO-2022-JP,ASCII,JIS,UTF-8,EUC-JP,SJIS,ISO-2022-JP"),_CHARSET,"UTF-8");
2006-12-28: 今年もあとわずか!
MoMoSo-NET.COM.のポータルサイトに2006年のアクセス数を掲載しました。ここ・・https://www.momoso-net.com/index.php?itemid=41
自分自身の今年を振り返るのはもう少し後にして。MoMoSo-NET.COM.とりあえず来年もがんばります。
2006-11-29: Windowsを捨てられる?
フランス議会ではLinuxにOpenOfficeそれにFirefoxだなんてすごいです。あとはこれにThunderbirdでもあれば普通に家庭使えるからね。あとはOSなしとかLinuxモデルとか一般で気軽に買えるといいけどね。2006-11-18: Nucleus バージョン3.24
複数ユーザで使用時にクロスサイトスクリプティングの脆弱性とのことですが、MoMoSo-NET.COM.ユーザの中にはそんなことをする利用者はいないことを願ってます。リンクは「フリー百科事典『ウィキペディア(Wikipedia)」です。
Weblog
2009-02-27: ALA MOANA UK-260P
携帯電話を買い換えたので、その写真をアップしました。
2009-01-19:
現在カスタム中!
ストリングをAquilaに変更。
2007-06-14:
Worth Strings のLightを付けてみた。感想は軽い!そのまんまですが、音は2〜3日もしたら落ち着くでしょうか。そしたらまた書きます。
しばらく酒のつまみに。美味しく呑めそうです。
(^_^)/□☆□\(^_^)
Weblog
Weblog
2016-11-30: 今回のWebメールはRoundCubeで!(Ubuntu 16.04 LTS)
今回のWebメールはRoundCubeで!(Ubuntu 16.04 LTS)これらが事前にインストールし動いていること。
・SMTPサーバー、IMAPサーバー、PHP(今回はPHP5.6)、SSLの設定、MySQLサーバー
・データベースの作成
root@ubuntuez8:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18331
Server version: 5.7.16-0ubuntu0.16.04.1 (Ubuntu)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database roundcube;
mysql> grant all privileges on roundcube.* to roundcube@'localhost' identified by 'password';
mysql> flush privileges;
mysql> exit
・RoundCubeのインストール
root@ubuntuez8:~# apt-get -y install roundcube roundcube-mysql roundcube-plugins roundcube-plugins-extra
Configuring roundcube-coreの設定が途中で表示されますが
root@ubuntuez8:~# cd /usr/share/dbconfig-common/data/roundcube/install
root@ubuntuez8:/usr/share/dbconfig-common/data/roundcube/install# mysql -u roundcube -D roundcube -p < mysql
root@ubuntuez8:/usr/share/dbconfig-common/data/roundcube/install# cd
root@ubuntuez8:~#
・RoundCubeの設定
root@ubuntuez8:~# vi /etc/roundcube/debian-db.php
<?php
##
## database access settings in php format
## automatically generated from /etc/dbconfig-common/roundcube.conf
## by /usr/sbin/dbconfig-generate-include
##
## by default this file is managed via ucf, so you shouldn't have to
## worry about manual changes being silently discarded. *however*,
## you'll probably also want to edit the configuration file mentioned
## above too.
##
$dbuser='roundcube';
$dbpass='password';
$basepath='';
$dbname='roundcube';
$dbserver='localhost';
$dbport='';
$dbtype='mysql';
root@ubuntuez8:~# vi /etc/roundcube/config.inc.php
省略
$config = array();
省略
$config['default_host'] = 'ssl://mail.hogehoge-net.com';
省略
$config['default_host'] = 'ssl://mail.hogehoge-net.com';
省略
$config['smtp_server'] = 'ssl://mail.hogehoge-net.com';
省略
$config['smtp_port'] = 465;
省略
$config['smtp_user'] = '%u';
省略
$config['smtp_pass'] = '%p';
省略
$config['product_name'] = 'HoGeHoGe-NET.COM. Webmail';
ここからは最後に追加
# IMAP Port specification (SSL)
$config['default_port'] = 993;
# SMTP Specify authentication type
$config['smtp_auth_type'] = 'LOGIN';
# SMTP HELO host Designation
$config['smtp_helo_host'] = 'hogehoge-net.com';
# Specify domain name
$config['mail_domain'] = 'hogehoge-net.com';
# UserAgent Specify
$config['useragent'] = 'HoGeHoGe-NET.COM. Webmail';
# SMTP IMAP Specify connection options
$config['imap_conn_options'] = array(
'ssl' => array(
'verify_peer' => true,
'peer_name' => 'mail.hogehoge-net.com',
'allow_self_signed' => true,
'ciphers' => 'HIGH:!SSLv2:!SSLv3',
),
);
$config['smtp_conn_options'] = array(
'ssl' => array(
'verify_peer' => true,
'peer_name' => 'mail.hogehoge-net.com',
'allow_self_signed' => true,
'ciphers' => 'HIGH:!SSLv2:!SSLv3',
),
);
ここがpoint 'CN_match' ではなく 'peer_name' で!!
root@ubuntuez8:~# vi /etc/apache2/conf-enabled/roundcube.conf
#コメント解除
Alias /roundcube /var/lib/roundcube
php-mcryptの暗号化関数が必要。なのでインストールするが他にもいろいろ入れておく。
root@ubuntuez8:~# apt install php5.6-mcrypt php5.6-intl php5.6-zip
PHP拡張を有効化
root@ubuntuez8:~# phpenmod mcrypt
PEAR (PHP Extension and Application Repository)でPHPライブラリを確認
とりあえづ現状をアップデートしておく。
root@ubuntuez8:~# pear upgrade-all
でこんなのが必要なのでインストール
root@ubuntuez8:~# pear install Auth_SASL Net_SMTP Net_IDNA2-0.1.1 Mail_mime Mail_mimeDecode
root@ubuntuez8:~# pear list
Installed packages, channel pear.php.net:
==============
Package Version State
Archive_Tar 1.4.2 stable
Auth 1.6.4 stable
Auth_SASL 1.0.6 stable
Console_Getopt 1.4.1 stable
Crypt_CHAP 1.5.0 stable
DB 1.9.2 stable
Log 1.13.1 stable
MDB2 2.5.0b5 beta
Mail 1.3.0 stable
Mail_Mime 1.10.0 stable
Mail_mimeDecode 1.5.6 stable
Net_IDNA2 0.1.1 beta
Net_LDAP2 2.2.0 stable
Net_SMTP 1.7.2 stable
Net_Sieve 1.3.4 stable
Net_Socket 1.0.14 stable
PEAR 1.10.1 stable
PEAR_Manpages 1.10.0 stable
Structures_Graph 1.1.1 stable
XML_Util 1.3.0 stable
ここpointNet_IDNA2-0.1.1はバージョンも指定してインストール。ベータ版ですねこれ!!
pluginのjqueryuiとzipdownloadのconfigファイルを修正
root@ubuntuez8:~# cd /var/lib/roundcube/plugins/jqueryui
root@ubuntuez8:/var/lib/roundcube/plugins/jqueryui# cat config.inc.php
<?php
// Empty configuration for jqueryui
// See /usr/share/roundcube/plugins/jqueryui/config.inc.php.dist for instructions
// Check the access right of the file if you put sensitive information in it.
?>
と書いてあるので!
root@ubuntuez8:/var/lib/roundcube/plugins/jqueryui# ls -al | grep config.inc.php
lrwxrwxrwx 1 root root 19 Nov 23 2015 config.inc.php -> /etc/roundcube/plugins/jqueryui/config.inc.php
ーrw-r--r-- 1 root root 334 Nov 23 2015 config.inc.php.dist
root@ubuntuez8:/var/lib/roundcube/plugins/jqueryui# rm config.inc.php
root@ubuntuez8:/var/lib/roundcube/plugins/jqueryui# ln -s config.inc.php.dist config.inc.php
root@ubuntuez8:/var/lib/roundcube/plugins/jqueryui# ls -al | grep config.inc.php
lrwxrwxrwx 1 root root 19 Nov 30 09:25 config.inc.php -> config.inc.php.dist
ーrw-r--r-- 1 root root 334 Nov 23 2015 config.inc.php.dist
root@ubuntuez8:/var/lib/roundcube/plugins/jqueryui# cd /var/lib/roundcube/plugins/zipdownload
root@ubuntuez8:/var/lib/roundcube/plugins/zipdownload# cat config.inc.php
<?php
// Empty configuration for zipdownload
// See /usr/share/roundcube/plugins/zipdownload/config.inc.php.dist for instructions
// Check the access right of the file if you put sensitive information in it.
?>
同じくと書いてあるので!
root@ubuntuez8:/var/lib/roundcube/plugins/zipdownload# ls -al | grep config.inc.php
lrwxrwxrwx 1 root root 19 Nov 23 2015 config.inc.php -> /etc/roundcube/plugins/zipdownload/config.inc.php
ーrw-r--r-- 1 root root 334 Nov 23 2015 config.inc.php.dist
root@ubuntuez8:/var/lib/roundcube/plugins/zipdownload# rm config.inc.php
root@ubuntuez8:/var/lib/roundcube/plugins/zipdownload# ln -s config.inc.php.dist config.inc.php
root@ubuntuez8:/var/lib/roundcube/plugins/zipdownload# ls -al | grep config.inc.php
lrwxrwxrwx 1 root root 19 Nov 30 09:47 config.inc.php -> config.inc.php.dist
ーrw-r--r-- 1 root root 399 Nov 23 2015 config.inc.php.dist
apache2をリスタートして終了
root@ubuntuez8:/var/lib/roundcube/plugins/zipdownload# systemctl restart apache2.service
・これでWeb ブラウザを起動し、「https://www.hogehoge-net.com/roundcube/」でログインして使えますが、LOGをはくのでローテーションなんか設定しましょう。
Comment Tree
└ bouichi 11/21
└ 耄碌爺 04/05
└ mozodon 03/29
└ bouichi 03/29
└ mozodon 03/27
└ ウクレレ 01/22
└ bouichi 03/26
└ おっぴろこ 03/26
└ クロス 10/02
└ クロス 09/29
└ クロス 09/18
└ ぼういち 09/17
└ クロス 09/17
└ and more...
└ bouichi 10/01
└ 24研 10/01
└ bolton rent car 12/10
└ クルル 02/22
└ とりあえず 09/30
└ peto4ok 06/09
└ SCO Customer Profile 09/17
└ ppionerka 06/07