ホーム > タグ > Linux/FreeBSD

Linux/FreeBSD

linux(64bit)版firefoxのメモリ利用

丸一日放置しておいたらfirefoxがメモリを3.9Gも食っていた。
ギガですよギガ。

見た瞬間、は?って感じ。

もともとGUIなことをするつもりで買ったマシンではないので、firefoxくんの出番もそんな無いのが救い。

スワップもMAX近くまで使っていて、常にHDDがカリカリ言っている。

レンタルサーバーについて考える

今日はレンタルサーバーについての記事を書きたいと思います。

レンタルサーバーとひとくくりに言っても、自由度の高いものから低いものまで様々。
また、お値段で言っても有料のものから無料のものまであって、どれが自分にあったレンタルサーバーなのか迷ってしまいますよね。

続きを読む

グーグル・クロームとやら

http://www.bloomberg.co.jp/apps/news?pid=90003017&sid=aO2hYcWHT1WM&refer=jp_news_index
–引用ここから
米グーグル:パソコンOS発表へ−「ウィンドウズ」に挑戦
7月8日(ブルームバーグ):インターネット検索エンジン最大手の米グーグルはパソコン用の基本ソフト(OS)を開発中と発表した。「ウィンドウズ」でOS市場を制している米マイクロソフトに挑戦する姿勢を強める。同OS搭載の新製品は2010年下期にも発売の見通し。
当初はネットブックと呼ばれる低価格の小型ノートパソコン向けに無償提供して普及を目指す。グーグルが7日(米国時間)に公式ブログで明らかにしたところによると、新OSは同社のウェブ閲覧ソフト「クローム」を標準搭載し、無償OS「Linux(リナックス)」をベースに開発するという。
–引用ここまで
LinuxベースのOSってところが自分としては興味深い。
ネットブックとやらの値段によっては試しに買ってみても良いかも。
おもちゃが増える(笑

ログのローテート

ログのローテート」とは、ログ・ファイルが肥大化する前にログ・ファイルを一定期間毎に入れ替えて肥大化を防ぐこと。
例えばlog4jにはデフォルトでローテート機能がついている。
ローテート専用のツールとしては以下がある。
■rotatelogs
Apacheにはログローテーションを行う独自のプログラムが付属している。それが「rotatelogs」である。
 rotatelogsは、Apacheのバイナリが格納されているディレクトリ(通常は/usr/local/apache/bin)に用意されており、その設定はhttpd.confで行う。具体的には「TransferLogディレクティブ」を使う。
管理する世代数を設定しない。そのため、切り出したログファイルは管理者の手で消されるまでディスク上に保存されることになる。
切り出し後のログファイルをログファイルをクリアしない。
■logrotate
Linuxの通常「/usr/sbin」以下に用意されていて、「/etc/logrotate.conf」の内容に従って動作する。ただし、/etc /logrotate.confの設定を書き換えただけではlogrotateは動かない。実際にログをローテーションさせるためには、cronなどを使ってlogrotateを定期的に呼び出してやる必要がある。とはいえ、Linuxを導入した時点でcronの設定も行われているから心配は要らない。
logrotate.confで指定した世代数(rotateで指定)を超えると、それより古いものは自動的に削除する。
切り出し後のログファイルをクリアする。
■cronolog
Apache 2 系のrotatelogs をもう少し多機能にしたログローテートのプログラム。
■newsyslog
FreeBSD では標準でついてくる。
newsyslog の設定は /etc/newsyslog.conf でおこなう。
んー・・・。
この中じゃユーザ権限でインストール可能なツールがなさそうだ。
自分でシェル組むしかないかなぁ。

eclipseからSubversionのリポジトリに接続(subclipse)

LinuxへのSubversionのインストールが終了したので、クライアント(Windows eclipse)からsvn接続してみる。
【サーバ(Subversion)環境】
バージョン:1.6.2
リポジトリルート:/home/svn
テストリポジトリ:/home/svn/test
【クライアント(Eclipse)環境】
バージョン:3.4.2
■subclipseのインストール
 ヘルプ>ソフトウェア更新>使用可能なソフトウェア に以下のサイトを追加。
  http://subclipse.tigris.org/update_1.6.x
■リポジトリ・ロケーションの作成
   svn://xxx.xxx.xxx.xxx(サーバのIP)/test
エラーが出た。
 Unsupported FS format
 svn: Expected FS format ‘2′; found format ‘4′
ちょっと調べたけどよく分からん。
FS(ファイルシステム?)のバージョンが違うって感じのエラーかな・・・。
サーバ側でリポジトリを作成する時に以下のようにしたところ繋がった。
svnadmin create /home/svn/test –pre-1.5-compatible
※)たぶんデフォルトだと–pre-1.6-compatibleだと思う
subclipseが1.6.2に対応していないのかな・・・。
でも一応1.6.xのサイトからダウンロードしてるのになぁ・・・。
まぁ仕方ないから1.5のフォーマットで良いことにしよう。
どうせ仕事で自分がSubversionサーバの管理者になることは無いだろうし。
気楽にいこーっと。

linuxへのSubversionのインストール

subversionのインストール
# wget http://subversion.tigris.org/downloads/subversion-1.6.2.tar.gz
# tar zxvf subversion-1.6.2.tar.gz
# cd subversion-1.6.2
# ./configure –with-apr=/usr/local/apache2 –with-apr-util=/usr/local/apache2 –with-apxs=/usr/local/apache2/bin/apxs –with-ssl
ここでエラー発生
–ここから
configure: Configuring Subversion 1.6.2
configure: creating config.nice
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking how to run the C preprocessor… gcc -E
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking target system type… i686-pc-linux-gnu
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking whether ln -s works… yes
checking for a BSD-compatible install… /usr/bin/install -c
configure: Apache Portable Runtime (APR) library configuration
checking for APR… yes
checking APR version… 1.3.3
configure: Apache Portable Runtime Utility (APRUTIL) library configuration
checking for APR-util… yes
checking APR-UTIL version… 1.3.4
checking for pkg-config… /usr/bin/pkg-config
configure: checking neon library
checking for neon-config… no
An appropriate version of neon could not be found, so libsvn_ra_neon
will not be built. If you want to build libsvn_ra_neon, please either
install neon 0.28.4 on this system
or
get neon 0.28.4 from:
http://www.webdav.org/neon/neon-0.28.4.tar.gz
unpack the archive using tar/gunzip and rename the resulting
directory from ./neon-0.28.4/ to ./neon/
no suitable neon found
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
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… found at /usr/local/apache2/bin/apxs
checking httpd version… recent enough
checking whether Apache version is compatible with APR version… yes
configure: checking sqlite library
amalgamation not found at /usr/local/src/subversion-1.6.2/sqlite-amalgamation/sqlite3.c
checking sqlite3.h usability… yes
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.6.13, but require at least 3.4.0.
Please either install a newer sqlite on this system
or
get the sqlite 3.6.13 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
unpack the archive using tar/gunzip and copy sqlite3.c from the
resulting directory to:
/usr/local/src/subversion-1.6.2/sqlite-amalgamation/sqlite3.c
This file also ships as part of the subversion-deps distribution.
configure: error: Subversion requires SQLite
–ここまで
依存するファイルのダウンロード
# cd /usr/local/src
# wget http://subversion.tigris.org/downloads/subversion-deps-1.6.2.tar.gz
# tar zxvf subversion-deps-1.6.2.tar.gz
# ./configure –with-apr=/usr/local/apache2 –with-apr-util=/usr/local/apache2 –with-apxs=/usr/local/apache2/bin/apxs –with-ssl
★トラックバック:http://ueblog.natural-wave.com/2009/03/30/subversion-install/
今度は成功。makeする
# make
なげぇ・・・
# make install
で、インストール終了らしい。
★設定いろいろ
1.svnグループ・svnユーザの作成
2.リポジトリを格納するディレクトリを作成
/home/svn
3.xinetdの設定
  /etc/xinetd.d/svnserve
service svnserve
{
disable = no
socket_type = stream
wait = no
user = svn
server = /usr/bin/svnserve
server_args = -i -r /home/svn
log_on_failure += USERID
}
4./etc/servicesの編集
  svnserve 3690/tcp # Subversion
  svnserve 3690/udp # Subversion
  ※)すでにsvnがある場合は上記に書き換える
5.サービスに登録
  chkconfig –add svnserve
6.xinetdの再起動
  service xinetd restart
7.リポジトリの作成
  svnadmin create /home/svn/test
8.svnserve.confの設定
  /home/svn/test/conf/svnserve.conf
anon-access = none # Anonymous(匿名)ユーザ
auth-access = write # 認証済みユーザ
password-db = passwd # パスワードファイル名
9.パスワードの設定
  /home/svn/test/conf/passwd
harry = harryssecret
  ※)アクセス権を変更しておく
    chmod 600 passwd
    chown svn:svn passwd
10.ディレクトリの作成
  svn mkdir -m ’setup trunk’ file:///home/svn/test/trunk
  svn mkdir -m ’setup trunk’ file:///home/svn/test/tags
  svn mkdir -m ’setup trunk’ file:///home/svn/test/branches

Subversionをインストールした後のApacheの挙動

linux(CentOS)にSubversionをインストールした後、Apacheが起動しなくなっていることに気づいた。
こんなエラーがでる。
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_dav_svn.so into server: /usr/local/apache2/modules/mod_dav_svn.so: undefined symbol: dav_register_provider
そういやSubversionってhttpでやり取りできるんだっけ。
取りあえずWEBベースでバージョン管理を行う気はないので、httpd.confから該当箇所をコメントアウトすることで対処することにした。
#LoadModule dav_svn_module modules/mod_dav_svn.so
#LoadModule authz_svn_module modules/mod_authz_svn.so
SubversionとApacheの連携を保持したままこの問題を解決する為には、以下のサイトを見ると良いかも。
といっても詳しく読んでないのでこれで直るかは未検証。
http://www.battlefield.jp/modules/xeblog/?action_xeblog_details=1&blog_id=14

linuxでの時計合わせ

Linuxでの時計合わせの方法
1.ntpサーバを利用する
   ntpdate -s [ntpサーバ名]
   例:ntpdate -s clock.nc.fukuoka-u.ac.jp | clock -w
2.手動で合わせる
   date -s hh:mm:ss
   例:date -s 12:21:30 | clock -w
3.cronで定期的に時間を合わせる
   例:毎時0分にntpサーバに問い合わせる
     0 * * * * ntpdate -s ntp.jst.mfeed.ad.jp | clock -w
※clock -w はソフトとハードの時間を合わせる

Home > Tags > Linux/FreeBSD

カウンター
  • 今日 : 29
  • 累計 : 26,778
  • 現在の閲覧者数: 2
ランキング
ブログランキング・にほんブログ村へ
人気ブログランキングへ

RSSフィード
ブログ内検索
おすすめレンタルサーバ
おすすめ度:★★★
当ブログのposifeel.comドメインはさくらインターネットのサーバで運営しています。OSはUNIX互換FreeBSD。SSHでリモート操作ができるので自由度が高く、ましぇたん一押し。Root権限がいらないソフトならインストールし放題です。CSVなどのバージョン管理ソフトもインストール可能。UNIX、Linux系のサーバーのお勉強には持ってこいです。


おすすめ度:★★
毎度おなじみのナウでヤングなロリポップ。僕も以前は使っていました。おすすめ度は高いです・・・が。リモート接続でOSを直に操作することが出来ないため、ある程度、知識のある人にとっては物足りないかもしれません。とにかく安く簡単なレンタルサーバをお探しでしたら一押しです。初心者向き。


おすすめ度:???
ロリポップの対抗馬!?最近、注目しているレンサバです。価格もサービスもロリポップと近いかも。ナウでヤングじゃない方はこちらを(ry 初心者向き
Link
他に運営しているブログです。僕の日常的な事はめもりーにょで書いています。
相互リンク募集中!
アーカイブ
アクセスアップツール
BLOGOOLE BLOG情報

SEO対策
windows
Linux
apache
eclipse
プログラミング
  • seo

フィードメーター - ITめもりーにょ
エディタ
ブロガー(ブログ)交流空間 エディタコミュニティ
ログール
メタ

Return to page top