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


Published on

Published in: Technology
1 Comment
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

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

  1. 1. LINUX <ul><li>Linux is a computer operating system family, as well as one of the most prominent examples of free and open source development </li></ul><ul><li>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 </li></ul>
  2. 2. BASIC COMMANDS IN LINUX <ul><li>CALENDER </li></ul>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
  3. 3. <ul><li>DATE </li></ul>date: displays the current date $ date Tue Jun 1 21:35:34 IST 2010 <ul><li>cd /home </li></ul><ul><li>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 &quot;/home&quot;. </li></ul>
  4. 4. <ul><li>Cat </li></ul><ul><li>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. </li></ul><ul><li>Locate </li></ul><ul><li>A fast database driven file locator. </li></ul><ul><li>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. </li></ul><ul><li>Logout </li></ul><ul><li>Logs the current user off the system. </li></ul><ul><li>Ls </li></ul><ul><li>ls List files in the current working directory except those starting with and only show the file name. </li></ul>
  5. 5. <ul><li>passwd: Changing your password </li></ul>passwd command allows you to change your password kuteer: ̃/workshop$ passwd Changing password for srihari. (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
  6. 6. <ul><li>WHO: Who are the users? </li></ul>who command tells you the users currently logged on to the system kuteer: ̃$ who srihari pts/0 2009-04-15 11:58 (: nithin pts/1 2009-04-15 16:09 (: avadhut pts/2 2009-04-13 14:39 (: anil pts/3 2009-04-13 16:32 (:
  7. 7. <ul><li>man - The reference Manual </li></ul>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.
  8. 8. 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.
  9. 9. <ul><li>show all own processes – ps </li></ul><ul><li>show all processes - ps -ef </li></ul><ul><li>show all processes for user user - ps -fu user </li></ul><ul><li>show all processes like Windows Task Manager - top </li></ul><ul><li>show who is logged on to this machine – who </li></ul><ul><li>display disk usage of this machine - df -h </li></ul><ul><li>display name, kernel information - uname -a </li></ul><ul><li>create a blank file - touch file or cat </dev/null > file </li></ul><ul><li>remove file - rm file </li></ul>
  10. 10. <ul><li>remove file without confirmation - rm -f file </li></ul><ul><li>remove all files in the current directory - rm * </li></ul><ul><li>display disk usage of this machine - df -h </li></ul><ul><li>display name, kernel information - uname -a </li></ul><ul><li>time & date - date -u </li></ul><ul><li>machine up time and load averages - uptime </li></ul><ul><li>shutdown machine - shutdown now </li></ul><ul><li>shutdown machine and reboot - shutdown -r now </li></ul>
  11. 11. <ul><li>shutdown machine (fast mode) in 10 seconds - shutdown -f -t10 </li></ul><ul><li>shutdown machine in 10 minutes - shutdown -t600 </li></ul><ul><li>shutdown machine and reboot in 30 seconds - shutdown -r -t30 </li></ul><ul><li>shutdown now, check disks on reboot - shutdown -Fr now </li></ul><ul><li>logout - exit, CTRL-D </li></ul><ul><li>switch to user user - su user </li></ul><ul><li>switch to user user and inherit their properties - su - user </li></ul><ul><li>login as superuser - su - root </li></ul>
  12. 12. <ul><li>create user user - mkuser user </li></ul><ul><li>change your password - passwd </li></ul><ul><li>change user's password - passwd user - need to run as root(superuser) </li></ul>
  13. 13. ADVANCE LINUX COMMANDS: <ul><li>The du command prints a summary of the amount of information you have stored in your directories on the mounted disks. </li></ul><ul><li>syntax: du [options] path </li></ul><ul><li>ex: du -a /News </li></ul><ul><li>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. </li></ul><ul><li>syntax: grep textstring filename(s) </li></ul><ul><li>ex: grep century history.text.doc </li></ul>
  14. 14. <ul><li>head: prints the beginning of a text file </li></ul><ul><li>tail: prints the end of a text filehead: prints the beginning of a text file </li></ul><ul><li>ps : This will list all of your current processes running, or stopped. </li></ul><ul><li>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. </li></ul><ul><li>pwd- to list the name of your current directory </li></ul>
  15. 15. APACHE : <ul><li>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. </li></ul><ul><li>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. </li></ul><ul><li>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. </li></ul>
  16. 16. 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: <ul><li>Downloaded files need to uncompress them and untarring: </li></ul><ul><li>gunzip -d httpd-2_0_NN.tar.gz </li></ul><ul><li>tar xvf httpd-2_0_NN.tar </li></ul><ul><li>This creates a new directory under the current directory with the source files. </li></ul>
  17. 17. INSTALLATION : SERVER ROOT : <ul><li>The top of the directory tree under which the server's </li></ul><ul><li>configuration, error, and log files are kept. </li></ul><ul><li>ServerRoot : &quot;/opt/lampp&quot; </li></ul><ul><li>Listen: Allows you to bind Apache to specific IP addresses and/or </li></ul><ul><li>ports, instead of the default. See also the <VirtualHost> </li></ul><ul><li>directive. </li></ul>
  18. 18. DocumentRoot &quot;/opt/lampp/htdocs&quot; 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 : <ul><li>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: </li></ul>
  19. 19. * 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
  20. 20. 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.
  21. 21. 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
  22. 22. PHP : <ul><li>PHP lets programmers create web pages with dynamic content that can interact with databases and provides an object-oriented structure for developers. </li></ul><ul><li>This makes it very popular for developing any web based software applications. If you’re looking for help with PHP, look no further </li></ul><ul><li>PHP is a general-purpose scripting language suited for Web development. The PHP script can be embedded into HTML. </li></ul>
  23. 23. INSTALLATION : To install PHP5 you can enter the following command in the terminal prompt: sudo apt-get install php5 libapache2-mod-php5 <ul><li>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: </li></ul>sudo apt-get install php5-cli
  24. 24. <ul><li>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: </li></ul>sudo apt-get install php5-cgi <ul><li>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: </li></ul>sudo apt-get install php5-mysql
  25. 25. 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.
  26. 26. <ul><li>You can run the following command at a terminal prompt to restart your web server: </li></ul>sudo /etc/init.d/apache2 restart TESTING : <ul><li>To verify your installation, you can run following PHP5 phpinfo script: </li></ul><?php print_r (phpinfo()); ?>
  27. 27. MYSQL : <ul><li>MySQL is a fast, multi-threaded, multi-user, and robust SQL database server. </li></ul><ul><li>It is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. </li></ul>
  28. 28. <ul><li>To install MySQL, run the following command from a terminal prompt: </li></ul>sudo apt-get install mysql-server <ul><li>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: </li></ul>sudo netstat -tap | grep mysql INSTALLATION :
  29. 29. <ul><li>When you run this command, you should see the following line or something similar: </li></ul>tcp 0 0 localhost.localdomain:mysql *:*LISTEN - <ul><li>If the server is not running correctly, you can type the following command to start it: </li></ul>sudo /etc/init.d/mysql restart
  30. 30. 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 =
  31. 31. After making a change to /etc/mysql/my.cnf the mysql daemon will need to be restarted: sudo /etc/init.d/mysql restart
  32. 32. 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 :
  33. 33. Send a Request To a Server <ul><li>To send a request to a server, we use the open() and send() methods of the XMLHttpRequest object: </li></ul>xmlhttp.open(&quot;GET&quot;,&quot;ajax_info.txt&quot;,true); xmlhttp.send();
  34. 34. 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 POST url: the location of the file on the server async: true (asynchronous) or false (synchronous) send(string) Sends the request off to the server. string: Only used for POST requests
  35. 35. SERVER RESPONSE : <ul><li>To get the response from a server, use the responseText or responseXML property of the XMLHttpRequest object. </li></ul>PROPERTY DESCRIPTION Response Text Get the response data as a string Response XML Get the response data as XML data
  36. 36. 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(&quot;myDiv&quot;).innerHTML=xmlhttp.responseText;
  37. 37. 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:
  38. 38. 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.
  39. 39. 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=&quot;#0000ff&quot;><h4>a blue headline</h4></font>
  40. 40. STYLE SHEETS : <ul><li>PART 1: </li></ul>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.
  41. 41. STYLE SHEET : <ul><li>PART 2 : </li></ul>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.
  42. 42. HTML : <ul><li>Hypertext markup language: a set of tags and rules (conforming to SGML) for using them in developing hypertext documents </li></ul><ul><li>HTML defines the structure and layout of a Web document </li></ul><ul><li>by 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. </li></ul>
  43. 43. HTML Basic Document <html> <head> <title>Document name goes here</title> </head> <body> Visible text goes here... </body> </html>
  44. 44. 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>
  45. 45. 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=&quot;http://www.example.com/&quot;>This is a Link</a> <a href=&quot;http://www.example.com/&quot;><img src=&quot;URL&quot; alt=&quot;Alternate Text&quot;></a> <a href=&quot;mailto:webmaster@example.com&quot;>Send e-mail</a>
  46. 46. A named anchor: <a name=&quot;tips&quot;>Useful Tips Section</a> <a href=&quot;#tips&quot;>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>
  47. 47. Definition list <dl> <dt>First term</dt> <dd>Definition</dd> <dt>Next term</dt> <dd>Definition</dd> </dl> Tables <table border=&quot;1&quot;> <tr> <th>Tableheader</th> <th>Tableheader</th> </tr> <tr> <td>sometext</td> <td>sometext</td> </tr> </table>
  48. 48. Frames <frameset cols=&quot;25%,75%&quot;> <frame src=&quot;page1.htm&quot; /> <frame src=&quot;page2.htm&quot; /> </frameset> Forms <form action=&quot;http://www.example.com/test.asp&quot; method=&quot;post/get&quot;> <input type=&quot;text&quot; name=&quot;email&quot; value=&quot;someone@example.com&quot; size=&quot;40&quot; maxlength=&quot;50&quot; /> <input type=&quot;password&quot; /> <input type=&quot;checkbox&quot; checked=&quot;checked&quot; /> <input type=&quot;radio&quot; checked=&quot;checked&quot; /> <input type=&quot;submit&quot; /> <input type=&quot;reset&quot; /> <input type=&quot;hidden&quot; />
  49. 49. <select> <option>Apples</option> <option selected=&quot;selected&quot;>Bananas</option> <option>Cherries</option> </select> <textarea name=&quot;comment&quot; rows=&quot;60&quot; cols=&quot;20&quot;></textarea> </form> Entities &lt; is the same as < &gt; is the same as > © is the same as ©
  50. 50. Other Elements <!-- This is a comment --> <blockquote> Text quoted from a source. </blockquote> <address> Written by W3Schools.com<br /> <a href=&quot;mailto:us@example.org&quot;>Email us</a><br /> Address: Box 564, Disneyland<br /> Phone: +12 34 56 78 </address>
  51. 51. WEB 2.0 : <ul><li>The term &quot;Web 2.0&quot; is commonly associated with web applications that facilitate interactive information sharing </li></ul><ul><li>Web 2.0 is the popular term for advanced Internet technology and applications including blogs, wikis, RSS and social bookmarking. </li></ul><ul><li>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. </li></ul>
  52. 52. 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 &quot;tags&quot; - 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 &quot;folksonomies&quot;
  53. 53. 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.ÂÂ
  54. 54. 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.