Web 관리 · 2 min read · Jan 13, 2026
Debian Etch에서 OpenVZ 관리를 위한 WebVZ 2.0 설치
Debian Etch에서 OpenVZ 관리를 위한 WebVZ 2.0 설치
WebVZ 2.0과 함께 작동하도록 Edward Tobia에 의해 생성/수정되었습니다. 이 버전을 가능하게 한 WebVZ 1.5 설치 지침에 대해 Mike J ([email protected])에게 감사드립니다!
1.1 시작하기:
먼저 OpenVZ가 설치되고 구성되어 있어야 합니다. 이를 수행하는 방법에 대한 튜토리얼은 HowtoForge에서 찾을 수 있습니다 (https://www.howtoforge.com/installing-and-using-openvz-on-debian-etch). Debian Etch의 작은 문제/오류로 인해 Rubygems 시스템을 업데이트할 수 없습니다. 이는 gems에서 필요한 것이 누락되었기 때문입니다. 그러나 파일을 간단히 수정하여 해결할 수 있습니다. 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 문제를 수정해야 합니다.
이제 모든 것이 완벽하게 작동해야 합니다!
새 게시물을 받은 편지함에서 받기
스팸은 없습니다. 언제든지 구독 해지 가능합니다.