UNIT IV

PART – B

  1. What is MDA?

Model-driven architecture (MDA) is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as models. Model-driven architecture is a kind of domain engineering, and supports model-driven engineering of software systems. It was launched by the Object Management Group (OMG) it allow us to solve integration problems.

  1. What is Apache webserver?

Apache is generally recognized as the world's most popular Web server (HTTP server). Originally designed for Unix servers, the Apache Web server has been ported to Windows and other network operating systems (NOS). The name "Apache" derives from the word "patchy" that the Apache developers used to describe early versions of their software

  1. What is use of Apache webserver ?

Apache is primarly used to serve both static content and dynamic web pages on the world wide web.Many applications are designed expecting the environment and feaures that Apache provides. Apache is the web server component of the popular LAMP web server application stack,alongside Linux, MYSQL, and the PHP/Perl/Python programming languages

Apache Web server provides a full range of Web server features, including CGI, SSL, and virtual domains. Apache also supports plug-in modules for extensibility. Apache is reliable, free, and relatively easy to configure.

  1. What are the steps involved in installing Apache webserver ?

Download Apache 2.2 from website

Extract the Apache Files

Once you've downloaded the files you need to uncompress them:

gunzip -d httpd-2_0_NN.tar.gz
tar xvf httpd-2_0_NN.tar

Configuring Your Server for Apache

./configure

Build Apache

make
make install

Customize Apache

vi PREFIX/conf/httpd.conf

  1. List out some basic config options of Apache webserver.

Apache has three main configuration files: access.conf, httpd.conf, and srm.conf. If you are running Red Hat 4.0, these files will already be set with the correct directory paths.

If you are doing a "generic" installation or have some other setup, then you will need to do the following:

In access.conf, change/update these directory entries:

<Directory /httpd/html>

<Directory /httpd/cgi-bin>

In httpd.conf:

ServerRoot /httpd

In srm.conf:

DocumentRoot /httpd/html

Alias /icons/ /httpd/icons/

ScriptAlias /cgi-bin/ /httpd/cgi-bin/

  1. What is the command used to install Apache websderver ?

Extract the Apache Files

Once you've downloaded the files you need to uncompress them:

gunzip -d httpd-2_0_NN.tar.gz
tar xvf httpd-2_0_NN.tar

Configuring Your Server for Apache

./configure

Build Apache

make
make install

  1. What do you mean by CORBA?

The Common Object Request Broker Architecture (CORBA) is a standard developed by the Object Management Group (OMG) to provide interoperability among distributed objects. CORBA is essentially a design specification for an Object Request Broker (ORB), where an ORB provides the mechanism required for distributed objects to communicate with one another, whether locally or on remote devices, written in different languages, or at different locations on a network.

  1. Define OMG

Object Management Group (OMG) is a consortium, originally aimed at setting fordistributed object-oriented systems, and is focused on modeling (programs, systems and business processes) and model-based standards.Some Products of OMG are CORBA,MDA,DAD.

  1. What is MOF?

The Meta-Object Facility (MOF) is an Object Management Group(OMG) standard for model-driven engineering.MOF originated in the Unified Modeling Language (UML); the OMG was in need of a Meta modelingarchitecture to define the UML. MOF is designed as a four-layered architecture. It provides a meta-meta model at the top layer, called the M3 layer. This M3-model is the language used by MOF to build metamodels, called M2-models.

  1. Mention the main use of XML Metadata Interchange(XMI).

XML defines an XML -based interchange format for UML and other MOF-based meta models, by standardizing XML document formats, DTDs, and schemas.

It also defines a mapping from UML to XML Because one of OMG's XMI updates reflects the incorpration of XML Schemas,while MOF point updates periodically through OMG's estabished maintance process.

  1. What is Common Warehouse MetaModel(CWM).

CWM standardizes a complete, comprehensive meta model that enables data mining across database boundaries at a enterprise and goes well beyond.like a UML profile but in data space instead of application space, it forms the MDA mapping to database schemas.

  1. List out the applications of MDA.

MDA are used to develop an application design for software product and

MDA is used to implement software products

It is used to create and evolving enterprise-scale software systems

meta-modeling is used in software engineering and system engineering.

13.What is UML profile.

UML Profiles tailor the language to particular areas of computing (such as Enterprise Distributed Object Computing) or particular platforms (such as EJB or CORBA).The UML Profile for CORBA, which defines the mapping from a PIM to a CORBA-specific PSM.The UML Profile for EDOC is used to build PIMs of enterprise applications.The UML Profile for CCM (the CORBA Component Model), OMG's contribution to component-based programming.

14. What is the command which it is used to start stop and run Apache webserver?

Use the chkconfig command to configure Apache to start at boot:

[root@bigboy tmp]# chkconfig httpd on

Use the httpd<code> init script in the <code>/etc/init.d directory to start,stop, and restart Apache after booting:

[root@bigboy tmp]# /etc/init.d/httpd start

[root@bigboy tmp]# /etc/init.d/httpd stop

[root@bigboy tmp]# /etc/init.d/httpd restart

you can test whether the Apache process is running with

[root@bigboy tmp]# pgrep httpd

  1. What is UML ?

Unified Modeling Language (UML) is a standardized general-purpose modelinglanguage in the field of object-orientedsoftware engineering. The standard is managed, and was created, by the Object Management Group .UML combines techniques from data modeling (entity relationship diagrams), business modeling (work flows), object modeling, and component modeling. It can be used with all processes, throughout the software development life cycle, and across different implementation technologies.

  1. Write the difference between UML and MOF?

MOF / UML
MOF meta-metamodel is the language used to define the UML metamodel
MOF may be used to define object-oriented metamodels / UML model is the language used to define the UML
model
UML may be used to define non object-oriented
metamodels
UML model is a languague that defines aspects of a
computer system

17.What are the generic olatform types of Model-Driven Architecture?

The generic olatform types of Model-Driven Architecture are

Object

Batch

Dataflow

CORBA

  1. What is Meta-object Definition Language?

A textual notation to describe type systems using concepts from the MOF Model.Primary means by which DSTC’s prototype servers are populated with type systemdescriptions because.

Familiar MOF Model concepts

Ease of use

Sometimes theSyntax similar to CORBA IDL

PART B

1. What is meant by Apache webserver Wht are the steps involved in Installing Apache webserver?

Introduction

Apache is probably the most popular Linux-based Web server application in use. Once you have DNS correctly setup and your server has access to the Internet, you'll need to configure Apache to accept surfers wanting to access your Web site.

This chapter explains how to configure Apache in a number of commonly encountered scenarios for small web sites.

Download and Install The Apache Package

Most RedHat and Fedora Linux software products are available in the RPM format. When searching for the file, remember that the Apache RPM's filename usually starts with the word httpd followed by a version number, as in httpd-2.0.48-1.2.rpm. It is best to use the latest version of Apache. (For more on RPMs, see Chapter 6, "Installing Linux Software").

When searching for the file, remember that the Redhat / Fedora Apache RPM package's filename usually starts with the word httpd followed by a version number, as in httpd-2.0.48-1.2.rpm. With Ubuntu / Debian the package name will have the apache prefix instead.

Note: Unless otherwise stated, the sample configurations covered in this chapter will be for Redhat / Fedora distributions. If you use Debian / Ubuntu, don’t worry, there will be annotations to make you aware of the differences.

How To Get Apache Started

Setting up the Apache server is easy to do, but the procedure differs between Linux distributions.

Redhat / Fedora

Use the chkconfig command to configure Apache to start at boot:

[root@bigboy tmp]# chkconfig httpd on

Use the httpd<code> init script in the <code>/etc/init.d directory to start,stop, and restart Apache after booting:

[root@bigboy tmp]# /etc/init.d/httpd start

[root@bigboy tmp]# /etc/init.d/httpd stop

[root@bigboy tmp]# /etc/init.d/httpd restart

You can test whether the Apache process is running with

[root@bigboy tmp]# pgrep httpd

you should get a response of plain old process ID numbers.

Debian / Ubuntu

Use the sysv-rc-conf command to configure Apache to start at boot:

[root@u-bigboy tmp]# sysv-rc-conf apache on

Use the apache init script in the /etc/init.d directory to start,stop, and restart Apache after booting:

[root@u-bigboy tmp]# /etc/init.d/apache start

[root@u-bigboy tmp]# /etc/init.d/apache stop

[root@u-bigboy tmp]# /etc/init.d/apache restart

You can test whether the Apache process is running with

[root@u-bigboy tmp]# pgrep apache

you should get a response of plain old process ID numbers.

2. Write the steps to Configure DNS For Apache webserver.

Remember that you will never receive the correct traffic unless you configure DNS for your domain to make your new Linux box Web server the target of the DNS domain's www entry. To do this, refer to "Configuring DNS", and , "Dynamic DNS".

DHCP and Apache

As you remember, if your Internet connection uses DHCP to get its IP address, then you need to use dynamic DNS to get the correct Internet DNS entry for your Web server. If your Web server and firewall are different machines, then you probably also need to set up port forwarding for your Web traffic to reach the Web server correctly. (Chapter 19, "Dynamic DNS", explains port forwarding, as well.).

DHCP on your protected home network is different. In the book's sample topology, the web server lives on the 192.168.1.0 home network protected by a firewall. The firewall uses NAT and port forwarding to pass Internet traffic on to the web server. Remember that the IP address of your web server can change if it gets its IP address using DHCP. This could cause your firewall port forwarding, not Dynamic DNS, to break.

In this case I recommend that your web server on the 192.168.1.0 network uses a fixed, or static IP address that is outside of the range of the DHCP server to prevent you from having this problem.

General Configuration Steps

The configuration file used by Apache is /etc/httpd/conf/httpd.conf in Redhat / Fedora distributions and /etc/apache*/httpd.conf in Debian / Ubuntu distributions. As for most Linux applications, you must restart Apache before changes to this configuration file take effect.

Where To Put Your Web Pages

All the statements that define the features of each web site are grouped together inside their own <VirtualHost> section, or container, in the httpd.conf file. The most commonly used statements, or directives, inside a <VirtualHost> container are:

servername: Defines the name of the website managed by the <VirtualHost> container. This is needed in named virtual hosting only, as I'll explain soon.

DocumentRoot: Defines the directory in which the web pages for the site can be found.

By default, Apache searches the DocumentRoot directory for an index, or home, page named index.html. So for example, if you have a servername of with a DocumentRoot directory of /home/www/site1/, Apache displays the contents of the file /home/www/site1/index.html when you enter in your browser.

Some editors, such as Microsoft FrontPage, create files with an .htm extension, not .html. This isn't usually a problem if all your HTML files have hyperlinks pointing to files ending in .htm as FrontPage does. The problem occurs with Apache not recognizing the topmost index.htm page. The easiest solution is to create a symbolic link (known as a shortcut to Windows users) called index.html pointing to the file index.htm. This then enables you to edit or copy the file index.htm with index.html being updated automatically. You'll almost never have to worry about index.html and Apache again!

This example creates a symbolic link to index.html in the /home/www/site1 directory.

[root@bigboy tmp]# cd /home/www/site1

[root@bigboy site1]# ln -s index.htm index.html

[root@bigboy site1]# ll index.*

-rw-rw-r-- 1 root root 48590 Jun 18 23:43 index.htm

lrwxrwxrwx 1 root root 9 Jun 21 18:05 index.html -> index.htm

[root@bigboy site1]#

The l at the very beginning of the index.html entry signifies a link and the -> the link target.

The Default File Location

By default, Apache expects to find all its web page files in the /var/www/html/ directory with a generic DocumentRoot statement at the beginning of httpd.conf. The examples in this chapter use the /home/www directory to illustrate how you can place them in other locations successfully.

File Permissions And Apache

Apache will display Web page files as long as they are world readable. You have to make sure you make all the files and subdirectories in your DocumentRoot have the correct permissions.

It is a good idea to have the files owned by a nonprivileged user so that Web developers can update the files using FTP or SCP without requiring the root password.

To do this:

  1. Create a user with a home directory of /home/www.
  2. Recursively change the file ownership permissions of the /home/www directory and all its subdirectories.
  3. Change the permissions on the /home/www directory to 755, which allows all users, including the Apache's httpd daemon, to read the files inside.

[root@bigboy tmp]# useradd -g users www

[root@bigboy tmp]# chown -R www:users /home/www

[root@bigboy tmp]# chmod 755 /home/www

Now we test for the new ownership with the ll command.

[root@bigboy tmp]# ll /home/www/site1/index.*

-rw-rw-r-- 1 www users 48590 Jun 25 23:43 index.htm

lrwxrwxrwx 1 www users 9 Jun 25 18:05 index.html -> index.htm

[root@bigboy tmp]#

Note: Be sure to FTP or SCP new files to your web server as this new user. This will make all the transferred files automatically have the correct ownership.

If you browse your Web site after configuring Apache and get a "403 Forbidden" permissions-related error on your screen, then your files or directories under your DocumentRoot most likely have incorrect permissions. Appendix II, "Codes, Scripts, and Configurations," has a short script that you can use to recursively set the file permissions in a directory to match those expected by Apache. You may also have to use the Directory directive to make Apache serve the pages once the file permissions have been correctly set. If you have your files in the default /home/www directory then this second step becomes unnecessary.

Security Contexts For Web Pages

Fedora Core 3 introduced the concept of security contexts as part of the Security Enhanced Linux (SELinux) definition. (See Appendix I, "Miscellaneous Linux Topics," for details.) A Web page may have the right permissions, but the Apache httpd daemon won't be able to read it unless you assign it the correct security context or daemon access permissions. Context-related configuration errors will give "403 Forbidden" browser messages, and in some cases, you will get the default Fedora Apache page where your expected Web page should be.

When a file is created, it inherits the security context of its parent directory. If you decide to place your Web pages in the default /var/www/ directory, then they will inherit the context of that directory and you should have very few problems.

The context of a file depends on the SELinux label it is given. The most important types of security label are listed in Table 20-1.

Table 20-1 SELinux Security Context File Labels

Context Code / Description
httpd_sys_content_t / The type used by regular static web pages with .html and .htm extensions.
httpd_sys_script_ro_t / Required for CGI scripts to read files and directories.
httpd_sys_script_ra_t / Same as the httpd_sys_script_ro_t type but also allows appending data to files by the CGI script.
httpd_sys_script_rw_t / Files with this type may be changed by a CGI script in any way, including deletion.
httpd_sys_script_exec_t / The type required for the execution of CGI scripts

As expected, security contexts become important when Web pages need to be placed in directories that are not the Apache defaults. In this example, user root creates a directory /home/www/site1 in which the pages for a new Web site will be placed. Using the ls -Z command, you can see that the user_home_t security label has been assigned to the directory and the index.html page created in it. This label is not accessible by Apache.