Wednesday, April 6, 2011

63 Top Commercial Open Source Projects


Frequently, Datamation publishes lists of free Linux and open source software. This time, we're doing something a little different: we’re highlighting outstanding commercial open source software.

Before we go any farther, we should define what we mean by "commercial open source software." As with many topics in the open source world, different people have very different opinions about what that phrase means.

Some argue that if an open source project has a commercial side it's not truly open source any more. Others hold that if you look hard enough, all open source software has some sort of commercial motive.

On this list, you'll find a variety of projects that are based on open source code and whose owners make money directly from their software.

How they make that money varies: Many of the projects on the list have a "community" version that is available under an open source license and "professional" and/or "enterprise" versions that add features that are only available with a commercial, paid license.

Other projects offer the software for free, but require payment for support, maintenance, installation or other services.

A few others charge for hardware products based on the software. And a growing group of organizations make money by hosting their open source software on a software-as-a-service (SaaS) basis.

This list doesn't include projects that simply request donations or those that make money only by selling hats, T-shirts and other gear emblazoned with their logo.

We also left off projects that offered paid support as an afterthought or those with support and services available only from third parties.

Why put together a list of commercial open source projects at all? Many businesses find it preferable to acquire software under a commercial license because they are worried about some of the legal provisions of some open source licenses, particularly the GPL. In addition, many companies want reliable support and maintenance for their software and are willing to pay for it.

Home users are much less likely to pay for open source software, and as a result, the vast majority of the projects on this list are aimed at businesses rather than home users.

As always, if you would like to suggest a project that you think should be on our list, feel free to mention it in the comments section below.


Open Source Billing
1) jBilling This software for ISPs, telecoms, ASPs, media, software developers and other firms who charge for subscription services offers a highly scalable, robust and flexible Web-based billing solution. The complete software is available for free; support and other services are available for a fee.

Operating System: OS Independent.


Open Source Business Intelligence
2) Jaspersoft Jaspersoft's Web site boasts that it is "the world's most widely used business intelligence software."

The company offers two separate products: JasperReports Server, which allows non-developers to create their own reports and dashboards, and Jaspersoft BI, which incorporates JasperReports Server with ETL and OLAP features.

Both are available in free community editions or paid versions that add extra features and support.

Operating System: OS Independent.
3) Palo BI Suite
Used by more than 45,000 companies and downloaded more than 400 times a day, Palo adds online analytical processing capabilities to Microsoft Excel.

It's available in either a community or a premium version, which includes more features and support.

Operating System: OS Independent.

4) Pentaho
The "open source business intelligence leader," Pentaho offers enterprises the opportunity to cut their BI licensing costs by 90 percent.

In addition to the free community edition, it's available in a variety of paid versions, including an on-demand SaaS version.

Operating System: Windows, Linux, OS X.

5) OpenReports
This Web-based reporting tool boasts an open architecture, ease of use, and powerful reporting capabilities. It's available in an open source version or in a professional version.

Operating System: OS Independent.

6)RapidMiner
"The world-leading open-source system for data and text mining," RapidMiner combines Data Integration, Analytical ETL, Data Analysis, and Reporting in a single solution. The enterprise versions offer an extended list of features, professional support and maintenance.

Operating System: OS Independent.


Open Source Business Process Management
7) Bonita Open Solution Java-based Bonita Open Solution consists of three separate parts: a process modeling tool, a BPM and workflow engine, and the user interface. The full version of the software is free, with training and three different levels of support available for a fee.

Operating System: OS Independent.

8) ProcessMaker
Available in open source, enterprise, or cloud editions, ProcessMaker helps companies like Toyota, Lenovo and Honeywell simplify and optimize workflows. It allows companies to reduce their paperwork, become more efficient and improve outcomes.

Operating System: Windows, Linux.


Open Source Cloud Infrastructure
9) Cloud.com CloudStack Cloud.com provides CloudStack on an infrastructure-as-a-service (IaaS) basis to companies that want to build and deploy private clouds. While the community version of the software is available under a GPL license, the enterprise and service provider editions include some proprietary code.

Operating System: Linux.

10) Scalr
Similar to (but much less expensive than) RightScale, this open source cloud computing platform makes it easier to scale Web sites and Web apps up and down as needed. The development edition is available for free for those with one server farm and up to eight servers. Production and mission critical subscriptions are available for those with larger needs.

Operating System: Linux.


Open Source Content Management
11) Alfresco Alfresco's open source solution offers document management, Web content management and collaboration features. It's commercial products add some records management features as well as enterprise-grade support.

Operating System: Windows, Linux, OS X.

12) Liferay
Recently named the "most popular Java CMS," Liferay offers portal, publishing, content management and collaboration solutions. Well-known users include Cisco, Sesame Street, T-Mobile, Barclays and others. It offers both an open source and a supported enterprise version of its software.

Operating System: OS Independent.

13) Magnolia
Like many of the other items on this list, this enterprise-focused Web content management software comes in a free open source version or a paid enterprise edition. The latest update offers excellent collaboration features, including concurrent editing, comparing revisions, deletion workflow, and content translation.

Operating System: Windows, Linux.

14) MindTouch
With companies like HTC, the Washington Post, HP, Novell, Autodesk and others as clients, MindTouch claims that it "makes the world's most respected social knowledge base." The MindTouch Core product is available with an open source license, while a commercially licensed version is available in on-premise or hosted versions.

Operating System: Windows, Linux.


Open Source Customer Relationship Management (CRM)
15) ConcourseSuite This java-based app combines CRM with web content management and team collaboration features. The software can be downloaded for free or used in the cloud on an SaaS basis. The company also offers service contracts for on-premise deployments.

Operating System: Windows, Linux, OS X.

16) Orange Leap
This app is designed to help non-profits manage their relationships with "constituents." The base software and the "Guru" reporting add-on are available in either community or supported versions. You can also purchase it on an SaaS basis or buy other paid add-ons.

Operating System: Windows.

17) SourceTap
This very flexible sales force automation tool helps companies forecast sales, recognize trends, share information and close more deals. It offers dual licensing options, and it can also be purchased on an SaaS basis.

Operating System: Windows, Linux.

18) SplendidCRM
Like many of the other apps on this list, SplendidCRM can be used on-premise or in the cloud. This Windows-centric software comes in community, professional or enterprise versions with different features and support levels for each.

Operating System: Windows.

19) SugarCRM
Sugar's client list includes Avis, Coca-Cola, the state of Oregon and 7,000 other organizations, making it one of the most popular open source CRM solutions. It's available in professional and enterprise editions, each of which add more functionality to the basic open source version.

Operating System: Windows, Linux, OS X.

20) vTiger
vTiger offers a full range of sales force automation, customer service, marketing, inventory management and reporting features. The full version of the software with the complete list of features is available with an open source license; support and the hosted version are available for a fee.

Operating System: Windows, Linux, iOS, Android.


Open Source Databases
21) MySQL Now owned by Oracle, MySQL is "the world's most popular open source database" and is used by well-known companies like Facebook, Google, Adobe, Alcatel Lucent and Zappos. The community edition is available for free, while the standard, enterprise and cluster carrier grade editions require support fees.

Operating System: Windows, Linux, OS X.


Open Source Data Warehouse (DW)
22) Apatar
Apatar software helps companies integrate their data from various on-site and on-demand applications, including Salesforce.com, Quickbooks, and others. In addition to the free software, the company offers commercial support, training, and integration consulting services, as well as some on-demand integration services and some pre-built data integration solutions.

Operating System: Windows, Linux.

23) MailArchiva
This app helps organizations meet their compliance requirements for storing e-mails long term. The enterprise edition adds a number of features not available in the open source edition, as well as offering faster performance for companies with a lot of users.

Operating System: Windows, Linux.

24) Talend
The "recognized market leader in open source data integration," Talend offers a unified platform for data management that includes data integration, data quality and master data management tools. In addition to the free community versions of its products, Talend also offers paid support, training, commercial versions with additional features, and other services.

Operating System: Windows, Linux, Unix.


Open Source Developer Tools
25) Mono Novell's Mono project offers .NET developers a number of cross-platform, open source development tools. Professional and enterprise editions of the some of the tools are available for purchase at the site.

Operating System: Windows, Linux, OS X.

26) Sencha Touch
"The first HTML5 mobile Web app framework," SenchaTouch helps users create Web-based apps that look and feel like native iOS or Android apps. It's available under either a GPL or a commercial license depending on the needs of users.

Operating System: OS independent.

27) Zend
Zend offers both a Web application server (Zend Server) and an IDE (ZendStudio) for PHP developers. Both are available in free, open source or paid versions, and the company also offers training and some additional commercial products and services.

Operating System: Windows, Linux, OS X.


Open Source Document Management Systems (DMS)
28) Epiware
Web-based Epiware combines enterprise document management capabilities with groupware functionality like a calendar, wikis and some project management capabilities. The company offers paid support for enterprise users.

Operating System: Windows, Linux.

29) LogicalDOC
Designed to be very user-friendly, LogicalDOC offers a Web-based interface and mobile versions for users with smartphones. The enterprise edition adds capabilities that aren't available in the open source community edition, and a hosted version is also available. Operating System: OS Independent.

30) OpenKM
OpenKM (short for" Open Knowledge Mangement") offers a Web-based interface for managing documents at organizations of all sizes. Professional support and training can be purchased for a fee.

Operating System: OS Independent.


Open Source E-Commerce
31) Magento The "world's fastest-growing eCommerce platform," Magento boasts more than 2.5 million downloads and more than 25 billion transactions. Additional features not included in the open source community edition are available in the paid professional and enterprise editions. Operating System: Windows, Linux.


Open Source E-mail/Collaboration/Groupware
32) Collabtive Designed as an alternative to Bascamp, Collabtive offers project management, time tracking and reporting features. Like Basecamp, it's also available on an SaaS basis, and the company also offers some related services.

Operating System: OS Independent.

33) cyn.in
Cyn.in aims to help teams collaborate and communicate more quickly through wikis, social networks, blogs, file sharing repositories, micro blogs, discussion boards and other communication applications. It comes in three flavors: the free community edition, the on-demand SaaS version and the on-premise appliance.

Operating System: Windows, Linux, OS X.

34) Feng Office
Used by more than 100,000 people, Feng Office offers e-mail, time tracking, notes, contacts, calendar, tasks, document sharing and more. Users can choose from the free open source version, an SaaS version called "FengSky," or a supported on-premise version that also includes some additional modules.

Operating System: Windows, Linux, OS X.

35) Group-Office
The paid versions (both hosted and on-premise) of Group-Office include calendar, CRM, project management, e-mail, file-sharing and synchronization. The open-source version offers slightly fewer features.

Operating System: OS Independent.

36) Scalix
Used by more than 1,300 corporations with more than 2 million mailboxes, Scalix offers an alternative to a Microsoft Exchange server. It offers e-mail and calendaring, with excellent Outlook support. It's available in a free community version or paid small business, enterprise or hosting versions.

Operating System: Linux.

37) Zimbra
The Zimbra Collaboration Suite calls itself "the world’s most sophisticated web application suite" and describes itself as "a next-generation Microsoft Exchange server." The open source server and the desktop client are available for free; the appliance and network editions require a fee.

Operating System: Linux, Unix, OS X.


Open Source Enterprise Resource Planning (ERP)
38) Compiere ERP + CRM Business Solution This ERP solution for multi-site, multi-national corporations offers dashboards, reporting, customer history, and many other features. It can be deployed on-premise or in the cloud via Amazon's EC2. The community version is completely open source, while the professional and enterprise versions add more functionality and paid support with a commercial license.

Operating System: Windows, Linux, OS X.

39) Open ERP
This ERP suite offers CRM, purchasing, manufacturing, warehouse management, project management, accounting, human resources and marketing capabilities. Open ERP charges no fees for licenses, but does charge for support and on-site deployment services or SaaS subscriptions.

Operating System: Windows, Linux.

40) opentaps
Opentaps proclaims itself "the most advanced open source ERP + CRM solution." The full software is available with an open source license, or you can purchase a subscription to the Professional Edition, which includes updates and technical support.

Operating System: Windows, Linux.

41) ]project-open[
The most popular open source ERP solution in Germany, project-open combines ERP features with project management features. The base software is available on an open-source basis, while additional modules, support and other services are available for a fee. It's also available on an SaaS basis.

Operating System: OS Independent.

42) xTuple
xTuple's software helps businesses of all sizes keep track of sales, accounting, customers suppliers, inventory, manufacturing and distribution. The PostBooks edition of the software is available with an open source or a commercial license, and the Standard and Manufacturing editions are available with a commercial license only.

Operating System: Windows, Linux, OS X, mobile OSes.


Open Source Gateway Security/UTM Appliances
43) Endian Firewall With Endian's open source software, you can turn any old PC into a unified threat management appliance to protect your network from all kinds of threats. Or you can purchase hardware or supported virtual appliances based on the same software.

Operating System: Linux.

44) NetCop UTM
NetCop UTM combines the best open source security products into a single UTM solution. It comes in three versions: Free (for up to 5 users), SME (for less than 20 users) and Enterprise (for more than 20 users).

Operating System: Linux.

45) Untangle
Used by more than 30,000 organizations, Untangle includes a Web filter, virus blocker, spam blocker, ad blocker, firewall, QoS, intrusion prevention, protocol control, OpenVPN, and all the other capabilities you would expect in a UTM appliance. As with Endian, you can use it to build your own appliance, or you can purchase a hardware appliance or a software package that adds more features not found in the open source version.

Operating System: Linux.


Open Source Human Resource Management (HRM)
46) Open Applicant Open Applicant helps HR professionals and hiring managers sort through potential candidates to find the best applicant for a job. The application is free to download, but enterprise level support, customization, an SaaS version, and other services can be purchased from the company.

Operating System: OS Independent.

47) Orange HRM
With more than 1 million users, Orange calls itself "the world’s most popular open source human resource management software." The software itself is free, but Orange also offers commercial support, training, add-ons, customization and an SaaS version.

Operating System: Windows, Linux, OS X.


Open Source Middleware
48) JBoss Staking its claim as the "leader on-premise and in the cloud," RedHat's JBoss encompasses a variety of middleware offerings. The community versions are free, while enterprise subscriptions add support and other services.


Open Source Mind Mapper
49) XMind
This brainstorming and mind mapping software makes it easy to see the connections between ideas. The professional version adds features for business users, like export tools and Gantt views, that aren't available in the free open source version.

Operating System: Windows, Linux, OS X.


Open Source Network Monitoring/Scanning/Intrusion Detection
50) Nagios
The "industry standard in open source monitoring," Nagios provides alerts that can help IT respond to problems before they can cause costly outages. Well-known users include Unisys, Wells Fargo, BT, iRobot, and the Office of the President of the United States. Commercial support and maintenance packages are available from Nagios Enterprises.

Operating system: Linux, Unix.


51) Opsview Community
Opsview aims to "unify your monitoring" so that you can track your physical, cloud and hybrid infrastructure from one place. An enterprise version, additional enterprise modules, support, training and consulting services are available for a fee.

Operating System: Linux.

52) Snort
The "most widely deployed IDS/IPS technology worldwide," Snort boasts more than 300,000 registered users. Project owner Sourcefire offers paid consulting and training, as well as commercial products based Snort and sister project ClamAV.

Operating System: Linux, Unix, OS X.

53) Zabbix
Calling itself the "ultimate open source monitoring solution," Zabbix provides a huge range of monitoring, alerting and visualization features. Several different levels of commercial support are available, as well as training and other services.

Operating System: Windows (agent only), Linux, OS X.


Open Source Operating System
54) Red Hat Perhaps the most well-known commercial open source software company, Red Hat's flagship enterprise Linux product for desktops and servers comes with commercial support and other services are also available. The company also offers virtualization products based on the operating system and JBoss Middleware that is available in community or enterprise versions.

55) SUSE
Novell's version of Linux also comes with enterprise-grade service and support. The company also offers a variety of other software projects that extend the capabilities of SUSE, as well as servers pre-configured with SUSE Linus Enterprise Server.

56) Ubuntu
Now one of the most popular versions of Linux, Ubuntu carries no licensing fees in any of its versions. Professional support and desktop, server or cloud services are available from owner Canonical.


Open Source Project Management
57) Onepoint Project This enterprise project management software is designed to be both highly scalable and easy to use. Features include the work breakdown structure, project pipeline, cost baseline, plan/actual comparisons, milestone trend analysis, resource utilization, and more. Onepoint comes in a wide variety of editions: basic and community are licensed under GPL and the professional, master, group and enterprise versions require a fee-based commercial license.

Operating System: Windows, Linux, OS X.


Open Source Router Software
58) Vyatta
Vyatta's software and appliances offer enterprises an alternative to expensive networking hardware from companies like Cisco. The core software is available as an open source download, or you can purchase hardware, supported software or services from Vyatta.

Operating System: Linux.


Open Source School Management
59) openSIS openSIS helps school officials keep track of student information, attendance, grades, schedules, report cards, and more. In addition to the free community edition, in comes in paid district or school editions which can be deployed on-premise or accessed in the cloud. Operating System: OS Independent.


Open Source Server Software
60) ClearOS This server software for small businesses combines a gateway security, server and networking features in a single download. Key features include multi-WAN, VPN, firewall, anti-malware, anti-spam, intrusion prevention, content filtering, file and print services, mail server, Web server, groupware, and more. While the full software can be downloaded for no charge, ClearCenter also offers paid support, services and hardware based on ClearOS.

Operating System: Linux.

61) Zentyal
Zentyal can act as a security gateway, infrastructure manager, unified threat manager, office server and/or unified communication server. The basic software is available for free, while professional and enterprise versions add support and more features for a fee.

Operating System: Linux.


Open Source Time Tracking
62) TimeTrex TimeTrex claims to be "the world's most popular open source payroll and time management software." In addition to the free standard edition, it's available in several other versions that can be deployed on-site or used in the cloud.

Operating System: Windows, Linux, OS X.


Open Source User Authentication
63) WiKID WiKID offers open-source, two-factor authentication that utilizes software tokens for remote access, online banking and other applications that require strong authentication. The enterprise version adds some proprietary code not included in the community version, as well as support.

Operating System: OS Independent.

Tuesday, April 5, 2011

المرشح السلفي المبارك

والحق اقول ... اننى لم اكن انتوى الترشح عن اى تيار سلفى او اى جماعة اصولية ... ولكنها ارادة المولى عز وجل وضعتكم امامى من جديد لنكمل معا مسيرة التنمية و الاصلاح



أنتخبوا الأخ الشيخ المبارك الفاضل من أجل جمال المستقبل وعلاء الوطن وتحقيق العدلي والعمل مع صفوت المجتمع العالمي حتي يتحقق لنا السرورونستنشق هواء نظييييييييييف





Monday, April 4, 2011

QR Code in Linux


qrencode
Probably you have already saw these small black and white image in some sites or while walking around your city, or if you have a smartphone probably you have already used them; they are QR Code.
From Wikipedia: A QR code (short for Quick Response) is a specific matrix barcode
(or two-dimensional code), readable by dedicated QR barcode readers and camera phones.
The code consists of black modules arranged in a square pattern on a white background.
The information encoded can be text, URL or other data.
In this article we’ll see how to create these image in Linux and some uses of these images.



qrencode
This GPL software is available in Debian, Ubuntu and Fedora repository, so just use your package manager to install it,for me this means aptitude install qrencode (ubuntu 10.10).
Once you have installed the software generate a QR Code is trivial, just write:
qrencode "http://www.linuxaria.com/" -o linuxaria.png
This will create an image that read (with the correct reader) will show the url: http://www.linuxaria.com
But qrencode can be used also with text file, try this:
cat /etc/passwd | qrencode -s 10 -o -|display
This command take as input your /etc/passwd and send the image to to the standard output where i’ve put in pipe the command display (imagemagick package) that show the result. Note also the flag -s that specify the size of dot (pixel). (default=3),
the greater is this value the bigger your image will be.
There is no GUI interface for qrencode but you can easily mix it with Zenity to create a quick interface that ask the parameters and create the image
This is an example with Zenity and qrencode, ask where to save and the name of the image, after that ask a text to be put in the qr code (thanks to ubuntuforum)
#!/bin/bash
 
me=`whoami`
outpath=`zenity --entry --title="Save path?" --text="What folder would you like to save the QR image to? Default of /home/$me/Pictures will be used if one is not entered."`
button0=$?
if [ $button0 -eq 0 ];then
if [ -z $outpath ];then
outpath=/home/`whoami`/Pictures
fi
pname=`zenity --entry --title="What filename?" --text="What name should be used for the output? ex: filename > filename.png"`
button1=$?
if [ $button1 -eq 0 ];then
if [ -z $pname ];then
zenity --info --title="Failure" --text="You failed to enter a filename. Exiting."
else
content=`zenity --entry --title="Content --" --text="What do you want your QR code to say?"`
button2=$?
if [ $button2 -eq 0 ];then
if [ -z $content ];then
zenity --info --title="Failure" --text="You failed to enter any content. Exiting."
else
qrencode -o "$outpath"/"$pname".png "$content"
zenity --info --title="Finished --" --text="Your QR code is located at : $outpath/$pname.png"
fi
else
zenity --info --title="Canceled" --text="QR code generation canceled - filename"
fi
else
zenity --info --title="Canceled" --text="QR code generation canceled - file path"
fi
How to use these images
Ok you now can create these nice QR Code, but what to do with them ?
Here are some ideas but i’m sure there are much more ways to use them.
1) Backup on paper.
With QR Code you could create image of important things, like your SSL Certificates keys, or Revocation Certificates or
anything not too big, transform it in a QR Code and print it.
After that put it in your security safe or in your Disaster Recovery site.
If something bad happen on your data center you’ll have something to start work with, paper takes up little space and lasts virtually forever
2) Move information to your smartphone
You have on your computer some informations and you want to move them quickly to your smartphone.. it’s easy, qrencode it !
Read the image with the QR Code reader of your smartphone and you’ll have immediately a long url, a text file or anything available on it.
If you want to do some test and don’t have a reader, you can use this online site that offer this service http://zxing.org/w/decode.jspx
Or you can use Zbar , ZBar is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. So you can use your Webcam to read the QR Code you produce, or the one that people send to you.
I hope you have liked this introduction to QR Code on Linux and for some “innovative” uses of QR Code check also this link

الحملة الحلزونية للتخويف من السلفية



Sunday, April 3, 2011

How To Set Up Kippo SSH Honeypot On CentOS 5.5


Kippo is a medium interaction SSH honeypot designed to log brute force attacks and, most importantly, the entire shell interaction performed by the attacker. Kippo is inspired, but not based on Kojoney. If you need more information about Kippo please visit its official site on http://code.google.com/p/kippo/. This tutorial shows how you can compile and install Kippo on a CentOS 5.5 server.
I do not issue any guarantee that this will work for you!

Python 2.6 Installation

As you already know, CentOS only comes with Python 2.4, so you need to install Python 2.6 by using the tutorial from the following link:
http://www.geekymedia.com/tech-articles/rhel5-centos5-rpms-for-python-2-5-and-2-6/.
Important Notes!:
1) Just install the RPMs for the version that you want. You will need at least the base python version package and the libs package.
2) To start Python 2.6, type python26 at your command line rather than python. (Your original Python 2.4 is still installed.)
3) If you are installing packages with setuptools, make sure to use the correct python version. (i.e. python26 setup.py install)

Twisted, Zope Interface And Pycrypto Installation

Twisted is an event-driven networking engine written in Python and licensed under the MIT license. Twisted projects variously support TCP, UDP, SSL/TLS, multicast, Unix sockets, a large number of protocols (including HTTP, NNTP, IMAP, SSH, IRC, FTP, and others), and much more.
cd /tmp
wget http://twistedmatrix.com/Releases/Twisted/10.2/Twisted-10.2.0.tar.bz2
tar -xvf Twisted-10.2.0.tar.bz2
cd Twisted-10.2.0
python26 setup.py build
python26 setup.py install
Zope is an open source web application server primarily written in the Python programming language.
cd /tmp
wget http://www.zope.org/Products/ZopeInterface/3.3.0/zope.interface-3.3.0.tar.gz
tar -xvf zope.interface-3.3.0.tar.gz
cd zope.interface-3.3.0
python26 setup.py build
python26 setup.py install
Pycrypto is a collection of cryptographic algorithms and protocols, implemented for use from Python.
cd /tmp
wget wget http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz
tar -xvf pycrypto-2.0.1.tar.gz
cd pycrypto-2.0.1
python26 setup.py build
python26 setup.py install
ASN.1 types and codecs (BER, CER, DER) implementation in Python programming language.
cd /tmp
wget http://sourceforge.net/projects/pyasn1/files/pyasn1-devel/0.0.12a/pyasn1-0.0.12a.tar.gz/download
tar -xvf pyasn1-0.0.12a.tar.gz
cd pyasn1-0.0.12a
python26 setup.py build
python26 setup.py install

Create Regular User

Kippo doesnt run under root user! So we must create a regular user.
useradd kippouser

Download Kippo Source Package

You need to download latest version of Kippo source package from http://kippo.googlecode.com.
su - kippouser
wget http://kippo.googlecode.com/files/kippo-0.5.tar.gz
tar -xvf kippo-0.5.tar.gz
cd kippo-0.5

Configure Kippo

vi kippo.cfg
#
# Kippo configuration file (kippo.cfg)
#
[honeypot]
# IP addresses to listen for incoming SSH connections.
#
# (default: 0.0.0.0) = any address
#ssh_addr = 0.0.0.0
# Port to listen for incoming SSH connections.
#
# (default: 2222)
ssh_port = 2222
# Hostname for the honeypot. Displayed by the shell prompt of the virtual
# environment.
#
# (default: sales)
hostname = sales
# Directory where to save log files in.
#
# (default: log)
log_path = log
# Directory where to save downloaded (malware) files in.
#
# (default: dl)
download_path = dl
# Directory where virtual file contents are kept in.
#
# This is only used by commands like 'cat' to display the contents of files.
# Adding files here is not enough for them to appear in the honeypot - the
# actual virtual filesystem is kept in filesystem_file (see below)
#
# (default: honeyfs)
contents_path = honeyfs
# File in the python pickle format containing the virtual filesystem.
#
# This includes the filenames, paths, permissions for the whole filesystem,
# but not the file contents. This is created by the createfs.py utility from
# a real template linux installation.
#
# (default: fs.pickle)
filesystem_file = fs.pickle
# Directory for miscellaneous data files, such as the password database.
#
# (default: data_path)
data_path = data
# Directory for creating simple commands that only output text.
#
# The command must be placed under this directory with the proper path, such
# as:
# txtcmds/usr/bin/vi
# The contents of the file will be the output of the command when run inside
# the honeypot.
#
# In addition to this, the file must exist in the virtual
# filesystem {filesystem_file}
#
# (default: txtcmds)
txtcmds_path = txtcmds
# Public and private SSH key files. If these don't exist, they are created
# automatically.
#
# (defaults: public.key and private.key)
public_key = public.key
private_key = private.key
# Initial root password. Future passwords will be stored in
# {data_path}/pass.db
#
# (default: 123456)
password = 123456
# IP address to bind to when opening outgoing connections. Used exclusively by
# the wget command.
#
# (default: not specified)
#out_addr = 0.0.0.0
# Sensor name use to identify this honeypot instance. Used by the database
# logging modules such as mysql.
#
# If not specified, the logging modules will instead use the IP address of the
# connection as the sensor name.
#
# (default: not specified)
#sensor_name=myhostname
# Fake address displayed as the address of the incoming connection.
# This doesn't affect logging, and is only used by honeypot commands such as
# 'w' and 'last'
#
# If not specified, the actual IP address is displayed instead (default
# behaviour).
#
# (default: not specified)
#fake_addr = 192.168.66.254
# MySQL logging module
#
# Database structure for this module is supplied in doc/sql/mysql.sql
#
# To enable this module, remove the comments below, including the
# [database_mysql] line.
#[database_mysql]
#host = localhost
#database = kippo
#username = kippo
#password = secret

Start Kippo

./start.sh

Log File

By default kippo output will be redirected to the file log/kippo.log. To see the Kippo logging data use the following command:
tail -f log/kippo.log

Note: How To Make Kippo Accessible To The World!

By default,Kippo is running on port 2222. If its running on Windows, port 22 is usually free and it's ok to run kippo on that port. On linux, port 22 is restricted for root only, except if you do this (quote from #twisted):
iptables -t nat -A PREROUTING -i IN_IFACE -p tcp --dport 22 -j REDIRECT --to-port 2222
Replace IN_IFACE with your real interface name such as eth0!
 

Testing

Connect to the Kippo server on port 2222 by using root as username and 123456 as password.
ssh 127.0.0.1 -p 2222 -l root
You must see the following banner after successful login:
sales:~#

Links

The Honeynet Project: http://www.honeynet.org/
Honeypot: http://en.wikipedia.org/wiki/Honeypot_(computing)
Kippo Project: http://kippo.googlecode.com/
Iran Honeynet Project: http://www.honeynet.ir/
CentOS: http://www.centos.org/

Paravirtualization With Xen 4.0 On Debian Squeeze (AMD64)


This tutorial provides step-by-step instructions on how to install Xen 4.0 on a Debian Squeeze (6.0) system (AMD64) and create paravirtualized guests (don't mix this up with fully virtualized guests, i.e. hardware virtualization (HVM)).
Xen lets you create guest operating systems (*nix operating systems like Linux and FreeBSD), so called "virtual machines" or domUs, under a host operating system (dom0). Using Xen you can separate your applications into different virtual machines that are totally independent from each other (e.g. a virtual machine for a mail server, a virtual machine for a high-traffic web site, another virtual machine that serves your customers' web sites, a virtual machine for DNS, etc.), but still use the same hardware. This saves money, and what is even more important, it's more secure. If the virtual machine of your DNS server gets hacked, it has no effect on your other virtual machines. Plus, you can move virtual machines from one Xen server to the next one.
I do not issue any guarantee that this will work for you!

1 Preliminary Note

I'm using a Debian Squeeze system (x86_64) with the hostname server1.example.com and the IP address 192.168.0.100 as the host system (dom0). (The setup might differ slightly if you are on an i386 system.) I will use Debian Squeeze for the virtual machines (domU) as well (but also show the changes you need if you want to install an Ubuntu Maverick guest).
This guide will explain how to set up image-based virtual machines and also LVM-based virtual machines.

2 Installing Xen

To install Xen, we simply run
apt-get install xen-hypervisor xen-linux-system xen-utils xenstore-utils xenwatch xen-tools
Afterwards we open /etc/modules and make sure that we have the line loop max_loop=64 in it (this step is needed only if you want to create image-based virtual machines - you can skip it if you want to create LVM-based virtual machines):
vi /etc/modules
[...]
loop max_loop=64
Next we open /etc/xen/xend-config.sxp...
vi /etc/xen/xend-config.sxp
... and uncomment/add the line (network-script 'network-bridge antispoof=yes') and comment out all other (network-script ...) lines (antispoof=yes enables the Xen firewall which prevents that a VM can use an IP address that it is not allowed to use, like, for example, your gateway IP). Also make sure that the line (vif-script vif-bridge) is enabled:
[...]
(network-script 'network-bridge antispoof=yes')
[...]
(vif-script vif-bridge)
[...]
Then reboot the system:
reboot
Run
uname -r
and your new Xen kernel should show up:
root@server1:~# uname -r
2.6.32-5-xen-amd64
root@server1:~#
Now run
xm dmesg
If you get output like this...
root@server1:~# xm dmesg
WARNING! Can't find hypervisor information in sysfs!
Error: Unable to connect to xend: No such file or directory. Is xend running?
root@server1:~#
... this means you are just running on a Xen-ready kernel, but not the Xen hypervisor itself (which means you will not be able to boot virtual machines). To change this, change the boot order of your kernels as follows and update the GRUB bootloader:
mv /etc/grub.d/10_linux /etc/grub.d/50_linux
update-grub2
This makes sure that the next time you boot, the Xen hypervisor gets loaded.
Reboot again:
reboot
Afterwards,
xm dmesg
should show you that the hypervisor is running:
root@server1:~# xm dmesg
(XEN) Xen version 4.0.1 (Debian 4.0.1-2) (waldi@debian.org) (gcc version 4.4.5 (Debian 4.4.5-10) ) Wed Jan 12 14:04:06 UTC 2011
(XEN) Bootloader: GRUB 1.98+20100804-14
(XEN) Command line: placeholder
(XEN) Video information:
(XEN)  VGA is text mode 80x25, font 8x16
(XEN)  VBE/DDC methods: V2; EDID transfer time: 1 seconds
(XEN) Disc information:
(XEN)  Found 1 MBR signatures
(XEN)  Found 1 EDD information structures
(XEN) Xen-e820 RAM map:
(XEN)  0000000000000000 - 000000000009f000 (usable)
(XEN)  000000000009f000 - 00000000000a0000 (reserved)
(XEN)  00000000000e0000 - 0000000000100000 (reserved)
(XEN)  0000000000100000 - 00000000affa0000 (usable)
(XEN)  00000000affa0000 - 00000000affae000 (ACPI data)
(XEN)  00000000affae000 - 00000000afff0000 (ACPI NVS)
(XEN)  00000000afff0000 - 00000000b0000000 (reserved)
(XEN)  00000000fec00000 - 00000000fec01000 (reserved)
(XEN)  00000000fee00000 - 00000000fef00000 (reserved)
(XEN)  00000000ff700000 - 0000000100000000 (reserved)
(XEN)  0000000100000000 - 0000000140000000 (usable)
(XEN) ACPI: RSDP 000FA310, 0014 (r0 ACPIAM)
(XEN) ACPI: RSDT AFFA0000, 0044 (r1 052608 RSDT1415 20080526 MSFT       97)
(XEN) ACPI: FACP AFFA0200, 0084 (r1 052608 FACP1415 20080526 MSFT       97)
(XEN) ACPI: DSDT AFFA0450, 960C (r1  1AAAA 1AAAA000        0 INTL 20051117)
(XEN) ACPI: FACS AFFAE000, 0040
(XEN) ACPI: APIC AFFA0390, 0080 (r1 052608 APIC1415 20080526 MSFT       97)
(XEN) ACPI: MCFG AFFA0410, 003C (r1 052608 OEMMCFG  20080526 MSFT       97)
(XEN) ACPI: OEMB AFFAE040, 0073 (r1 052608 OEMB1415 20080526 MSFT       97)
(XEN) ACPI: HPET AFFA9A60, 0038 (r1 052608 OEMHPET0 20080526 MSFT       97)
(XEN) ACPI: INFO AFFAE0C0, 0124 (r1 052608 AMDINFO  20080526 MSFT       97)
(XEN) ACPI: NVHD AFFAE1F0, 0284 (r1 052608  NVHDCP  20080526 MSFT       97)
(XEN) ACPI: SSDT AFFA9AA0, 028A (r1 A M I  POWERNOW        1 AMD         1)
(XEN) System RAM: 3839MB (3931388kB)
(XEN) Domain heap initialised
(XEN) Processor #0 15:11 APIC version 16
(XEN) Processor #1 15:11 APIC version 16
(XEN) IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23
(XEN) Enabling APIC mode:  Flat.  Using 1 I/O APICs
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Detected 2600.088 MHz processor.
(XEN) Initing memory sharing.
(XEN) HVM: ASIDs enabled.
(XEN) HVM: SVM enabled
(XEN) AMD-Vi: IOMMU not found!
(XEN) I/O virtualisation disabled
(XEN) AMD: Disabling C1 Clock Ramping Node #0
(XEN) Total of 2 processors activated.
(XEN) ENABLING IO-APIC IRQs
(XEN)  -> Using new ACK method
(XEN) checking TSC synchronization across 2 CPUs:
(XEN) CPU#0 had -2 usecs TSC skew, fixed it up.
(XEN) CPU#1 had 2 usecs TSC skew, fixed it up.
(XEN) Platform timer is 25.000MHz HPET
(XEN) Allocated console ring of 16 KiB.
(XEN) Brought up 2 CPUs
(XEN) *** LOADING DOMAIN 0 ***
(XEN)  Xen  kernel: 64-bit, lsb, compat32
(XEN)  Dom0 kernel: 64-bit, PAE, lsb, paddr 0x1000000 -> 0x16ba000
(XEN) PHYSICAL MEMORY ARRANGEMENT:
(XEN)  Dom0 alloc.:   0000000138000000->000000013c000000 (921455 pages to be allocated)
(XEN) VIRTUAL MEMORY ARRANGEMENT:
(XEN)  Loaded kernel: ffffffff81000000->ffffffff816ba000
(XEN)  Init. ramdisk: ffffffff816ba000->ffffffff8323b600
(XEN)  Phys-Mach map: ffffffff8323c000->ffffffff83963b78
(XEN)  Start info:    ffffffff83964000->ffffffff839644b4
(XEN)  Page tables:   ffffffff83965000->ffffffff83986000
(XEN)  Boot stack:    ffffffff83986000->ffffffff83987000
(XEN)  TOTAL:         ffffffff80000000->ffffffff83c00000
(XEN)  ENTRY ADDRESS: ffffffff81509200
(XEN) Dom0 has maximum 2 VCPUs
(XEN) Scrubbing Free RAM: .done.
(XEN) Xen trace buffers: disabled
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) Xen is relinquishing VGA console.
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 176kB init memory.
(XEN) MCE: MSR 417 is not MCA MSR
(XEN) MCE: MSR 417 is not MCA MSR
root@server1:~#

3 Creating Image-Based Virtual Machines

We will use xen-tools to create virtual machines. xen-tools make it very easy to create virtual machines - please read this tutorial to learn more: http://www.howtoforge.com/xen_tools_xen_shell_argo. We've already installed xen-tools in the previous step (chapter 2).
Now we edit /etc/xen-tools/xen-tools.conf. This file contains the default values that are used by the xen-create-image script unless you specify other values on the command line. I changed the following values and left the rest untouched:
vi /etc/xen-tools/xen-tools.conf
[...]
dir = /home/xen
[...]
# lvm = vg0
[...]
dist = `xt-guess-suite-and-mirror --suite` # Default distribution to install.
[...]
gateway = 192.168.0.1
netmask = 255.255.255.0
broadcast = 192.168.0.255
[...]
passwd = 1
[...]
kernel = /boot/vmlinuz-`uname -r`
initrd = /boot/initrd.img-`uname -r`
[...]
mirror = `xt-guess-suite-and-mirror --mirror`
[...]
serial_device = hvc0 #default
[...]
disk_device = xvda #default
[...]
The dir line specifies where the virtual machine images will be stored. Make sure that at the same time, lvm is commented out (these settings are mutually exclusive!).
dist specifies the distribution to be installed in the virtual machines (if you run the command
xt-guess-suite-and-mirror --suite
on the command line, you will see that it translates to squeeze, so in this case Debian Squeeze would be installed unless you specify anything else on the command line).
To find out which distributions you can install in a virtual machine, run:
gunzip /usr/share/doc/xen-tools/README.gz
cat /usr/share/doc/xen-tools/README
The passwd = 1 line makes that you can specify a root password when you create a new guest domain.
The kernel and initrd lines specify the kernel and ramdisk that get installed in a virtual machine. If you want to install Debian Squeeze, please use the settings as shown above (otherwise the Debian Squeeze guest might not boot). If you want to install Ubuntu Maverick, for example, you can use the same settings, or you comment out both lines, in which case the default Ubuntu kernel would be used (yes, Xen 4.0 allows you to use non-Xen kernels in a guest!).
Make sure you specify a gateway, netmask, and broadcast address. If you don't, and you don't specify a gateway and netmask on the command line when using xen-create-image, your guest domains won't have networking even if you specified an IP address!
The mirror line specifies the mirror to use (the command
xt-guess-suite-and-mirror --mirror
translates to a Debian mirror by default. Of course, you can specify another mirror, e.g. as follows:
mirror = http://ftp.de.debian.org/debian/
or
mirror = http://archive.ubuntu.com/ubuntu (for Ubuntu; in this case make sure that you specify an Ubuntu version in the dist line, e.g. dist = maverick)
)
It is very important that you add the line serial_device = hvc0 because otherwise your virtual machines might not boot properly!
disk_device = xvda makes that the virtualized disks are named xvda1, xvda2, etc. This is the correct setting for a Debian Squeeze guest; Ubuntu guests, especially when using a non-Xen kernel, might not boot with this setting, but you can override it with the --scsi switch that you pass to the xen-create-image command - in this case the virtualized disks will be named sda1, sda2, etc.
To summarize, the above settings are perfect for Debian Squeeze guests; if you want to install Ubuntu Maverick instead, you will have to override some of the settings in /etc/xen-tools/xen-tools.conf (--dist, --mirror, --scsi switches; maybe also comment out kernel and initrd) - I'll come to that in a moment.
Before we go on, we must create the directory where the virtual machine images should be stored:
mkdir /home/xen
Now let's create our first guest domain, xen1.example.com, with the IP address 192.168.0.101:
xen-create-image --hostname=xen1.example.com --size=4Gb --swap=256Mb --ip=192.168.0.101 --memory=256Mb --arch=amd64 --role=udev
Options that you specify on the command line override the settings in /etc/xen-tools/xen-tools.conf. Options that are not specified on the command line are taken from /etc/xen-tools/xen-tools.conf. Please make sure that you add --role=udev, or your virtual machine might not boot properly!
(To learn more about the available options, take a look at the xen-create-image man page:
man xen-create-image
)
The xen-create-image command will now create the xen1.example.com virtual machine for us. This can take a few minutes. The output should be similar to this one:
root@server1:~# xen-create-image --hostname=xen1.example.com --size=4Gb --swap=256Mb --ip=192.168.0.101 --memory=256Mb --arch=amd64 --role=udev

General Information
--------------------
Hostname       :  xen1.example.com
Distribution   :  squeeze
Mirror         :  http://ftp.de.debian.org/debian/
Partitions     :  swap            256Mb (swap)
                  /               4Gb   (ext3)
Image type     :  sparse
Memory size    :  256Mb
Kernel path    :  /boot/vmlinuz-2.6.32-5-xen-amd64
Initrd path    :  /boot/initrd.img-2.6.32-5-xen-amd64

Networking Information
----------------------
IP Address 1   : 192.168.0.101 [MAC: 00:16:3E:E8:61:97]
Netmask        : 255.255.255.0
Broadcast      : 192.168.0.255
Gateway        : 192.168.0.1


Creating partition image: /home/xen/domains/xen1.example.com/swap.img
Done

Creating swap on /home/xen/domains/xen1.example.com/swap.img
Done

Creating partition image: /home/xen/domains/xen1.example.com/disk.img
Done

Creating ext3 filesystem on /home/xen/domains/xen1.example.com/disk.img
Done
Installation method: debootstrap
Done

Running hooks
Done

Role: udev
        File: /etc/xen-tools/role.d/udev
Role script completed.

Creating Xen configuration file
Done
Setting up root password
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
All done


Logfile produced at:
         /var/log/xen-tools/xen1.example.com.log

Installation Summary
---------------------
Hostname        :  xen1.example.com
Distribution    :  squeeze
IP-Address(es)  :  192.168.0.101
RSA Fingerprint :  81:d1:7a:44:3b:07:41:3a:0f:46:d5:d5:30:bc:26:43
Root Password   :  N/A

root@server1:~#
For an Ubuntu Maverick guest, you should use this command instead:
xen-create-image --hostname=xen1.example.com --size=4Gb --swap=256Mb --ip=192.168.0.101 --memory=256Mb --arch=amd64 --role=udev --scsi --dist maverick --mirror=http://archive.ubuntu.com/ubuntu
(To use the default Ubuntu kernel instead of Debian's Xen kernel in the guest, you can also comment out the kernel and initrd lines in /etc/xen-tools/xen-tools.conf.)
There should now be a xen1.example.com configuration file - /etc/xen/xen1.example.com.cfg. Take a look at it to become familiar with virtual machines configuration files:
cat /etc/xen/xen1.example.com.cfg
#
# Configuration file for the Xen instance xen1.example.com, created
# by xen-tools 4.2 on Fri Mar 25 15:56:51 2011.
#

#
# Kernel + memory size
#
kernel = '/boot/vmlinuz-2.6.32-5-xen-amd64'
ramdisk = '/boot/initrd.img-2.6.32-5-xen-amd64'

vcpus = '1'
memory = '256'

#
# Disk device(s).
#
root = '/dev/xvda2 ro'
disk = [
'file:/home/xen/domains/xen1.example.com/disk.img,xvda2,w',
'file:/home/xen/domains/xen1.example.com/swap.img,xvda1,w',
]


#
# Physical volumes
#


#
# Hostname
#
name = 'xen1.example.com'

#
# Networking
#
vif = [ 'ip=192.168.0.101,mac=00:16:3E:E8:61:97' ]

#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
(Please note: if you have a dual-core or quad-core CPU and want the virtual machine to use all CPU cores, please change the vcpus line to vcpus = '2' or vcpus = '4'.)
To start the virtual machine, run
xm create /etc/xen/xen1.example.com.cfg
root@server1:~# xm create /etc/xen/xen1.example.com.cfg
Using config file "/etc/xen/xen1.example.com.cfg".
Started domain xen1.example.com (id=1)
root@server1:~#
Run
xm console xen1.example.com
to log in on that virtual machine (type CTRL+] if you are at the console, or CTRL+5 if you're using PuTTY to go back to dom0), or use an SSH client to connect to it (192.168.0.101).
To get a list of running virtual machines, type
xm list
The output should look like this:
root@server1:~# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  2811     2     r-----    137.2
xen1.example.com                             1   256     1     -b----      1.7
root@server1:~#
To shut down xen1.example.com, do this:
xm shutdown xen1.example.com
If you want xen1.example.com to start automatically at the next boot of the system, then do this:
mkdir /etc/xen/auto
ln -s /etc/xen/xen1.example.com.cfg /etc/xen/auto
Here are the most important Xen commands:
xm create -c /path/to/config - Start a virtual machine.
xm shutdown - Stop a virtual machine.
xm destroy - Stop a virtual machine immediately without shutting it down. It's as if you switch off the power button.
xm list - List all running systems.
xm console - Log in on a virtual machine.
xm help - List of all commands.
A list of all virtual machines that were created with the xen-create-image command is available under
xen-list-images
root@server1:~# xen-list-images
Name: xen1.example.com
Memory: 256
IP: 192.168.0.101
root@server1:~#
To learn more about what you can do with xen-tools, take a look at this tutorial: http://www.howtoforge.com/xen_tools_xen_shell_argo


4 Creating LVM-Based Virtual Machines

 
This chapter explains how you can set up LVM-based virtual machines instead of virtual machines that use disk images. Virtual machines that use disk images are very slow and heavy on disk IO.
In this example I'm using a Debian Squeeze host with the LVM volume group /dev/vg0 that has about 500GB of space. /dev/vg0 contains two logical volumes, /dev/vg0/root and /dev/vg0/swap_1 that consume about 100GB of space - the rest is not allocated and can be used to create logical volumes for our virtual machines:
vgdisplay
root@server1:~# vgdisplay
  --- Volume group ---
  VG Name               vg0
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               465.29 GiB
  PE Size               4.00 MiB
  Total PE              119115
  Alloc PE / Size       24794 / 96.85 GiB
  Free  PE / Size       94321 / 368.44 GiB
  VG UUID               YZruwf-nqxs-H47I-0WUE-RDJ7-SmEP-XU1RbH

root@server1:~#
lvdisplay
root@server1:~# lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg0/root
  VG Name                vg0
  LV UUID                0dXvE5-gjHP-0q7c-qpq6-veOx-faSg-p11vUp
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                93.13 GiB
  Current LE             23841
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

  --- Logical volume ---
  LV Name                /dev/vg0/swap_1
  VG Name                vg0
  LV UUID                FqnT46-fLHS-NLqC-XGOR-fNPe-NYyT-TEw8bR
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                3.72 GiB
  Current LE             953
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1

root@server1:~#
We will use xen-tools to create virtual machines. xen-tools make it very easy to create virtual machines - please read this tutorial to learn more: http://www.howtoforge.com/xen_tools_xen_shell_argo. We've already installed xen-tools in chapter 2.
Next we edit /etc/xen-tools/xen-tools.conf. This file contains the default values that are used by the xen-create-image script unless you specify other values on the command line. I changed the following values and left the rest untouched:
vi /etc/xen-tools/xen-tools.conf
[...]
# dir = /home/xen
[...]
lvm = vg0
[...]
dist = `xt-guess-suite-and-mirror --suite` # Default distribution to install.
[...]
gateway = 192.168.0.1
netmask = 255.255.255.0
broadcast = 192.168.0.255
[...]
passwd = 1
[...]
kernel = /boot/vmlinuz-`uname -r`
initrd = /boot/initrd.img-`uname -r`
[...]
mirror = `xt-guess-suite-and-mirror --mirror`
[...]
serial_device = hvc0 #default
[...]
disk_device = xvda #default
[...]
Make sure that you uncomment the lvm line and fill in the name of your volume group (vg0 in my case). At the same time make sure that the dir line is commented out (these settings are mutually exclusive)!
dist specifies the distribution to be installed in the virtual machines (if you run the command
xt-guess-suite-and-mirror --suite
on the command line, you will see that it translates to squeeze, so in this case Debian Squeeze would be installed unless you specify anything else on the command line).
To find out which distributions you can install in a virtual machine, run:
gunzip /usr/share/doc/xen-tools/README.gz
cat /usr/share/doc/xen-tools/README
The passwd = 1 line makes that you can specify a root password when you create a new guest domain.
The kernel and initrd lines specify the kernel and ramdisk that get installed in a virtual machine. If you want to install Debian Squeeze, please use the settings as shown above (otherwise the Debian Squeeze guest might not boot). If you want to install Ubuntu Maverick, for example, you can use the same settings, or you comment out both lines, in which case the default Ubuntu kernel would be used (yes, Xen 4.0 allows you to use non-Xen kernels in a guest!).
Make sure you specify a gateway, netmask, and broadcast address. If you don't, and you don't specify a gateway and netmask on the command line when using xen-create-image, your guest domains won't have networking even if you specified an IP address!
The mirror line specifies the mirror to use (the command
xt-guess-suite-and-mirror --mirror
translates to a Debian mirror by default. Of course, you can specify another mirror, e.g. as follows:
mirror = http://ftp.de.debian.org/debian/
or
mirror = http://archive.ubuntu.com/ubuntu (for Ubuntu; in this case make sure that you specify an Ubuntu version in the dist line, e.g. dist = maverick)
)
It is very important that you add the line serial_device = hvc0 because otherwise your virtual machines might not boot properly!
disk_device = xvda makes that the virtualized disks are named xvda1, xvda2, etc. This is the correct setting for a Debian Squeeze guest; Ubuntu guests, especially when using a non-Xen kernel, might not boot with this setting, but you can override it with the --scsi switch that you pass to the xen-create-image command - in this case the virtualized disks will be named sda1, sda2, etc.
To summarize, the above settings are perfect for Debian Squeeze guests; if you want to install Ubuntu Maverick instead, you will have to override some of the settings in /etc/xen-tools/xen-tools.conf (--dist, --mirror, --scsi switches; maybe also comment out kernel and initrd) - I'll come to that in a moment.
Now let's create our first guest domain, xen1.example.com, with the IP address 192.168.0.101:
xen-create-image --hostname=xen1.example.com --size=4Gb --swap=256Mb --ip=192.168.0.101 --memory=256Mb --arch=amd64 --role=udev
Options that you specify on the command line override the settings in /etc/xen-tools/xen-tools.conf. Options that are not specified on the command line are taken from /etc/xen-tools/xen-tools.conf. Please make sure that you add --role=udev, or your virtual machine might not boot properly!
(To learn more about the available options, take a look at the xen-create-image man page:
man xen-create-image
)
The xen-create-image command will now create the xen1.example.com virtual machine for us. This can take a few minutes. The output should be similar to this one:
root@server1:~# xen-create-image --hostname=xen1.example.com --size=4Gb --swap=256Mb --ip=192.168.0.101 --memory=256Mb --arch=amd64 --role=udev

General Information
--------------------
Hostname       :  xen1.example.com
Distribution   :  squeeze
Mirror         :  http://ftp.de.debian.org/debian/
Partitions     :  swap            256Mb (swap)
                  /               4Gb   (ext3)
Image type     :  full
Memory size    :  256Mb
Kernel path    :  /boot/vmlinuz-2.6.32-5-xen-amd64
Initrd path    :  /boot/initrd.img-2.6.32-5-xen-amd64

Networking Information
----------------------
IP Address 1   : 192.168.0.101 [MAC: 00:16:3E:E8:61:97]
Netmask        : 255.255.255.0
Broadcast      : 192.168.0.255
Gateway        : 192.168.0.1


Creating swap on /dev/vg0/xen1.example.com-swap
Done

Creating ext3 filesystem on /dev/vg0/xen1.example.com-disk
Done
Installation method: debootstrap
Done

Running hooks
Done

Role: udev
        File: /etc/xen-tools/role.d/udev
Role script completed.

Creating Xen configuration file
Done
Setting up root password
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
All done


Logfile produced at:
         /var/log/xen-tools/xen1.example.com.log

Installation Summary
---------------------
Hostname        :  xen1.example.com
Distribution    :  squeeze
IP-Address(es)  :  192.168.0.101
RSA Fingerprint :  6b:88:61:9a:ea:8a:7b:0d:24:34:ae:ee:2e:75:d6:53
Root Password   :  N/A

root@server1:~#
For an Ubuntu Maverick guest, you should use this command instead:
xen-create-image --hostname=xen1.example.com --size=4Gb --swap=256Mb --ip=192.168.0.101 --memory=256Mb --arch=amd64 --role=udev --scsi --dist maverick --mirror=http://archive.ubuntu.com/ubuntu
(To use the default Ubuntu kernel instead of Debian's Xen kernel in the guest, you can also comment out the kernel and initrd lines in /etc/xen-tools/xen-tools.conf.)
As you see from the output, xen-create-image has created a new logical volume for our VM in the vg0 volume group, /dev/vg0/xen1.example.com-disk, for the VM's root filesystem. Take a look at
lvdisplay
and you will see that it has also created a second logical volume, /dev/vg0/xen1.example.com-swap, for the VM's swap:
root@server1:~# lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg0/root
  VG Name                vg0
  LV UUID                0dXvE5-gjHP-0q7c-qpq6-veOx-faSg-p11vUp
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                93.13 GiB
  Current LE             23841
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

  --- Logical volume ---
  LV Name                /dev/vg0/swap_1
  VG Name                vg0
  LV UUID                FqnT46-fLHS-NLqC-XGOR-fNPe-NYyT-TEw8bR
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                3.72 GiB
  Current LE             953
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1

  --- Logical volume ---
  LV Name                /dev/vg0/xen1.example.com-swap
  VG Name                vg0
  LV UUID                TIc1fp-Lfkm-Ulm9-ElaP-zM4F-LEjc-cVw2Jk
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                256.00 MiB
  Current LE             64
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:2

  --- Logical volume ---
  LV Name                /dev/vg0/xen1.example.com-disk
  VG Name                vg0
  LV UUID                ocZI2U-drBa-1iCC-DMy1-toWk-5hex-utJ4FA
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                4.00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:3

root@server1:~#
There should now be a xen1.example.com configuration file - /etc/xen/xen1.example.com.cfg. The disk line contains physical devices (the two logical volumes created by xen-create-image) instead of disk images:
cat /etc/xen/xen1.example.com.cfg
#
# Configuration file for the Xen instance xen1.example.com, created
# by xen-tools 4.2 on Fri Mar 25 16:56:49 2011.
#

#
# Kernel + memory size
#
kernel = '/boot/vmlinuz-2.6.32-5-xen-amd64'
ramdisk = '/boot/initrd.img-2.6.32-5-xen-amd64'

vcpus = '1'
memory = '256'

#
# Disk device(s).
#
root = '/dev/xvda2 ro'
disk = [
'phy:/dev/vg0/xen1.example.com-disk,xvda2,w',
'phy:/dev/vg0/xen1.example.com-swap,xvda1,w',
]


#
# Physical volumes
#


#
# Hostname
#
name = 'xen1.example.com'

#
# Networking
#
vif = [ 'ip=192.168.0.101,mac=00:16:3E:E8:61:97' ]

#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
(If we had used disk images instead of logical volumes, the disk part would look similar to this one:
disk        = [
                  'file:/home/xen/domains/xen1.example.com/disk.img,xvda2,w',
                  'file:/home/xen/domains/xen1.example.com/swap.img,xvda1,w',
              ]
)
(Please note: if you have a dual-core or quad-core CPU and want the virtual machine to use all CPU cores, please change the vcpus line to vcpus = '2' or vcpus = '4'.)
To start the virtual machine, run
xm create /etc/xen/xen1.example.com.cfg
root@server1:~# xm create /etc/xen/xen1.example.com.cfg
Using config file "/etc/xen/xen1.example.com.cfg".
Started domain xen1.example.com (id=1)
root@server1:~#
Run
xm console xen1.example.com
to log in on that virtual machine (type CTRL+] if you are at the console, or CTRL+5 if you're using PuTTY to go back to dom0), or use an SSH client to connect to it (192.168.0.101).
To get a list of running virtual machines, type
xm list
The output should look like this:
root@server1:~# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  2811     2     r-----    136.1
xen1.example.com                             2   256     1     -b----      1.7
root@server1:~#
To shut down xen1.example.com, do this:
xm shutdown xen1.example.com
If you want xen1.example.com to start automatically at the next boot of the system, then do this:
mkdir /etc/xen/auto
ln -s /etc/xen/xen1.example.com.cfg /etc/xen/auto
Here are the most important Xen commands:
xm create -c /path/to/config - Start a virtual machine.
xm shutdown - Stop a virtual machine.
xm destroy - Stop a virtual machine immediately without shutting it down. It's as if you switch off the power button.
xm list - List all running systems.
xm console - Log in on a virtual machine.
xm help - List of all commands.
A list of all virtual machines that were created with the xen-create-image command is available under
xen-list-images
root@server1:~# xen-list-images
Name: xen1.example.com
Memory: 256
IP: 192.168.0.101
root@server1:~#
To learn more about what you can do with xen-tools, take a look at this tutorial: http://www.howtoforge.com/xen_tools_xen_shell_argo

5 Links