Tuesday, January 31, 2012

HTML top-100 questions


HTML QUESTIONS AND ANSWERS


1) Is it possible to set up a browser so it refuse pages that does not have a content rating meta tag?
a) Yes - many companies and parents actually do
b) No
c) Only with a cybersitter add on

2) When images are used as links they get a blue border.
a) Always
b) Never
c) Unless border is set to zero

3) A 6 digit Hex color (#FF9966) defines values of Red, Blue and Green in which order ?
a) #BBRRGG
b) #BBGGRR
c) #RRGGBB

4) When you count to 15 using hexadecimal numbers, the highest number is what ?
a) F
b) B
c) 15

5) The <small> and <big> tags are special in what way ?
a) They can be repeated
b) They work on anything
c) They are for images only

6) What does vlink mean ?
a) visited link
b) very good link
c) active link

7) Banners, buttons, dividers, clipart and other simple images usually work best as ?
a) fonts
b) gif
c) jpg

8) Which format usually works best for photos ?
a) JPG
b) HTML
c) GIF

9) <a> and </a> are the tags used for ?
a) Audio-voiced text
b) Adding links to your page
c) Aligning text

10) What does the GENERATOR meta tag tell ?
a) What type of server your page is on
b) Which program was used to produce the page
c) Who designed the page

11) What tag is used to add columns to tables ?
a) <colspan>
b) <td>
c)<tr>

12) Use<td> and </td>to add what to your tables?
a) columns
b) rows
c) steps

13) What is the REFRESH meta tag used for ?
a) Refresh your keywords
b) Allow search engines to relist your page
c) Redirect to a new domain

14) Screen colors are defined by which colors ?
a) Green, Blue, and Yellow
b) Crayola Colors
c) Red, Green and Blue

15) What tag can prevent sites with adult content from being seen on MSIEbrowsers ?
a) <meta refresh> tag
b)<meta keywords> tag
c) icra.org registered <meta http-equiv="pics-label">

16) To specify a font for your whole page add which tag ?
a) <targetfont>
b) <defaultfont>
c)<basefont>

17) Increasing the cellpadding value will what ?
a) Increase the distance between cell and content
b) Increase the space between cells
c) Increase the softness of your site

18) Which of the following is NOT true of metatags use ?
a) Which of the following is NOT true of metatags use ?
b) Do not include words that are not present on your pages
c) Use as many keywords as you can

19) To change the size of an image in HTML use what ?
a) pliers
b) height and width
c) bigger and smaller

20) Hex-colors are the only way to define colors on the web?
a) True for Internet Explorer, False for Netscape browsers
b) False, colors can also be specified with names and CSS
c) True, computer screens only understands hexadecimal values.

21) Is it a common myth that meta tags seriously improve search engine rankings ?
a) no
b) only in Nepal
c) yes

22) Choose the correct HTML tag to make a text italic
a) <italic>
b) <i>

23) Choose the correct HTML tag to make a text bold
a) <bold>
b) <b>

24) If the background image is smaller than the screen, what will happen ?
a) It will be stretched
b) It will leave a blank space at the bottom of your page
c) It will be repeated

25) HTML defines colors using hexidecimal values, while graphics programs most often use what ?
a) Names
b) Normal numbers
c) RGB Code

26) The <title> tag belongs where in your HTML ?
a) Head
b) Arm
c) Body

27) If you don’t want the frame windows to be resizeable, simply add what to the <frame> lines ?
a) save
b) dontresize
c) noresize

28)How can you make a list that lists the items with numbers?
a) <dl>
b) <ol>
c)<ul>
d)<list>

29) Most search engines give serious importance to meta tags when ranking websites in their listings ?
a) True
b) It depends on the keywords
c) False

30) Which colors consist of equal amounts of all basic colors ?
a) purple, green, and red
b) black, blue, and gray
c) white, black and gray

31) Which has higher priority, cell settings or table settings ?
a) Neither
b) Cell settings
c) Table settings

32)What does HTML stand for?
a) Hyper Text Markup Language
b) Hyperlinks and Text Markup Language
c) Home Tool Markup Language

33) What is the correct HTML for adding a background color?
a) <body background="yellow">
b)<background>yellow</background>
c) <body style="background-color:white">

34) To make the appearance of the colors more powerful on your site do which of the following ?
a) Do not use colors
b) Limit their use
c) Splash them all over

35) When is the content of a table shown ?
a) In pieces as it loads
b) Before the border loads
c) After the table is loaded

36) To add rows to your tables use which tags?
a) <td> and </td>
b)<cr> and </cr>
c) <tr> and </tr>

37) Gif and jpg are the two main types of what ?
a) animated effects
b) outlines
c) images

38) WYSIWYG stands for ?
a) What You See Is What You Get
b) When You Start Is When You Go
c) What You See Is What You Gain

39) Choose the correct HTML tag for the largest heading
a) <heading>
b)<h6>
c) <head>
d) <h1>

40) Choose the correct HTML to left-align the content inside a tablecell
a) <td valign="left">
b) <tdleft>
c) <td align="left">
d)<td leftalign>

41) To create a bulleted list use ?
a) <il>
b) <ul>
c) <ol>

42) Besides<B>, another way to make text bold is what ?
a) <strong>
b) <dark>
c) <fat>

43) Hexadecimal numbers are numbers based on the value of what ?
a) 10
b) 8
c) 16

44) Which is NOT a predefined target for links ?
a) _son
b) _parent
c) _blank

45) If you do not include a DESCRIPTION meta tag, most search engine will simply list what ?
a) Nothing
b) All text above the fold of your page
c) The first few words on the page

46) How many characters can be written with 1 Kilobyte ?
a) 1024
b) 1
c) Depends on the font used

47)To start a list at the count of 3, use which ?
a) <ol start="3">
b) <ol begin="3">
c)<ol list="5">

48) Who is making the Web standards?
a) The World Wide Web Consortium
b) Mozilla
c) Microsoft

49) Which tag can set the background color for your page?
a) <body>
b)<head>
c)<font>

50) What is the correct HTML tag for inserting a line break?
a) <lb />
b) <br />
c)<break />

51) The attribute used to choose the type of font in HTML is ?
a) Character
b) Face
c) Text-type

52) colspan=n can be added to only what tag?
a)<table>
b)<td>
c)<tr>

53) Rather than using Hspace and Vspace you can use which of the following to add spacing to your image ?
a) height and width
b) 1x1 pixel transparent image
c) align=+2

54) What is the correct HTML for creating a hyperlink?
a)<a name="http://www.qualitypointtech.com">Qualitypoint Technologies</a>
b) <a href="http://www.qualitypointtech.com">Qualitypoint Technologies</a>
c) <a>http://www.qualitypointtech.com</a>
d) <a url="http://www.qualitypointtech.com">Qualitypoint Technologies</a>

55) In the code <frameset cols="120,*"> the following would be true.
a) Top frame would be 120 pixels high
b) Left frame would be 120 inches wide
c) Left frame would be 120 pixels wide

56) Which program do you need to write HTML?
a) Any text editor
b) HTML-development suite 4
c) A graphics program

57) When making bulleted lists you have what options ?
a) disc, circle, square
b) triangle, square, circle
c) square, disc, polygon

58) A file that specifies how the screen is divided into frames is called a __________
a) frameset
b) frametable
c) tablelink

59) Which of these is not valid HTML?
a) <font face="verdana,arial">
b)<fontface="verdana">
c) <font face="verdana">

60) Which of these tags are all <table>tags?
a) <thead><body><tr>
b) <table><tr><td>
c)<table><head><tfoot>
d)<table><tr><tt>

61) The <br>tag adds what to your webpage ?
a) Line break
b) Little bubbles
c) Long breaks

62) What tag tells where a link starts ?
a) <l>
b) <start>
c) <a>

63) Settings for columns(<td> tag) have higher priority than settings for rows(<tr> tag)
a) Sometimes true, sometimes not
b) True
c) False

64) Colors in plain HTML can be specified using ?
a) Meta tags
b) Images
c) Hexadecimal Colors

65) Relative path make your hypertext links______.
a) Portable
b) Discrete
c) Uniform

66) <ol> tags will create what kind of list ?
a) Numbered List
b) Bulleted List
c) Grocery List

67) Is it possible to link within the current page ?
a) No
b) Only in framesets
c) Yes

68) Tags and text that do not show directly on the page are placed where ?
a) Body
b) Tables
c) Head

69) To create a list using lowercase letters use ?
a)<ol "a">
b) <ol letter="a">
c)<ol type="a">

70) To seperate single list items use ?
a)<li> and </li>
b)<ol> and </ol>
c) <ul> and </ul>

71) Which section is used for text and tags that are shown directly on your web page ?
a) Body
b) Metatags
c) Head

72) To set the font for a single link, where do you add the <font></font> tags ?
a)Outside the <a> and </a>
b) In the <body> tag
c) Inside the <a> and </a> tags

73) Why should you add alternative text to your images ?
a) In case the user wishes to load a different picture
b) So the user can save the image using the text as a name
c) So the users can get an idea of what the image is before it loads

74) What is used to store information usually relevant to browsers and searchengines?
a) Tabs
b) Cookies
c) Metatags

75) What tag tells the browser where the page starts and stops ?
a) <head>
b) <body>
c)<html>

76) Why should you specify a background color if you are using an image for the actual background of your page ?
a) The background color will be shown until the image loads
b) In case the image doesnt fit right
c) So the text shows up better

77) The background image will scroll when the user scrolls down the page, unless you add which property to the <body> tag?
a) bgproperties="holdstill"
b) bgproperties="fixed"
c) bgproperties="stationary"

78) Imagelinks can show a text label if you add which property?
a) alternative
b) str
c) alt

79) Adding a border to your image helps the visitor to recognize it as what ?
a) A really great picture
b) A frame
c) A Link

80) Which of the following is NOT a valid pair for browser safe colors ?
a) AA
b) CC
c) 00

81)To start a numbered list with regular numerals use ?
a) <ol type="a">
b) <ol type="1">
c) <ol type="I">

82) Defining clickable sub-areas on an image is called?
a) imagelinking
b) imagemapping
c) multiple linking

83) How can you open a link in a new browser window?
a) <a href="url" new>
b) <a href="url" target="_blank">
c) <a href="url" target="new

84) What tag adds a paragraph break after the text ?
a) <PARAGRAPH>
b) <P>
c) <BR>

85) Which property will open a page in a new window?
a) target="_self"
b) target="_blank"
c) target="_top"

86) The <i> tag makes text... ?
a) Bold
b) Inline
c) Italic

87) Which two meta tags have special relevance for search engines ?
a) Description and Keywords
b) Description and Name
c) Cookies and Keywords

88) To start a list using circles use which of these tags ?
a) <ul type="circle">
b)<ul "circle">
c) <ul type="round">

89) All normal webpages consist of what two parts ?
a) Head and body
b) Top and bottom
c) Body and frameset

90) Use what to prevent confusion on numbers higher than 9 with hexadecimal colors ?
a) #
b) !
c) %

91) Why do designers often use slight variations of black and white as background colors ?
a) Personal choice
b) Black and white are ugly colors
c) To make the page more readable

92) Which will let text wrap down the side of the image?
a) <img src="myImage.gif" align="wrap">
b)<img src="myImage.gif" align="right">
c) <img src="myImage.gif" wrap="on">

93) There are how many "browser safe colors" ?
a) 16 Million
b) 216
c) 256

94) How do you add a link which will allow the visitor to send an email from your page ?
a) Add an image of an envelope
b)Add <a href="sendmailtoyouraddress">
c) Add <a href="mailto:youraddress">

95) Which tag is used to insert images into your web page ?
a) pic
b) scr
c) img

96) One should never combine the "start" and "type" option ?
a) True
b) Sometimes True, sometimes False
c) False

97) What is the most important tool for adding colors to certain areas of the page rather than the entire background ?
a) Fonts
b) Tables
c) Images

98) All HTML tags are enclosed in what ?
a) <>
b) ? and !
c) # and #

99) Which of the following will NOT be found in the <head> section ?
a) Metatags
b) Title
c) Table

100) Which property tells how many rows a cell should span ?
a) colspan=n
b) Both rowspan=n and colspan=n
c) rowspan=n


Answers
(1) a (2) c (3) c (4) a (5) a (6) a (7) b (8) a (9) b (10) b
(11) b (12) a (13) c (14) c (15) c (16) c (17) a (18) c (19) b (20) b
(21) c (22) b (23) b (24) c (25) c (26) a (27) c (28) b (29) c (30) c
(31) b (32) a (33) c (34) b (35) c (36) c (37) c (38) a (39) d (40) c
(41) b (42) a (43) c (44) a (45) c (46) a (47) a (48) a (49) a (50) b
(51) b (52) b (53) b (54) b (55) c (56) a (57) a (58) a (59) b (60) b
(61) a (62) c (63) b (64) c (65) a (66) a (67) c (68) c (69) c (70) a
(71) a (72) c (73) c (74) c (75) c (76) a (77) b (78) c (79) c (80) a
(81) b (82) b (83) b (84) b (85) b (86) c (87) a (88) a (89) a (90) a
(91) c (92) b (93) c (94) c (95) c (96) c (97) b (98) a (99) c (100) c



Read more...

Wednesday, January 18, 2012

Building a WordPress Blog People Want to Read


build wordpress [Webmaster E books] Building a WordPress Blog People Want to Read, 2nd Edition

Having your own blog isn’t just for the nerdy anymore. Today, it seems everyone—from multinational corporations to a neighbor up the street—has a blog. They all have one, in part, because the folks at WordPress make it easy to have one. But to actually build a good blog—to create a blog people want to read—takes thought, planning, and some effort. From picking a theme and using tags to choosing widgets and building a community, creating your blog really starts after you’ve set it up.
In Building a WordPress Blog People Want to Read by blogger extraordinaire Scott McNulty, you’ll learn how to:
* Install and get your WordPress site running.
* Set up your site to ensure it can easily grow with you and your readers.
* Be the master of user accounts.
* Manage your site with the WordPress Dashboard and extend its capabilities with plug-ins.
* Make the most of images.
* Work with pages, templates, and links and—of course—publish your posts.
* Use custom post types and taxonomies to bend WordPress to your will.
* Deal with comments—if you even want readers commenting at all.
* Find a theme and make it your own.

Download link from Mediafire:

Enhanced by Zemanta

Read more...

video tutorial: Sybex CCNA Study Guide 6th Edition CD


Completely Revised for the New 2007 Version of the CCNA Exam
58 [Training Video] Sybex CCNA 640 802 Study Guide 6th Edition CD
Cisco networking authority Todd Lammle has completely updated this new edition to cover all of the exam objectives for the latest version of the CCNA exam. Todd’s straightforward style provides lively examples, easy-to-understand analogies, and real-world scenarios that will not only help you prepare for the exam, but also give you a solid foundation as a Cisco networking professional.
Packed with updated topics that have been added to the 2007 version of the CCNA exam, this updated study guide features expanded coverage of key topic areas plus new material on switching, network address translation, and OSPF. Inside, find the complete instruction you need, including:
* Full coverage of all exam objectives in a systematic approach, so you can be confident you’re getting the instruction you need for the exam
* Practical hands-on exercises and labs to reinforce critical skills,
* Real-world scenarios that put what you’ve learned in the context of actual job roles
* Challenging review questions in each chapter to prepare you for exam day
* Exam Essentials, a key feature in each chapter that identifies critical areas you must become proficient in before taking the exam
* CD-ROM Includes:
- Chapter Review Questions
- Four Full-Length Practice Exams
- 200 Electronic Flashcards
- Audio and Video Instruction from Todd Lammle
- Full book in searchable PDF format
Fast download link from Mediafire:

Enhanced by Zemanta

Read more...

Tuesday, January 17, 2012

Teach Yourself CSS in 24 Hours

css [Design E books] Teach Yourself CSS in 24 Hours

You know you should use cascading style sheets (CSS) to simplify your web pages, but how do you use CSS? Sams Teach Yourself CSS in 24 Hours, Second Edition is a carefully organized, well-written tutorial that teaches you not only how to use cascading style sheets, but also how to make smart decisions about how and when to apply CSS,



In 24 straightforward one-hour long lessons, you learn by accomplishing hands-on tasks that can be applied to your own site. The tutorials have been updated for this second edition to cover browsers that have become more widely used since the release of the first edition. It also has been updated to cover styling of forms, troubleshooting CSS, and other important new developments.
Download link from Mediafire:


Read more...

Sams Teach Yourself ASP.NET 4 in 24 Hours


sam teach yourself asp.net 24h [Programming E books] Sams Teach Yourself ASP.NET 4 in 24 Hours
Sams Teach YourselfASP.NET 4 in 24 Hours
In just 24 sessions of one hour or less, you’ll learn how to build complete, professional-quality web solutions with ASP.NET 4 and Microsoft Visual Web Developer 2010. Using this book’s straightforward, step-by-step approach, you’ll master the entire process, from site design through data collection, user management through debugging and deployment. Scott Mitchell, editor of top ASP.NET resource site 4GuysFromRolla.com, shows how to use the newest ASP.NET 4 enhancements and make the most of free tools like ASP.NET Ajax and Microsoft SQL Server 2008 Express Edition. Each lesson builds on what you’ve already learned, giving you a strong, practical foundation for success!

Learn how to…
* Get started fast with ASP.NET 4 and Visual Web Developer 2010
* Use Visual Web Developer 2010 to quickly build professional-quality ASP.NET websites
* Design, create, and test ASP.NET web pages
* Collect, process, and validate input from your site’s visitors
* Build a website that supports user accounts
* Create web pages that access, display, and edit database data using Microsoft SQL Server 2008 Express Edition
* Define site maps to provide efficient, easy navigation
* Use master pages to build more consistent and well-designed sites
* Create more responsive and interactive web pages with ASP.NET Ajax
* Host, upload, deploy, and update production web sites

Download link from mediafire:




Read more...

Web Design E-books: Ajax on Rails

     Ajax on Rails




 Learn to build dynamic, interactive web applications using the two most important approaches to web development today: Ajax and the phenomenally efficient Ruby on Rails platform. This book teaches intermediate to advanced web developers how to use both Ajax and Rails to quickly build high-performance, scalable applications without being overwhelmed with thousands of lines of JavaScript code. More than just recipes, you also get a thorough, low-level understanding of what’s happening under the hood.


Learn to build dynamic, interactive web applications using the two most important approaches to web development today: Ajax and the phenomenally efficient Ruby on Rails platform. This book teaches intermediate to advanced web developers how to use both Ajax and Rails to quickly build high-performance, scalable applications without being overwhelmed with thousands of lines of JavaScript code. More than just recipes, you also get a thorough, low-level understanding of what’s happening under the hood.
Ajax on Rails includes three fully worked out Rails/Ajax applications, and quick reference sections for Prototype and script.aculo.us.Testing lessons show you how to eliminate cross-browser JavaScript errors and DOM debugging nightmares using a combination of Firebug, and Venkman.Advanced material explains the most current design practices for Ajax usability. You’ll learn to avoid user experience mistakes with proven design patterns.
Beyond the how-to, Ajax on Rails helps you consider when Ajax is (and isn’t) appropriate, and the trade-offs associated with it. For those new to Rails, this book provides a quick introduction, the big picture, a walk through the installation process, and some tips on getting started. If you’ve already started working with Rails and seek to deepen your skill set, you’ll find dozens of examples drawn from real-world projects, exhaustive reference for every relevant feature, and expert advice on how to “Ajaxify” your applications.

Download link from Mediafire.com:


Read more...

Monday, January 16, 2012

Beginning Web Programming with HTML, XHTML, and CSS

Beginning Web Programming with HTML, XHTML, and CSS 



Beginning Web Programming with HTML, XHTML, and CSS teaches you how to write Web pages using HTML, XHTML, and CSS. It follows standards-based principles, but also teachesreaders ways around problems they are likely to face using (X)HTML.
While XHTML is the "current" standard, the book still covers HTML because many people donot yet understand that XHTML is the official successor to HTML, and many readers will still stick with HTML for backward compatibility and simpler/informal Web pages that don't requireXHTML compliance.
The book teaches basic principles of usability and accessibility along the way, to get users into the mode of developing Web pages that will be available to as many viewers as possible from the start. The book also covers the most commonly used programming/scripting language — JavaScript — and provides readers with a roadmap of other Web technologies to learn after mastering this book to add more functionality to their sites. 

Toolbar

Read more...

AJAX And PHP - Building Responsive Web Applications Ebook Free Download

Assuming a basic knowledge of PHP, XML, JavaScript and MySQL, this book will help you understand how the heart of AJAX beats and how the constituent technologies work together. After teaching the foundations, the book will walk you through numerous real-world case studies covering tasks you̢۪ll be likely to need for your own applications:
  • Server-enabled form-validation page
  • Online chat collaboration tool
  • Customized type-ahead text entry solution
  • Real-time charting using SVG
  • Database-enabled, editable and customizable data grid
  • RSS aggregator application
  • A server-managed sortable list with drag&drop support using the script.aculo.us JavaScript toolkit

The appendices guide you through installing your working environment, using powerful tools that enable debugging, improving, and profiling your code, working with XSLT and XPath.
    From the Author, Cristian Darie"AJAX and PHP: Building Responsive Web Applications is mainly a book for beginners, but when designing its contents we tried to find the ideal blend of topics that would help both novice and experienced web developers make a big step forward. One customer was very kind to let us know, through a review, that we succeeded:
    "The theory behind all the technologies used is very clearly explained, without boring you with details about obvious things. Right from the first chapter you start learning by examples. The examples can be easily adapted to many web projects and they cover stuff that is both useful and fun."
    Here are a few examples of such "useful and fun" things that you can find in this book:

    • details on using proxy scripts to work around the security measures in modern browsers
    • client-side and server-side code that doesn't break when fed with special characters (such as <, ", etc)
    • code that works efficiently with Internet Explorer 5, 6 and 7, Firefox, Opera, Safari, and others
    • a very quick introduction to SVG, the new rebel kid of the web (and of the house)
    • client-server communication based on message queues that guarantee that your messages aren't lost on the way, and arrive in the intended order at the destination
    • server-side state management techniques that use query string parameters and database records to keep track of your client's activity
    • simple yet effective error-handling structures that combine JavaScript code and PHP code to report when something bad happens on the client or on the server
    • a live errata page that is updated as soon as anyone reports a suggestion or a correction
    • a friendly AJAX tutorial and many case studies that teach you how to use JavaScript, PHP, MySQL and XML together in order to achieve wonderful results
    The book's authors and the publisher are listening to your feedback, and appreciate when you invest some time to let them know what you think. The first result of this collaboration is an updated version of the AJAX Chat case study that uses (and teaches) JSON instead of XML. Find this new chapter in the code download or on my website.
    Thanks for reading such a long message. Have fun!" Cristian Darie.
    AJAX and PHP: Building Responsive Web Applications is the most practical and efficient resource a reader can get to enter the exciting world of AJAX. This book will teach you how to create faster, lighter, better web applications by using the AJAX ingredients technologies to their full potential.

    UPDATE: Following suggestions from customers, Packt has updated AJAX and PHP: Building Responsive Web Applications to now cover JSON, a document format that can be used as an alternative to XML. Chapter 5, the AJAX Chat Case Study, now introduces JSON theory and also uses JSON instead of XML in the code.




    AJAX And PHP - Building Responsive Web Applications Ebook Mediafire Link Free Download




    For download:: Click Here




    Read more...

    Sunday, January 15, 2012

    Theme Development Using Wordpress


    Deploy Your WordPress Blog to the Cloud


    For the last decade, hosting a large scale web application has been a daunting task, reserved only for experts. Not anymore; when Amazon opened its server architecture, everything changed. Computer hardware moved to the cloud, and became available to any and all developers. In this tutorial, we will install WordPress in the cloud.

    Introduction

    Most blogs and small business web sites are hosted on shared hosting services, where you pay a fixed monthly fee in exchange for a predefined set of features and installed software. Most of the time, it’s a perfectly valid option, but running your blog in Amazon’s cloud comes with benefits that make it an option worth considering:
    • Easy to upgrade. Creating a new server machine in Amazon’s cloud can be accomplished in a matter of minutes. So by using the service, you are always prepared to handle instant jumps in traffic. If a post jumps to the front page of Digg or Reddit, you can add more servers and balance the load. accordingly.
    • Cost-efficient power for large scale services. If your site attracts a lot of users, and eventually outgrows the limits of your regular hosting, Amazon Web Services gives you free hands in designing a server architecture that matches your needs, in a cost-efficient way, without needing to hire a complete network operations team to do the setup for you! This is how many of the most popular Facebook developers have built their servers.
    • Total control over the setup: Though this point might not be too important when running WordPress, if you want to get adventurous and build your next project using something more exotic than a combination of PHP and MySQL, you don’t have to ask your web hosting company. You install the software you wish, just like you would on a server of your own.
    Whether or not hosting your WordPress site on Amazon is the right choice depends on the traffic your blog receives, as well as how much you value the opportunity to configure your server exactly to your needs.
    If you’re still curious, read on and give it a shot. You will be amazed at how quickly you can get a server up and running!

    Step 1 - Create an Amazon Web Services Account

    Before you can start using Amazon’s cloud for your web hosting needs, you need to create an account with Amazon Web Services (AWS). Point your browser to aws.amazon.com and click on the “Sign Up Now” button.
    If you’ve used Amazon.com before, you can use your same e-mail and password to login to AWS. You can also create a new account by choosing “I am a new user.
    At this stage, you will need to enter your contact information and credit card number so that Amazon can bill you for any services you use. Creating an account is free, though everything else will cost you money.
    The pricing model is rather simple — you pay for every hour your server is running — but because of the variety of options, calculating the actual price can get quite a bit more complex than that. When running your own site at Amazon, it’s best to be careful and double check your price calculations before leaving the servers running unattended so you don’t get any surprises at the end of the month.
    Building our WordPress setup shouldn’t last but an hour, and we will stop everything when we’re finished, so the price for completing the tutorial will be close to zero.

    Step 2 - Launch Your First Server Machine

    Our server setup will consist of two parts:
    • Application server hosted on Amazon’s Elastic Computing Cloud (EC2), running Apache and PHP, with WordPress installed on it.
    • MySQL database hosted on Amazon’s Relational Database Service (RDS).
    Another cheaper, but more difficult, option would be to manually install the MySQL server on the same machine with Apache and PHP. In this tutorial, I decided to go with the Relational Database Service because of its ease of use, as well as the fact that, this way, Amazon will take care of backups and maintenance for the database, and you won’t have to worry about that level of additional security.
    Let’s start by creating our first application server instance.
    Click on the EC2 tab in the AWS Management Console. As this is your first time using the EC2 service, you will need to separately sign up for it. Click on the “Sign Up For Amazon EC2″ button:
    As a special step, Amazon will verify your identity by placing a call to your phone. The whole process is automated: you type a code from the web page into your phone and, once the system has verified that the codes match, you will be redirected to the next page.
    When you are finished with the sign up process, return to the Management Console and the EC2 tab. You will see a page that looks like this. Click on the “Launch Instance” button.
    A popup with a list of Amazon Machine Images (AMIs) opens.
    AMIs are snapshots of running computers.
    Most consist of an operating system and a few utilities, but you can create AMIs with as much complexity as you wish — even containing your full application, ready to be started on a virtual machine with a click of a button.
    We will pick the most basic option: “Basic 32-bit Amazon Linux AMI 1.0.” Click on “Select” next to the AMI and you are ready to go.
    After selecting the AMI, our next step is to decide what kind of hardware we will use to run it. Depending on whether you picked a 32-bit or a 64-bit AMI, you will see a different list, the 32-bit AMIs offering the cheaper options.
    For testing, we don’t need much memory or processing power, so we will start with a Micro instance. Select the instance type and click “Continue.”
    In the next screen, the defaults do just fine. Click “Continue.”
    When you have many machines with different roles, it’s easy to get lost with the machines and end up spending a lot of time searching for the right machine. Naming the machines helps a lot. In our case, naming is not too important, as we will run only one EC2 instance, but let’s give it a name anyhow. Enter your desired name and click “Continue.”
    Next, you will be asked to create a key pair file for securely connecting to the machine. The key replaces a password when connecting to the machine with SSH. Name your key pair file, and click on “Create & Download your Key Pair.” Copy the key pair file to a safe location (A good place, if you are on a Unix system such as Mac OSX or Linux, is ~/.ssh). After copying the file, change its permissions to 400:
    1. chmod 400 wordpress_demo.pem   
    If you are using Windows, you probably use PuTTY for SSH. PuTTY uses its own key format (ppk), so you will need to convert the key to that format by using the Puttygen tool available at the PuTTY download page.
    After you’ve created the key pair, you will still be asked to configure the firewall for your new machine. By default, no one is allowed to connect to the machine — every port is closed. Let’s open ports 22 (SSH) and80 (HTTP), so we can configure the machine over SSH and access the blog from a browser. Select the type of connection from the drop down list at the bottom of the popup and click on “Add Rule.” When you are done with the setup, click “Continue.”
    Review the configuration, and, if everything appears to be correct, click “Launch.”
    Now the machine is launching! Close the popup to return to the dashboard. At first, you’ll notice that the instance’s status is set to “pending,” and within a couple of minutes it switches to “running.” This means the server is up and running — you can start using it.
    When the machine is running, it can be accessed through the ports you defined in the firewall configuration. Let’s use SSH to connect to the machine and finish its setup by installing Apache, PHP, the MySQL extension to PHP, and finally WordPress.

    Step 3 - Install Required Server Software

    Right click on the name of the machine, and select “Connect” from the drop down list. A popup with an SSH command will open.
    Highlight the command, and copy it to a console if you are using a Mac or a Unix machine. The command will be similar to the following:
    1. ssh -i wordpress_demo.pem root@ec2-....compute-1.amazonaws.com   
    If you saved your pem key to ~/.ssh, update the path in the command. Also, you’ll need to change rootinto ec2-user — Amazon hasn’t yet updated the command to match its new AMI setups that don’t allow connecting with the root user.
    If you are on Windows, or prefer to use a more graphical SSH application, simply copy the name of the machine and open it in your SSH application of choice. Remember to use the user name ec2-user and the related key pair file (wordpress_demo.pem).
    Once logged in, you can use the virtual machine just as you would use any Linux machine.
    To install software, we will use an easy to use installer called Yum. First, to install the Apache web server, type the following command:
    1. sudo yum install httpd   
    The installer asks you to confirm the package to install and possibly some other steps as well. Reply with “Y” to every question, and, in no time at all, you will have Apache installed.
    Next up, PHP:
    1. sudo yum install php   
    And the same for the MySQL extensions:
    1. sudo yum install php-mysql   
    That’s it: the setup is done and we are ready to test Apache. Start it with this command (you can later replace “start” with “stop” or “restart” depending on what you want the web server to do):
    1. sudo /etc/init.d/httpd start   
    The web server is up, and you can test it by copying the URL of the machine to your browser:

    Step 4 - Create the Database Machine

    Before installing WordPress, we still need a database. Setting up a database using RDS is as easy as entering some values to a couple of settings screens and pressing a few buttons, so let’s get started.
    In your AWS console, switch to the RDS tab. As you have never used the service before, you will be asked to enable it. This time, the process is much faster and simpler than when you enabled EC2. Click on “Sign Up For Amazon RDS” to get started.
    Follow the process through and, when you are finished, head back to the RDS tab in the AWS console. The screen you will see looks a lot like the EC2 console we used in the previous step. Click “Launch DB Instance.”
    In the popup that opens, you can choose the properties for the database server to start, such as the server instance and storage space to allocate. Let’s pick the smallest values as they are more than enough for our simple test.
    Pick a name for you database server and the root user on it. I used “wordpress-db” as the database server name and “root” / “rootpass” as master login. Not the most secure of options, mind you, but this machine is not intended to last for long, so it’s okay in this instance.
    After setting up the database server information, you will be asked to define a default database to be created on the server. We will call it “wordpress” to follow the WordPress conventions. The rest of the settings on this screen can be left untouched.
    On the next screen, you can define settings for database backups. For now, leave the values to their defaults and click “Continue.”
    After verifying the settings, click “Launch DB Instance.”
    Creating a database instance takes quite a bit longer than creating the EC2 instance, but after about five minutes of waiting, you should see the database instance as “available” on the instances tab.
    Click on the instance to see more data about it, then copy the “endpoint” value. This is the URL of the database server that we will use in the WordPress setup.
    There is one more step before we can move on to installing WordPress: we need to configure the firewall for this database so that the application server can access it.
    Still on the RDS tab in the AWS console, click on “DB Security Groups.” You will see that there are no authorizations yet:
    To give our application server access to the database, we need to authorize its security group to this database security group. Select “EC2 Instance” from the drop down list below “No Authorizations” and enter the name of the security group (“wordpress_app_server“) and your Amazon Account ID to the two text fields that appear next to the drop down list.
    The account ID is hidden quite deep in the AWS settings: you’ll find it by first clicking the “Account” link at the top of the page, and then the “Security Credentials” link on the page that opens.
    After you’ve entered the required information and clicked “Add,” you will see the security group as authorized. We are ready to install WordPress.

    Step 5 - Install WordPress


    If you are not connected to the application server anymore, open an SSH connection to it again. We’ll start by downloading WordPress on the machine. By default, Apache is configured to look for HTML files from/var/www/html/, so let’s download WordPress to that directory.
    1. cd /var/www/html   
    To make things easier in the future, we will change ec2-user to be the owner of that directory:
    1. sudo chown ec2-user .   
    You can download WordPress to your own computer and upload it from there using SCP, but I find it easier to download it directly to the Amazon machine using wget:
    1. wget http://wordpress.org/latest.zip   
    This way, the WordPress package goes straight to its final location and all you need to do is to unzip it:
    1. unzip latest.zip   
    We are about ready to start configuring the blog. As our last step in the command line, change permissions of the wordpress directory that was just created so that the installation script can create the wp-config.php file:
    1. chmod o+w wordpress   
    Now, open the WordPress URL in your browser (The URL of the EC2 instance followed by /wordpress). Click on “Create a Configuration File” and then on the next page “Let’s go!”
    You will end up on a page for entering the database settings. Enter the database name, user name and password, and the URL of the RDS instance. Then click “Submit.”
    You are almost set. Configure the rest of the blog details to finish the installation and enjoy your newly created blog.
    You have successfully installed WordPress in the cloud!

    Step 6 Stop Everything

    As I mentioned at the beginning of this tutorial, AWS billing is based on the hours of usage, so to make sure you are not billed for time that you are not really using, make sure to stop everything once you are done testing.
    First, stop the EC2 instance by selecting it from the admin, right clicking on it and choosing “Stop.” If you later decide to start the machine again, all you need is to click on “Start” in the same drop down list and the machine will resume from where you left it.
    Stopping the database is just as easy, with the exception that you can’t resume the database again. That’s not so nice, but luckily you have the choice to save a snapshot of the data while stopping the database. You can later use this data to recreate the database setup whenever you need it again.
    On the RDS tab, right click on your database instance and select “Delete.”
    Verify that everything is stopped and log out of the AWS console. Your blog is gone, just as fast as it started.
    Thanks for reading!

    Read more...

    Labels