インストールガイド · 1 min read · Jan 13, 2026
Debian Etch に WebVZ 2.0 をインストールして OpenVZ を管理する
Debian Etch に WebVZ 2.0 をインストールして OpenVZ を管理する
Edward Tobia によって WebVZ 2.0 用に作成/修正されました。このバージョンを可能にするために役立った WebVZ 1.5 のインストール手順に感謝します!
1.1 始まり:
まず、OpenVZ をインストールして設定する必要があります。これを行うためのチュートリアルは HowtoForge にあります ( https://www.howtoforge.com/installing-and-using-openvz-on-debian-etch)。Debian Etch の小さな問題/エラーのため、gems に必要な Require が欠けているため、Rubygems システムを更新することはできません。しかし、ファイルを簡単に編集することで解決できます。WebVZ は OpenVZ 用の最もシンプルで強力なウェブ管理ツールの一つです。
2.0 必要なパッケージ:
WebVZ を動作させるために、いくつかの追加パッケージをインストールする必要があります。WebVZ は WebRick を同梱しているため、ウェブサーバーは必要ありません。
始めましょう…
main:~# apt-get install ruby rubygems libsqlite3-ruby sqlite3 irb1.8 libopenssl-ruby1.8 libreadline-ruby1.8 rdoc1.8 nanoインストールには「はい」と答える必要があります。
2.1 Debian エラーの解決:
Debian のエラーを解決し、gems を更新できるようにするには、次の手順を実行します。
main:~# nano /usr/bin/gemファイルを次のように編集します。
#!/usr/bin/env ruby
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++
require 'rubygems'
require 'rubygems/gem_runner'
require 'rubygems/open-uri'
Gem.manage_gems
required_version = Gem::Version::Requirement.new(">= 1.8.0")
unless required_version.satisfied_by?(Gem::Version.new(RUBY_VERSION))
puts "Expected Ruby Version #{required_version}, was #{RUBY_VERSION}"
exit(1)
end
# We need to preserve the original ARGV to use for passing gem options
# to source gems. If there is a -- in the line, strip all options after
# it...its for the source building process.
args = !ARGV.include?("--") ? ARGV.clone : ARGV[0...ARGV.index("--")]
Gem::GemRunner.new.run(args)CTRL + X でファイルを保存し、Y を入力して保存します。
2.2 Gems の更新:
次のコマンドをコンソールに入力して Gems を更新します。WebVZ が動作するためには更新が必要です….
main:~# gem update --systemRails 2.1.0 をインストールする必要があります。
main:~# gem install -v=2.1.0 rails3.0 WebVZ の設定:
次のコマンドを使用して WebVZ を取得します。
main:~# wget http://ovh.dl.sourceforge.net/sourceforge/webvz/webvz.2.0.tar.gzダウンロードしたアーカイブを解凍します。
main:~# tar -xzvf webvz.2.0.tar.gzWebVZ ディレクトリに移動します。
main:~# cd webvz.2.0Debian システムのいくつかの小さな変更のため、システムにソフトリンクを設定し、いくつかのディレクトリを作成する必要があります。示された通りに正確に行ってください。そうしないと WebVZ は使用できません。
main:~/webvz.2.0# ln -s /var/lib/vz /vzmain:~/webvz.2.0# ln -s /usr/bin/irb1.8 /usr/bin/irbmain:~/webvz.2.0# mkdir /etc/sysconfigmain:~/webvz.2.0# ln –s /etc/vz/conf /etc/sysconfig/vz-scripts3.1 WebVZ の起動と設定:
WebVZ を起動するには、次のコマンドでサーバーを起動できます。起動時に毎回起動するように init.d またはスタートアップスクリプトに追加できます。
main:~/webvz.2.0# ruby script/serverすべてが正常であれば、WebRick がポート 3000 で起動したというメッセージが表示されます。
次に、ウェブブラウザで http://[youripaddress]:3000 に接続する必要があります。以下の情報でログインします。
ユーザー名: admin
パスワード: admin123
まず、WebVZ を保護するために、独自のアカウントを作成する必要があります。アカウント情報でログインし、admin アカウントを削除します。
3.2 インストール後の問題 - 修正:
インストールが完了し、WebRick サーバーが実行されているとき、WebVZ にログイン/使用する際に次のエラーが発生することがあります。
Could not find table 'users'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
connection_adapters/sqlite3_adapter.rb:29:in `table_structure'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
core_ext/object/misc.rb:28:in `returning'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
connection_adapters/sqlite3_adapter.rb:28:in `table_structure'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
connection_adapters/sqlite_adapter.rb:189:in `columns'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
base.rb:1145:in `columns'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
base.rb:1158:in `column_names'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
base.rb:1171:in `column_methods_hash'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
base.rb:1714:in `all_attributes_exists?'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
inflector.rb:283:in `all?'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
base.rb:1714:in `each'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
base.rb:1714:in `all?'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
base.rb:1714:in `all_attributes_exists?'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
base.rb:1613:in `method_missing'
app/models/user.rb:13:in `authunticate'
app/controllers/login_controller.rb:16:in `sign_in'これは activerecord-2.1.0 に付属する SQLite3 アダプターの問題です。次のコマンドを ssh で実行することで修正を作成しました。
main:~# rm -f /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rbmain:~# cd /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/main:~# wget http://www.eurosrv.com/sqlite3_adapter.rbこれにより、データベースが見つからない SQLite3 の問題が修正されるはずです。
すべてが正常に動作するはずです!
新しい投稿を受信箱で受け取る
スパムはありません。いつでも購読を解除できます。