power point on linux commands,appache,php,mysql,html,css,web 2.0

Post on 08-May-2015

6.718 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

LINUX

Linux is a computer operating system family, as well as one of the most prominent examples of free and open source development

Linux receives use as an operating system for a wide variety of computer hardware including desktop computers, supercomputers, mainframes and embedded devices such as cellphones

BASIC COMMANDS IN LINUX

CALENDER

cal: Command to see calender for any specific month or a complete year cal [ [month] year] $ cal april 2009 April 2009 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

DATE

date: displays the current date

$ date Tue Jun 1 21:35:34 IST 2010

cd /home

Change the current working directory to /home. The '/' indicates relative to root, and no matter what directory you are in when you execute this command, the directory will be changed to "/home".

Cat Sends file contents to standard output. This is a way to list the contents of short files to the screen. It works well with piping.

LocateA fast database driven file locator.

slocate -u This command builds the slocate database. It will take several minutes to complete this command. This command must be used before searching for files, however cron runs this command periodically on most systems.

LogoutLogs the current user off the system.

Ls

ls List files in the current working directory except those starting with and only show the file name.

passwd: Changing your password

passwd command allows you to change your password

kuteer: 7/workshop$ passwd Changing password for srihari. (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully

WHO: Who are the users?

who command tells you the users currently logged on to

the system kuteer: 7$ who srihari pts/0 2009-04-15 11:58 (:10.129.41.3) nithin pts/1 2009-04-15 16:09 (:10.129.20.5) avadhut pts/2 2009-04-13 14:39 (:10.129.45.20) anil pts/3 2009-04-13 16:32 (:10.129.23.45)

man - The reference Manual

man displays the documentation for a command

usage: man <command name>

ls - list directory contents SYNOPSIS ls [OPTION]... [FILE]... DESCRIPTION List information about the FILEs (the none of -cftuvSUX nor --sort.

Linux file system

Standard directory structure

/ - the topmost /dev - all the devices are accessible as files /var - “variable” data such as mails, log files, databases /usr - almost all the packages installed /etc - configuration files /home - home directories for all the users /root - home directory of the privileged user root /mnt - used to mount other directories/partitions.

show all own processes – ps

show all processes - ps -ef show all processes for user user - ps -fu user

show all processes like Windows Task Manager - top

show who is logged on to this machine – who

display disk usage of this machine - df -h

display name, kernel information - uname -a

create a blank file - touch file or cat </dev/null > file

remove file - rm file

remove file without confirmation - rm -f file

remove all files in the current directory - rm *

display disk usage of this machine - df -h

display name, kernel information - uname -a

time & date - date -u

machine up time and load averages - uptime

shutdown machine - shutdown now

shutdown machine and reboot - shutdown -r now

shutdown machine (fast mode) in 10 seconds - shutdown -f -t10

shutdown machine in 10 minutes - shutdown -t600

shutdown machine and reboot in 30 seconds - shutdown -r -t30

shutdown now, check disks on reboot - shutdown -Fr now

logout - exit, CTRL-D

switch to user user - su user

switch to user user and inherit their properties - su - user

login as superuser - su - root

create user user - mkuser user

change your password - passwd

change user's password - passwd user - need to run as root(superuser)

ADVANCE LINUX COMMANDS:

The du command prints a summary of the amount of information you have stored in your directories on the mounted disks.syntax: du [options] pathex: du -a /News

The grep command searches text files for a particular word or string of words. Very helpful when trying to find that needle in a haystack, like a particular line in a large log file.syntax: grep textstring filename(s)ex: grep century history.text.doc

head: prints the beginning of a text file

tail: prints the end of a text filehead: prints the beginning of a text file

ps : This will list all of your current processes running, or stopped.

W : This command allows you to list all users’ and their processes who are currently logged in to the Linux server, or a particular user’s processes. Type: w to view all users’ processes. Type: w jsmith to view jsmith’s processes.

pwd- to list the name of your current directory

APACHE :

The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT.

The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

Apache httpd has been the most popular web server on the Internet since April 1996, and celebrated its 15th birthday as a project this February.

DOWNLOAD :

The best place to get Apache is from the Apache HTTP Server download site. Download the sources appropriate to your system.

EXTRACT THE FILES:

Downloaded files need to uncompress them and untarring: gunzip -d httpd-2_0_NN.tar.gz tar xvf httpd-2_0_NN.tar

This creates a new directory under the current directory with the source files.

INSTALLATION :

SERVER ROOT :

The top of the directory tree under which the server's configuration, error, and log files are kept.

ServerRoot : "/opt/lampp"

Listen: Allows you to bind Apache to specific IP addresses and/or ports, instead of the default. See also the <VirtualHost> directive.

DocumentRoot "/opt/lampp/htdocs"

Each directory to which Apache has access can be configured with respect to which services and features are allowed and/or disabled in that# directory (and its subdirectories).

CONFIGURING :

This specifies the directory where the Apache files will be installed. You can also set specific environment variables and modules. Some of the modules I like to have installed are:

* mod_alias - to map different parts of the URL tree

* mod_include - to parse Server Side Includes

* mod_mime - to associate file extensions with its MIME-type

* mod_rewrite - to rewrite URLs on the fly

* mod_speling (sic) - to help your readers who might misspell URLs

* mod_ssl - to allow for strong cryptography using SSL * mod_userdir - to allow system users to have their own Web page directories

BUILD :

As with any source installation, you'll then need to build the installation: make make install

CUSTAMIZE :

Assuming that there were no problems, you are ready to customize your Apache configuration. This really just amounts to editing the httpd.conf file. This file is located in the PREFIX/conf directory.

TEST YOUR SERVER :

Open a Web browser on the same machine and type http://localhost/ in the address box. You should see a page similar to the one in the partial screen shot above

PHP :

PHP lets programmers create web pages with dynamic content that can interact with databases and provides an object-oriented structure for developers.

This makes it very popular for developing any web based software applications. If you’re looking for help with PHP, look no further

PHP is a general-purpose scripting language suited for Web development. The PHP script can be embedded into HTML.

INSTALLATION :

To install PHP5 you can enter the following command in the terminal prompt:

sudo apt-get install php5 libapache2-mod-php5

You can run PHP5 scripts from command line. To run PHP5 scripts from command line you should install php5-cli package. To install php5-cli you can enter the following command in the terminal prompt:

sudo apt-get install php5-cli

You can also execute PHP5 scripts without installing PHP5 Apache module. To accomplish this, you should install php5-cgi package. You can run the following command in a terminal prompt to install php5-cgi package:

sudo apt-get install php5-cgi

To use MySQL with PHP5 you should install php5-mysql package. To install php5-mysql you can enter the following command in the terminal prompt:

sudo apt-get install php5-mysql

Similarly, to use PostgreSQL with PHP5 you should install php5-pgsql package. To install php5-pgsql you can enter the following command in the terminal prompt:

sudo apt-get install php5-pgsql

CONFIGURATION :

By default, the Apache 2 Web server is configured to run PHP5 scripts. In other words, the PHP5 module is enabled in Apache2 Web server automatically when you install the module. Please verify if the files /etc/apache2/mods-enabled/php5.conf and /etc/apache2/mods-enabled/php5.load exist. If they do not exists, you can enable the module using a2enmod command.

You can run the following command at a terminal prompt to restart your web server:

sudo /etc/init.d/apache2 restart

TESTING :

To verify your installation, you can run following PHP5 phpinfo script:

<?phpprint_r (phpinfo());?>

MYSQL :

MySQL is a fast, multi-threaded, multi-user, and robust SQL database server.

It is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.

To install MySQL, run the following command from a terminal prompt:

sudo apt-get install mysql-server

Once the installation is complete, the MySQL server should be started automatically. You can run the following command from a terminal prompt to check whether the MySQL server is running:

sudo netstat -tap | grep mysql

INSTALLATION :

When you run this command, you should see the following line or something similar:

tcp 0 0 localhost.localdomain:mysql *:*LISTEN -

If the server is not running correctly, you can type the following command to start it:

sudo /etc/init.d/mysql restart

CONFIGURATION :

You can edit the /etc/mysql/my.cnf file to configure the basic settings -- log file, port number, etc. For example, to configure MySQL to listen for connections from network hosts, change the bind_address directive to the server's IP address:

bind-address = 192.168.0.5

After making a change to /etc/mysql/my.cnf the mysql daemon will need to be restarted:

sudo /etc/init.d/mysql restart

AJAX or Asynchronous Javascript and XML, is the building blocks of Web 2.0 sites. AJAX can serve as an XML data transport layer or returning pre-formed HTML then injected into the browser DOM. Considered by many to be a mesh of DHTML and XMLHttpRequest this technology allows AJAX developers to provide rich content experiences without constant page reloads

AJAX :

Send a Request To a Server

To send a request to a server, we use the open() and send() methods of the XMLHttpRequest object:

xmlhttp.open("GET","ajax_info.txt",true);xmlhttp.send();

METHOD DESCRIPTION

open(method,url,async)open(method,url,async) Specifies the type of request, the URL, and if the request should be handled asynchronously or not.

method: the type of request: GET or POSTurl: the location of the file on the serverasync: true (asynchronous) or false (synchronous)

send(string) Sends the request off to the server.

string: Only used for POST requests

SERVER RESPONSE :

To get the response from a server, use the responseText or responseXML property of the XMLHttpRequest object.

PROPERTY DESCRIPTION

Response Text Get the response data as a string

Response XML Get the response data as XML data

The responseText Property

If the response from the server is not XML, use the responseText property.

The responseText property returns the response as a string, and you can use it accordingly:

EXAMPLE :

document.getElementById("myDiv").innerHTML=xmlhttp.responseText;

The responseXML Property

If the response from the server is XML, and you want to parse it as an XML object, use the responseXML property:

CSS (Cascading Style Sheets) :

Style sheets are a very powerful tool for the Web site developer. They give you the chance to be completely consistent with the look and feel of your pages, while giving you much more control over the layout and design than straight HTML ever did.

THE STYLES :

One of the more common styles applied to HTML is the color and size of text. In HTML 3.2 you would create a blue H4 headline like this:

<font color="#0000ff"><h4>a blue headline</h4></font>

STYLE SHEETS :

PART 1:

The first in a two-part on Cascading Style Sheets, thisarticle explains how to create and use style rules across your Web site,and then demosntrates a few basic CSS properties.

Also included:inheritance, classes, contextual selectors and some lightbulb jokes.

STYLE SHEET :

PART 2 :

The concluding part of this explores some of the CSS properties related to text alignment, spacing and positioning, together with a look at absolute and relative positioning, z-index stacking, and borders and padding.

If you've been paying attention, you now know the basics of style sheets - what they are, how to use them, and how to link them to your Web pages - together with some of the important style sheet properties that control typeface and colour.

HTML :

Hypertext markup language: a set of tags and rules (conforming to SGML) for using them in developing hypertext documents

HTML defines the structure and layout of a Web documentby using a variety of tags and attributes. The correct structure for an HTML document starts with <HTML><HEAD>(enter here what document is about)<BODY> and ends with </BODY></HTML>. All the information you'd like to include in your Web page fits in between the <BODY> and </BODY> tags.

HTML Basic Document

<html><head><title>Document name goes here</title></head><body>Visible text goes here...</body>

</html>

Heading Elements<h1>Largest Heading</h1>

<h2> . . . </h2><h3> . . . </h3><h4> . . . </h4><h5> . . . </h5>

<h6>Smallest Heading</h6>

Text Elements<p>This is a paragraph</p><br /> (line break)<hr /> (horizontal rule)<pre>This text is preformatted</pre>

Logical Styles<em>This text is emphasized</em><strong>This text is strong</strong><code>This is some computer code</code>

Physical Styles<b>This text is bold</b><i>This text is italic</i>

Links, Anchors, and Image Elements<a href="http://www.example.com/">This is a Link</a><a href="http://www.example.com/"><img src="URL" alt="Alternate Text"></a><a href="mailto:webmaster@example.com">Send e-mail</a>

A named anchor:<a name="tips">Useful Tips Section</a><a href="#tips">Jump to the Useful Tips Section</a>

Unordered list<ul><li>First item</li><li>Next item</li></ul>

Ordered list<ol><li>First item</li><li>Next item</li></ol>

Definition list<dl><dt>First term</dt><dd>Definition</dd><dt>Next term</dt><dd>Definition</dd></dl>

Tables

<table border="1"><tr><th>Tableheader</th><th>Tableheader</th></tr><tr><td>sometext</td><td>sometext</td></tr></table>

Frames

<frameset cols="25%,75%"> <frame src="page1.htm" /> <frame src="page2.htm" /></frameset>

Forms<form action="http://www.example.com/test.asp" method="post/get">

<input type="text" name="email" value="someone@example.com" size="40" maxlength="50" /><input type="password" /><input type="checkbox" checked="checked" /><input type="radio" checked="checked" /><input type="submit" /><input type="reset" /><input type="hidden" />

<select><option>Apples</option><option selected="selected">Bananas</option><option>Cherries</option></select>

<textarea name="comment" rows="60" cols="20"></textarea>

</form>

Entities&lt; is the same as <&gt; is the same as >&#169; is the same as ©

Other Elements

<!-- This is a comment -->

<blockquote>Text quoted from a source.</blockquote>

<address>Written by W3Schools.com<br /><a href="mailto:us@example.org">Email us</a><br />Address: Box 564, Disneyland<br />Phone: +12 34 56 78</address>

WEB 2.0 :

The term "Web 2.0" is commonly associated with web applications that facilitate interactive information sharing

Web 2.0 is the popular term for advanced Internet technology and applications including blogs, wikis, RSS and social bookmarking.

The two major components of Web 2.0 are the technological advances enabled by Ajax and other new applications such as RSS and Eclipse and the user empowerment that they support.

RSS :

The weblog has an RSS feed in place, subscribers to the blog can choose to be automatically notified of this new blog post.

RSS (or Really Simple Syndication), is a method for delivering regularly changing Web content. Many blogs and Internet publishers syndicate their content as an RSS Feed to allow people to subscribe to it easily.

TAG :

The content by users adding "tags" - short, usually one-word descriptions - to facilitate searching, without dependence on pre-made categories. Collections of tags created by many users within a single system may be referred to as "folksonomies"

TAXONOMY :

Folk Taxonomy or Folxonomy allows users to create tags which means that you can have a virtually infinite set. Systems that use folxonomy include Drupal, Joomla, Flickr, YouTube, Revver, and Google Video.ÂÂ

Taxonomies are used when:

*  you don't know how many elements might need to be classified * when you need a classification system that can deal with disparate elements. * Folxonomy also creates structure, but it is much more organic than a taxonomy.ÂÂ

WYSIWYG :

WYSIWYG is an acronym for What You See Is What You Get. The term is used in computing to describe a system in which content displayed during editing appears very similar to the final output, which might be a printed document, web page, slide presentation or even the lighting for a theatrical event

ATOM :

Atom is a simple way to read and write information on the web, allowing you to easily keep track of more sites in less time, and to seamlessly share your words and ideas by publishing to the web.

top related