diff options
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | CC-LICENSE | 360 | ||||
| -rw-r--r-- | MIT-LICENSE (renamed from LICENSE) | 2 | ||||
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | _config.yml | 104 | ||||
| -rw-r--r-- | _site_build/_includes/footer.html | 5 | ||||
| -rw-r--r-- | _site_build/_posts/2012-04-21-how-to-install-magento-on-ubuntu.markdown | 283 | ||||
| -rw-r--r-- | _site_build/_posts/2012-05-06-installing-node-js-on-ubuntu.markdown | 175 | ||||
| -rw-r--r-- | _site_build/about/index.html | 11 | ||||
| -rwxr-xr-x | _site_build/apple-touch-icon-114x114.png | bin | 0 -> 28273 bytes | |||
| -rwxr-xr-x | _site_build/apple-touch-icon-57x57.png | bin | 0 -> 10048 bytes | |||
| -rwxr-xr-x | _site_build/apple-touch-icon-72x72.png | bin | 0 -> 13902 bytes | |||
| -rwxr-xr-x | _site_build/apple-touch-icon.png | bin | 0 -> 10048 bytes | |||
| -rw-r--r-- | _site_build/css/style.css | 4 | ||||
| -rwxr-xr-x | _site_build/favicon.ico | bin | 0 -> 894 bytes | |||
| -rw-r--r-- | _site_build/img/localhost.magento-store.com.jpg | bin | 0 -> 73211 bytes |
16 files changed, 945 insertions, 6 deletions
@@ -1,6 +1,5 @@ public -_site_build/_posts -_config.yml *.swp *~ .DS_Store +_deploy.yml diff --git a/CC-LICENSE b/CC-LICENSE new file mode 100644 index 0000000..a632f3e --- /dev/null +++ b/CC-LICENSE @@ -0,0 +1,360 @@ +Creative Commons Legal Code + +Attribution-NonCommercial-ShareAlike 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR + DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE +COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY +COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS +AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE +TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY +BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS +CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND +CONDITIONS. + +1. Definitions + + a. "Adaptation" means a work based upon the Work, or upon the Work and + other pre-existing works, such as a translation, adaptation, + derivative work, arrangement of music or other alterations of a + literary or artistic work, or phonogram or performance and includes + cinematographic adaptations or any other form in which the Work may be + recast, transformed, or adapted including in any form recognizably + derived from the original, except that a work that constitutes a + Collection will not be considered an Adaptation for the purpose of + this License. For the avoidance of doubt, where the Work is a musical + work, performance or phonogram, the synchronization of the Work in + timed-relation with a moving image ("synching") will be considered an + Adaptation for the purpose of this License. + b. "Collection" means a collection of literary or artistic works, such as + encyclopedias and anthologies, or performances, phonograms or + broadcasts, or other works or subject matter other than works listed + in Section 1(g) below, which, by reason of the selection and + arrangement of their contents, constitute intellectual creations, in + which the Work is included in its entirety in unmodified form along + with one or more other contributions, each constituting separate and + independent works in themselves, which together are assembled into a + collective whole. A work that constitutes a Collection will not be + considered an Adaptation (as defined above) for the purposes of this + License. + c. "Distribute" means to make available to the public the original and + copies of the Work or Adaptation, as appropriate, through sale or + other transfer of ownership. + d. "License Elements" means the following high-level license attributes + as selected by Licensor and indicated in the title of this License: + Attribution, Noncommercial, ShareAlike. + e. "Licensor" means the individual, individuals, entity or entities that + offer(s) the Work under the terms of this License. + f. "Original Author" means, in the case of a literary or artistic work, + the individual, individuals, entity or entities who created the Work + or if no individual or entity can be identified, the publisher; and in + addition (i) in the case of a performance the actors, singers, + musicians, dancers, and other persons who act, sing, deliver, declaim, + play in, interpret or otherwise perform literary or artistic works or + expressions of folklore; (ii) in the case of a phonogram the producer + being the person or legal entity who first fixes the sounds of a + performance or other sounds; and, (iii) in the case of broadcasts, the + organization that transmits the broadcast. + g. "Work" means the literary and/or artistic work offered under the terms + of this License including without limitation any production in the + literary, scientific and artistic domain, whatever may be the mode or + form of its expression including digital form, such as a book, + pamphlet and other writing; a lecture, address, sermon or other work + of the same nature; a dramatic or dramatico-musical work; a + choreographic work or entertainment in dumb show; a musical + composition with or without words; a cinematographic work to which are + assimilated works expressed by a process analogous to cinematography; + a work of drawing, painting, architecture, sculpture, engraving or + lithography; a photographic work to which are assimilated works + expressed by a process analogous to photography; a work of applied + art; an illustration, map, plan, sketch or three-dimensional work + relative to geography, topography, architecture or science; a + performance; a broadcast; a phonogram; a compilation of data to the + extent it is protected as a copyrightable work; or a work performed by + a variety or circus performer to the extent it is not otherwise + considered a literary or artistic work. + h. "You" means an individual or entity exercising rights under this + License who has not previously violated the terms of this License with + respect to the Work, or who has received express permission from the + Licensor to exercise rights under this License despite a previous + violation. + i. "Publicly Perform" means to perform public recitations of the Work and + to communicate to the public those public recitations, by any means or + process, including by wire or wireless means or public digital + performances; to make available to the public Works in such a way that + members of the public may access these Works from a place and at a + place individually chosen by them; to perform the Work to the public + by any means or process and the communication to the public of the + performances of the Work, including by public digital performance; to + broadcast and rebroadcast the Work by any means including signs, + sounds or images. + j. "Reproduce" means to make copies of the Work by any means including + without limitation by sound or visual recordings and the right of + fixation and reproducing fixations of the Work, including storage of a + protected performance or phonogram in digital form or other electronic + medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, +limit, or restrict any uses free from copyright or rights arising from +limitations or exceptions that are provided for in connection with the +copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, +Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +perpetual (for the duration of the applicable copyright) license to +exercise the rights in the Work as stated below: + + a. to Reproduce the Work, to incorporate the Work into one or more + Collections, and to Reproduce the Work as incorporated in the + Collections; + b. to create and Reproduce Adaptations provided that any such Adaptation, + including any translation in any medium, takes reasonable steps to + clearly label, demarcate or otherwise identify that changes were made + to the original Work. For example, a translation could be marked "The + original work was translated from English to Spanish," or a + modification could indicate "The original work has been modified."; + c. to Distribute and Publicly Perform the Work including as incorporated + in Collections; and, + d. to Distribute and Publicly Perform Adaptations. + +The above rights may be exercised in all media and formats whether now +known or hereafter devised. The above rights include the right to make +such modifications as are technically necessary to exercise the rights in +other media and formats. Subject to Section 8(f), all rights not expressly +granted by Licensor are hereby reserved, including but not limited to the +rights described in Section 4(e). + +4. Restrictions. The license granted in Section 3 above is expressly made +subject to and limited by the following restrictions: + + a. You may Distribute or Publicly Perform the Work only under the terms + of this License. You must include a copy of, or the Uniform Resource + Identifier (URI) for, this License with every copy of the Work You + Distribute or Publicly Perform. You may not offer or impose any terms + on the Work that restrict the terms of this License or the ability of + the recipient of the Work to exercise the rights granted to that + recipient under the terms of the License. You may not sublicense the + Work. You must keep intact all notices that refer to this License and + to the disclaimer of warranties with every copy of the Work You + Distribute or Publicly Perform. When You Distribute or Publicly + Perform the Work, You may not impose any effective technological + measures on the Work that restrict the ability of a recipient of the + Work from You to exercise the rights granted to that recipient under + the terms of the License. This Section 4(a) applies to the Work as + incorporated in a Collection, but this does not require the Collection + apart from the Work itself to be made subject to the terms of this + License. If You create a Collection, upon notice from any Licensor You + must, to the extent practicable, remove from the Collection any credit + as required by Section 4(d), as requested. If You create an + Adaptation, upon notice from any Licensor You must, to the extent + practicable, remove from the Adaptation any credit as required by + Section 4(d), as requested. + b. You may Distribute or Publicly Perform an Adaptation only under: (i) + the terms of this License; (ii) a later version of this License with + the same License Elements as this License; (iii) a Creative Commons + jurisdiction license (either this or a later license version) that + contains the same License Elements as this License (e.g., + Attribution-NonCommercial-ShareAlike 3.0 US) ("Applicable License"). + You must include a copy of, or the URI, for Applicable License with + every copy of each Adaptation You Distribute or Publicly Perform. You + may not offer or impose any terms on the Adaptation that restrict the + terms of the Applicable License or the ability of the recipient of the + Adaptation to exercise the rights granted to that recipient under the + terms of the Applicable License. You must keep intact all notices that + refer to the Applicable License and to the disclaimer of warranties + with every copy of the Work as included in the Adaptation You + Distribute or Publicly Perform. When You Distribute or Publicly + Perform the Adaptation, You may not impose any effective technological + measures on the Adaptation that restrict the ability of a recipient of + the Adaptation from You to exercise the rights granted to that + recipient under the terms of the Applicable License. This Section 4(b) + applies to the Adaptation as incorporated in a Collection, but this + does not require the Collection apart from the Adaptation itself to be + made subject to the terms of the Applicable License. + c. You may not exercise any of the rights granted to You in Section 3 + above in any manner that is primarily intended for or directed toward + commercial advantage or private monetary compensation. The exchange of + the Work for other copyrighted works by means of digital file-sharing + or otherwise shall not be considered to be intended for or directed + toward commercial advantage or private monetary compensation, provided + there is no payment of any monetary compensation in con-nection with + the exchange of copyrighted works. + d. If You Distribute, or Publicly Perform the Work or any Adaptations or + Collections, You must, unless a request has been made pursuant to + Section 4(a), keep intact all copyright notices for the Work and + provide, reasonable to the medium or means You are utilizing: (i) the + name of the Original Author (or pseudonym, if applicable) if supplied, + and/or if the Original Author and/or Licensor designate another party + or parties (e.g., a sponsor institute, publishing entity, journal) for + attribution ("Attribution Parties") in Licensor's copyright notice, + terms of service or by other reasonable means, the name of such party + or parties; (ii) the title of the Work if supplied; (iii) to the + extent reasonably practicable, the URI, if any, that Licensor + specifies to be associated with the Work, unless such URI does not + refer to the copyright notice or licensing information for the Work; + and, (iv) consistent with Section 3(b), in the case of an Adaptation, + a credit identifying the use of the Work in the Adaptation (e.g., + "French translation of the Work by Original Author," or "Screenplay + based on original Work by Original Author"). The credit required by + this Section 4(d) may be implemented in any reasonable manner; + provided, however, that in the case of a Adaptation or Collection, at + a minimum such credit will appear, if a credit for all contributing + authors of the Adaptation or Collection appears, then as part of these + credits and in a manner at least as prominent as the credits for the + other contributing authors. For the avoidance of doubt, You may only + use the credit required by this Section for the purpose of attribution + in the manner set out above and, by exercising Your rights under this + License, You may not implicitly or explicitly assert or imply any + connection with, sponsorship or endorsement by the Original Author, + Licensor and/or Attribution Parties, as appropriate, of You or Your + use of the Work, without the separate, express prior written + permission of the Original Author, Licensor and/or Attribution + Parties. + e. For the avoidance of doubt: + + i. Non-waivable Compulsory License Schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme cannot be waived, the Licensor + reserves the exclusive right to collect such royalties for any + exercise by You of the rights granted under this License; + ii. Waivable Compulsory License Schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme can be waived, the Licensor reserves + the exclusive right to collect such royalties for any exercise by + You of the rights granted under this License if Your exercise of + such rights is for a purpose or use which is otherwise than + noncommercial as permitted under Section 4(c) and otherwise waives + the right to collect royalties through any statutory or compulsory + licensing scheme; and, + iii. Voluntary License Schemes. The Licensor reserves the right to + collect royalties, whether individually or, in the event that the + Licensor is a member of a collecting society that administers + voluntary licensing schemes, via that society, from any exercise + by You of the rights granted under this License that is for a + purpose or use which is otherwise than noncommercial as permitted + under Section 4(c). + f. Except as otherwise agreed in writing by the Licensor or as may be + otherwise permitted by applicable law, if You Reproduce, Distribute or + Publicly Perform the Work either by itself or as part of any + Adaptations or Collections, You must not distort, mutilate, modify or + take other derogatory action in relation to the Work which would be + prejudicial to the Original Author's honor or reputation. Licensor + agrees that in those jurisdictions (e.g. Japan), in which any exercise + of the right granted in Section 3(b) of this License (the right to + make Adaptations) would be deemed to be a distortion, mutilation, + modification or other derogatory action prejudicial to the Original + Author's honor and reputation, the Licensor will waive or not assert, + as appropriate, this Section, to the fullest extent permitted by the + applicable national law, to enable You to reasonably exercise Your + right under Section 3(b) of this License (right to make Adaptations) + but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING AND TO THE +FULLEST EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR OFFERS THE WORK AS-IS +AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE +WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT +LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, +ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT +DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED +WARRANTIES, SO THIS EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE +LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR +ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES +ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + a. This License and the rights granted hereunder will terminate + automatically upon any breach by You of the terms of this License. + Individuals or entities who have received Adaptations or Collections + from You under this License, however, will not have their licenses + terminated provided such individuals or entities remain in full + compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will + survive any termination of this License. + b. Subject to the above terms and conditions, the license granted here is + perpetual (for the duration of the applicable copyright in the Work). + Notwithstanding the above, Licensor reserves the right to release the + Work under different license terms or to stop distributing the Work at + any time; provided, however that any such election will not serve to + withdraw this License (or any other license that has been, or is + required to be, granted under the terms of this License), and this + License will continue in full force and effect unless terminated as + stated above. + +8. Miscellaneous + + a. Each time You Distribute or Publicly Perform the Work or a Collection, + the Licensor offers to the recipient a license to the Work on the same + terms and conditions as the license granted to You under this License. + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor + offers to the recipient a license to the original Work on the same + terms and conditions as the license granted to You under this License. + c. If any provision of this License is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of + the remainder of the terms of this License, and without further action + by the parties to this agreement, such provision shall be reformed to + the minimum extent necessary to make such provision valid and + enforceable. + d. No term or provision of this License shall be deemed waived and no + breach consented to unless such waiver or consent shall be in writing + and signed by the party to be charged with such waiver or consent. + e. This License constitutes the entire agreement between the parties with + respect to the Work licensed here. There are no understandings, + agreements or representations with respect to the Work not specified + here. Licensor shall not be bound by any additional provisions that + may appear in any communication from You. This License may not be + modified without the mutual written agreement of the Licensor and You. + f. The rights granted under, and the subject matter referenced, in this + License were drafted utilizing the terminology of the Berne Convention + for the Protection of Literary and Artistic Works (as amended on + September 28, 1979), the Rome Convention of 1961, the WIPO Copyright + Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 + and the Universal Copyright Convention (as revised on July 24, 1971). + These rights and subject matter take effect in the relevant + jurisdiction in which the License terms are sought to be enforced + according to the corresponding provisions of the implementation of + those treaty provisions in the applicable national law. If the + standard suite of rights granted under applicable copyright law + includes additional rights not granted under this License, such + additional rights are deemed to be included in the License; this + License is not intended to restrict the license of any rights under + applicable law. + + +Creative Commons Notice + + Creative Commons is not a party to this License, and makes no warranty + whatsoever in connection with the Work. Creative Commons will not be + liable to You or any party on any legal theory for any damages + whatsoever, including without limitation any general, special, + incidental or consequential damages arising in connection to this + license. Notwithstanding the foregoing two (2) sentences, if Creative + Commons has expressly identified itself as the Licensor hereunder, it + shall have all rights and obligations of Licensor. + + Except for the limited purpose of indicating to the public that the + Work is licensed under the CCPL, Creative Commons does not authorize + the use by either party of the trademark "Creative Commons" or any + related trademark or logo of Creative Commons without the prior + written consent of Creative Commons. Any permitted use will be in + compliance with Creative Commons' then-current trademark usage + guidelines, as may be published on its website or otherwise made + available upon request from time to time. For the avoidance of doubt, + this trademark restriction does not form part of this License. + + Creative Commons may be contacted at http://creativecommons.org/. @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.
\ No newline at end of file +SOFTWARE. @@ -1,7 +1,7 @@ -# JEKYLL-BLOG +# DAVIDTSADLER.COM ## License -MIT License +The posts that I have written are licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License](http://creativecommons.org/licenses/by-nc-sa/3.0/). The project code is licensed under MIT. ### Major components diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..9538036 --- /dev/null +++ b/_config.yml @@ -0,0 +1,104 @@ +# *************************** +# SITE +# *************************** + +# Set to true when building the site for production. +# Some parts of the site are only built in production mode. E.g. Google analytics code. +production: false + +# Full url for the site minus the ending forward slash. +url: http://davidtsadler.com + +# Appears in the <title> and <header> elements within the site. +title: davidtsadler.com + +# Optional. Appears in the site's main <header> element. +subtitle: My little bit of the Internet + +# Used in various places where the author of the site needs to appear. +# For example, the copyright notice. +# Also appears in the RSS feed. +author: David T. Sadler + +# Used in the meta description tag of the site and the description element of the RSS feed. +description: The personal web site of David T. Sadler with articles and tutorials on web development and other programming. + +# Optional information that appears in the 'Contact' sidebar. +# Mainly used to generate URLs to various social sites. + +# email address of the site author. Also appears in the RSS feed if specified. +#email: + +# Twitter name minus the @ character. +twitter: davidtsadler + +# Git hub name. +github: davidtsadler + +# Facebook username +#facebook + +# Controls the number of recent posts shown on the main index page and in the RSS feed. +max_recent_posts: 10 + +# Used in the footer of the site and RSS feed. +copyright_year: 2012 + +# Optional Google analytics. +google_ua: UA-30821012-1 + +# Optional Google site verification. +google_site_verification: CIud64O3k34lfbD3Ljbv2ENKcILv9VzIXkTHnPpw4fk + +# Optional Feedburner ID. +feedburner: davidtsadlercom + +# Optional Disqus integration. +disqus_shortname: dtscom + +# Social buttons will be enabled for posts. +# Each post can control what buttons they want through their meta tags. +social_buttons: true + +# *************************** +# JEKYLL +# *************************** + +# Markdown engine that will be used. +markdown: rdiscount + +# Directory where Jekyll will look to transform files. +source: _site_build + +# Directory where Jekyll will save transformed files. +destination: public + +# Format that Jekyll will use when generating URLs to posts. +permalink: /archives/:year/:month/:day/:title/ + +pygments: true + +# *************************** +# PLUGINS +# *************************** + +# Directory where plugins are located. +plugins: _site_build/_plugins + +# Set to true to have Jekyll generate category pages for posts. +generate_category_indexes: true + +# The directory where categories will be served from. Defaults to categories +#category_dir: + +# String prefixed to the title of the category page. Defaults to Category: +#category_title_prefix: + +# String prefixed to the meta description of the category page. Defaults to Category: +#category_meta_description_prefix: + +# *************************** +# RAKE TASKS +# *************************** +# The number of test posts that will be generated by the task test_posts:create +num_test_posts: 50 diff --git a/_site_build/_includes/footer.html b/_site_build/_includes/footer.html index b165e1d..2aefd40 100644 --- a/_site_build/_includes/footer.html +++ b/_site_build/_includes/footer.html @@ -1,4 +1,9 @@ <footer> + {% if page.licensed %} + <p id="license"> + <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons Licence" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" /></a><br />This <span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" rel="dct:type">work</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">{{ site.author }}</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>. + </p> + {% endif %} <p> <small>Copyright © {{ site.copyright_year }} by {{ site.author }}. All Rights Reserved.</small> </p> diff --git a/_site_build/_posts/2012-04-21-how-to-install-magento-on-ubuntu.markdown b/_site_build/_posts/2012-04-21-how-to-install-magento-on-ubuntu.markdown new file mode 100644 index 0000000..00b5428 --- /dev/null +++ b/_site_build/_posts/2012-04-21-how-to-install-magento-on-ubuntu.markdown @@ -0,0 +1,283 @@ +--- +layout: post +title: How to install Magento on Ubuntu +author: David T. Sadler +description: By the end of this guide you will have installed Magento locally on Ubuntu. +categories: ["Magento","Ubuntu"] +robots: follow, noodp, noydir, noarchive +comments: true +google_plus: true +twitter_share: true +facebook_like: true +published: false +licensed: true +--- +By the end of this guide you will have installed Magento, and some sample data, locally on Ubuntu. This will allow you to get to grips with the software before installing it onto a production server. In addition to Magento I will take you through installing Apache, PHP and MySQL. I'm going to assume that you are using Ubuntu 12.04 (Precise Pangolin) and that you wish to install version 1.7.0.0 of Magento. You're results may vary if you are using different versions. + +As this is quite a long post I have broken it down into various sections. Feel free to ignore those parts that are not relevent for you. + +* [Getting started.](#start) +* [Installing and configuring the Apache HTTP server.](#apache) +* [Installing the PHP scripting language.](#php) +* [Installing the MySQL database server.](#mysql) +* [Creating the directory from which Magento will be served from.](#directory) +* [Configuring the Apache Virtual Host.](#vhost) +* [Installing Magento.](#magento) + +<h2 id="start">Getting started.</h2> + +If you have never heard of Magento the following from the <a href="http://www.magentocommerce.com/" rel="external nofollow" target="_blank" title="Go to the Magento website">website</a> will explain. + +<blockquote cite="http://www.magentocommerce.com/product/faq#What%20is%20Magento?"> + <p>Magento is a feature-rich eCommerce platform built on open-source technology that provides online merchants with unprecedented flexibility and control over the look, content and functionality of their eCommerce store. Magento’s intuitive administration interface features powerful marketing, search engine optimization and catalog-management tools to give merchants the power to create sites that are tailored to their unique business needs. Designed to be completely scalable and backed by Varien's support network, Magento offers companies the ultimate eCommerce solution.</p> + <footer>— <cite><a href="http://www.magentocommerce.com/product/faq#What%20is%20Magento?" rel="external nofollow" target="_blank" title="Go to the Magento FAQ">Magento Frequently Asked Questions</a></cite></footer> +</blockquote> + +Magento is available in two editions, Community and Enterprise. The Enterprise edition is the company's commercial version of the software and is meant for large-scale eCommerce users. The Community edition on the other hand is available as a free download under the open source OSL 3.0 license and is the version that you will be installing. + +This post will walk you through every thing you need to get a local copy of Magento running on Ubuntu. It is not meant as a guide to installing a fully working eCommerce store located on a production server. + +To begin, open up a terminal and enter the command below. + +{% highlight bash %} +sudo apt-get update +{% endhighlight %} + +This will ensure that the computer's database of software packages is updated to contain the latest versions. While this command is not strictly necessary, I tend to issue it before installing any software so that the most up to date versions of the packages are used. + +<h2 id="apache">Installing and configuring the Apache HTTP server.</h2> +Apache is easily installed by entering the following command. +{% highlight bash %} +sudo apt-get install apache2 -y +{% endhighlight %} + +During the install you may notice the following warning: +{% highlight console %} +apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName +{% endhighlight %} + +This comes from Apache itself and means that it was unable to determine its own name. The Apache server needs to know its own name under certain situations. For example, when creating redirection URLs. + +To stop this warning we can create an Apache config file to store the name. On a production server you would set this as either a hostname or a <abbr title="Fully Qualified Domain Name">FQDN</abbr>, but for local development we can get away with using 'localhost'. + +{% highlight bash %} +sudo bash -c "cat >> /etc/apache2/conf.d/servername.conf <<EOF +ServerName localhost +EOF" +{% endhighlight %} + +In order for this change to take effect restart Apache. The warning should no longer appear. + +{% highlight bash %} +sudo service apache2 restart +{% endhighlight %} + +One of the features of Magento is its URL rewriting. By default Magento will use category and product IDs when generating URLs. With the rewrite tool you can create more SEO friendly URLs for your store. So rather than the URL below, + +{% highlight console %} +/catalog/product/view/id/16 +{% endhighlight %} + +you can instead use, + +{% highlight console %} +/size-6-red-shoes.html +{% endhighlight %} + +In order to take advantage of this feature we need to enable Apache's rewrite module with the `a2enmod` command. + +{% highlight bash %} +sudo a2enmod rewrite +sudo service apache2 restart +{% endhighlight %} + +<h2 id="php">Installing the PHP scripting language.</h2> +As can be seen from the list of system <a href="http://www.magentocommerce.com/system-requirements" rel="external nofollow" target="_blank" title="Go to the list of Magento requirements">requirements</a>, Magento needs PHP version 5.2.13 or later with the following extensions. + +* PDO_MySQL +* simplexml +* mcrypt +* hash +* GD +* DOM +* iconv +* curl +* SOAP + +We will therefore install PHP with the following command. + +{% highlight bash %} +sudo apt-get install php5 php5-curl php5-gd php5-mcrypt php5-mysql -y +{% endhighlight %} + +<h2 id="mysql">Installing the MySQL database server.</h2> +The command below will install MySQL. Note that the install process will ask you to create and confirm a password for the root user. Remember the password that you enter as it will be needed later. + +{% highlight bash %} +sudo apt-get install mysql-server -y +{% endhighlight %} + +<h2 id="directory">Creating the directory from which Magento will be served from.</h2> +Before we get into the business of creating the directory I need to point out a few things. The process below is heavly infulenced by how I setup websites when developing locally. The actual whys and wherefores of how I do this is are too long to go into detail in this post but can be summarised as such. + +* Each site is served from its own directory named after the site's domain name. E.g, `my-example-site.com` +* Group ownership of these directories, and their contents, is set as `www-data`. The same group that the Apache process runs under. +* The directories are located in a `public_html` directory that has been created in my home directory. + +Many of the commands that follow use absoulte paths when refering to directories located in my home directory. Since the username on my computer is `dev` you will need to replace any occurrences of this with your own username. Feel free to also change the location of any of the directories. Just remember that you must use the correct location when configuring the virtual host later on. + +The first thing we need to do is ensure that you belong to the same group as the Apache process. Note that after entering the command you must log out and then log back in before the system will recognise that you belong to a new group. + +{% highlight bash %} +sudo usermod -a -G www-data dev +{% endhighlight %} + +You can use the `groups` command to check that you belong to the `www-data` group. As long as it appears in the list of groups you can move on to creating the required directories. + +{% highlight bash %} +mkdir /home/dev/public_html +chgrp www-data /home/dev/public_html +{% endhighlight %} + +As both you and Apache need read and write access to the directory we have used the `chgrp` command to change its group to be `www-data`. However any new files or directories that you create within `public_html` will not inherit the same group. We therefore need to change the permissions to include the "setgid" bit. + +{% highlight bash %} +sudo chmod 2750 /home/dev/public_html +{% endhighlight %} + +We can now create the directory that Magento will be served from and it will be given the `www-data` group automatically. + +{% highlight bash %} +mkdir -p /home/dev/public_html/magento-store.com/{public,log} +{% endhighlight %} + +<h2 id="vhost">Configuring the Apache Virtual Host.</h2> + +We will create a simple virtual host configuration file that will instruct Apache to serve the contents of the directory `/home/dev/public_html/magento-store.com/public` for any requests to `localhost.magento-store.com` + +{% highlight bash %} +sudo bash -c "cat >> /etc/apache2/sites-available/magento-store.com <<EOF +<VirtualHost *:80> + + ServerName localhost.magento-store.com + ServerAlias www.localhost.magento-store.com + + DocumentRoot /home/dev/public_html/magento-store.com/public + + LogLevel warn + ErrorLog /home/dev/public_html/magento-store.com/log/error.log + CustomLog /home/dev/public_html/magento-store.com/log/access.log combined + +</VirtualHost> +EOF" +{% endhighlight %} + +Using the `a2ensite` command and restarting Apache will load the new configuration file. + +{% highlight bash %} +sudo a2ensite magento-store.com +sudo service apache2 restart +{% endhighlight %} + +To ensure that the domain `localhost.magento-store.com` resolves locally to the computer we need to add some entries to the system's `hosts` file. + +{% highlight bash %} +sudo bash -c "cat >> /etc/hosts <<EOF + +# DNS for localhost magento store development. +127.0.0.1 localhost.magento-store.com +127.0.0.1 www.localhost.magento-store.com +EOF" +{% endhighlight %} + +If everything has gone according to plan you should be able to open a browser and navigate to `localhost.magento-store.com` where you will see a directory listing as shown below. + +<figure> + +</figure> + +<h2 id="magento">Installing Magento.</h2> + +Log into MySQL with the following command. Note that it will prompt you to enter the root user password that you specified as part of the MySQL install. + +{% highlight bash %} +mysql -u root -p +{% endhighlight %} + +We need to create a database for Magento and a MySQL user that it can use to access it. For local development it is fine to use the value "magento" for not only the database name but for the user's name and password. On a production server you would use something a lot more secure. + +{% highlight mysql %} +CREATE DATABASE magento; +INSERT INTO mysql.user (User,Host,Password) VALUES('magento','localhost',PASSWORD('magento')); +FLUSH PRIVILEGES; +GRANT ALL PRIVILEGES ON magento.* TO magento@localhost; +FLUSH PRIVILEGES; +exit +{% endhighlight %} + +Change into the directory where we wish to perform the install. + +{% highlight bash %} +cd /home/dev/public_html/magento-store.com/public +{% endhighlight %} + +You now need to download the tar archive of the source code and unpack it. + +{% highlight bash %} +wget http://www.magentocommerce.com/downloads/assets/1.7.0.0/magento-1.7.0.0.tar.gz +tar -xzvf magento-1.7.0.0.tar.gz +{% endhighlight %} + +The source code is located in a directory called `magento`. Since we don't want Apache to serve Magento from this sub-directory we need to move the source code out of it. + +{% highlight bash %} +mv magento/* magento/.htaccess . +{% endhighlight %} + +We should now tidy up after ourselves by removing any unnecessary files. + +{% highlight bash %} +rm magento-1.7.0.0.tar.gz +rm -r magento +{% endhighlight %} + +Since testing an eCommerce store without any products is not much fun we will install some sample data. First download and extract the tar archive that Magento provides for us. + +{% highlight bash %} +wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz +tar -xzvf magento-sample-data-1.6.1.0.tar.gz +{% endhighlight %} + +The archive provides a sql file and various assets such as images. The assets need to be moved from the sample sub-directory and put into the `media` directory of the Magento source. The sql file is also moved to make it easier for loading into MySQL. + +{% highlight bash %} +mv magento-sample-data-1.6.1.0/media/* media/ +mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql data.sql +{% endhighlight %} + +We need to log into MySQL again but this time we will use the MySQL user `magento` that we set up earlier. + +{% highlight bash %} +mysql -u magento -p +{% endhighlight %} + +When prompted enter `magento` as the password and then enter the following sql statements to load in the sample data. + +{% highlight mysql %} +USE magento; +SOURCE data.sql; +exit +{% endhighlight %} + +Again we can now remove any unnecessary files. + +{% highlight bash %} +rm magento-sample-data-1.6.1.0.tar.gz +rm -r magento-sample-data-1.6.1.0 +rm data.sql +{% endhighlight %} + +{% highlight bash %} +chmod g+w var var/connect/ var/.htaccess app/etc +chmod -R g+w var/package/ media +{% endhighlight %} diff --git a/_site_build/_posts/2012-05-06-installing-node-js-on-ubuntu.markdown b/_site_build/_posts/2012-05-06-installing-node-js-on-ubuntu.markdown new file mode 100644 index 0000000..0e844dc --- /dev/null +++ b/_site_build/_posts/2012-05-06-installing-node-js-on-ubuntu.markdown @@ -0,0 +1,175 @@ +--- +layout: post +title: Installing Node.js on Ubuntu +author: David T. Sadler +description: This guide will show you how to install Node.js on Ubuntu. +categories: ["Node.js","Ubuntu"] +robots: follow, noodp, noydir, noarchive +comments: true +google_plus: true +twitter_share: true +facebook_like: true +published: true +licensed: true +--- +This guide will show you how to install Node.js on Ubuntu from either the source code or Git repository. I'm going to assume that you are using Ubuntu 12.04 (Precise Pangolin) and that you wish to install version 0.6.17 of Node.js. You're results may vary if you are using different versions. + +## Getting started. + +There are a few things that we require before we can install Node.js. Firstly we need a compiler which can be got by installing the `build-essential` package. This contains tools (such as the gcc complier, make tool, etc) for compiling/building software from source. + +{% highlight bash %} +sudo apt-get update +sudo apt-get install build-essential -y +{% endhighlight %} + +You will need `Git` if you are going to install from the repository. + +{% highlight bash %} +sudo apt-get install git -y +{% endhighlight %} + +Node.js itself requires very little in the way of dependencies. + +* python - Version 2.6 or 2.7. +* libssl-dev - You will need this if you plan to use SSL/TLS encryption. + +{% highlight bash %} +sudo apt-get install python libssl-dev -y +{% endhighlight %} + +Wtih the dependencies installed we can now move onto installing Node.js itself. Since there is a very good chance that Node.js has been updated since this was written, you should check the <a href="http://nodejs.org/#download" rel="external nofollow" target="_blank" title="Go to the Node.js website">website</a> for the latest version number and substitute it for the one used in the rest of this post. You have two options when it comes to the installation. You can download the source code or clone the Git repository. The process is similar for both methods and so you should choose which ever one you are comfortable with. I personally use Git as I find it easier to update Node.js to the latest version. + +* [Installing from source.](#from-source) +* [Installing with Git.](#via-git) + +<h2 id="from-source">Installing from source.</h2> + +You will need to download the tar archive of the source code and unpack it into a suitable directory. We will create this directory in `/usr/local/src`. Note that you will have to use the `sudo` command in order to write to this directory. + +{% highlight bash %} +cd /usr/local/src +sudo mkdir node +cd node +sudo wget http://nodejs.org/dist/v0.6.17/node-v0.6.17.tar.gz +sudo tar -xzvf node-v0.6.17.tar.gz +{% endhighlight %} + +We now need to enter the extracted directory and configure the code. The `configure` script checks your system to see if the required dependencies are present. Since we have installed these earlier it should report that everything is ok. Note that by default the `configure` script will ensure that Node.js is installed globally for the whole system. If you wish to install it for use by a single user you can follow the extra instructions [here](#single-user). + +{% highlight bash %} +cd node-v0.6.17 +sudo ./configure +{% endhighlight %} + +The `make` command can now be used to compile and install Node.js. + +{% highlight bash %} +sudo make +sudo make install +{% endhighlight %} + +This will result in the commands `node` and `npm` been installed into the `/usr/local/bin` directory. Now that Node.js has been installed you may wish to try the example [application](#application). + +## Upgrading from source. + +To upgrade Node.js from source simply download the latest tar archive and repeat the above installation process. The updated version will overwrite the previous version. + +<h2 id="via-git">Installing with Git.</h2> + +The first step is to clone the repository into a suitable directory. For this guide we will use `/usr/local/src`. Note that you will have to use the `sudo` command in order to write to this directory. + +{% highlight bash %} +cd /usr/local/src +sudo git clone git://github.com/joyent/node.git +{% endhighlight %} + +We can now enter the cloned repository and checkout the v0.6.17 branch. + +{% highlight bash %} +cd node +sudo git checkout v0.6.17 +{% endhighlight %} + +We now need to configure the source code by using the provided `configure` script. This checks your system to see if the required dependencies are present. Since we have installed these earlier it should report that everything is ok. Note that by default the `configure` script will ensure that Node.js is installed globally for the whole system. If you wish to install it for use by a single user you can follow the extra instructions [here](#single-user). + +{% highlight bash %} +sudo ./configure +{% endhighlight %} + +The `make` command can now be used to compile and install Node.js. + +{% highlight bash %} +sudo make +sudo make install +{% endhighlight %} + +This will result in the commands `node` and `npm` been installed into the `/usr/local/bin` directory. Now that Node.js has been installed you may wish to try the example [application](#application). + +## Upgrading via Git. + +To upgrade Node.js you need to go back into the cloned repository and pull down the latest source code. + +{% highlight bash %} +cd /usr/local/src/node +sudo git checkout master +sudo git pull origin master +{% endhighlight %} + +You can then checkout the version branch that you wish to upgrade to. To check which versions are available use the `git tag` command. The upgrade is then performed by using the normal install commands. + +{% highlight bash %} +sudo git checkout vx.x.x +sudo ./configure +sudo make +sudo make install +{% endhighlight %} + +<h2 id="single-user">Installing for a single user.</h2> + +Node.js can be easily installed for a single user with the modified process outlined below. For the sake of brevity I will show how to do this using the Git repository. The method is the same when using the source code. + +The idea is that we create a custom directory located in the user's home directory and configure Node.js to install itself there by using the `--prefix` option. For this example we will create a directory called `~/local/src` into which we will clone the Git repository. We then configure the code so that Node.js will be installed into the directory `~/local`. Note that because we are installing into the user's home directory we no longer need the `sudo` command. + +{% highlight bash %} +mkdir -p ~/local/src +cd ~/local/src +git clone git://github.com/joyent/node.git +cd node +git checkout v0.6.17 +./configure --prefix=~/local +make +make install +{% endhighlight %} + +The install process will create several new directories under the `~/local` directory. One of them is the `bin` directory that contains the `node` and `npm` commands. Since the system will not look in this directory when searching for commands entered by the user, we will need to update the `PATH` environment variable. + +{% highlight bash %} +echo 'PATH=$PATH:$HOME/local/bin' >> $HOME/.bashrc +source ~/.bashrc +{% endhighlight %} + +Now when ever you enter `node` or `npm` on the command line the system will know where to locate them. + +<h2 id="application">Example application.</h2> + +This example is taken directly from the Node.js <a href="http://nodejs.org" rel="external nofollow" target="_blank" title="Go to the Node.js website">website</a> and is a web server that responds with 'Hello World' for every request. + +{% highlight bash %} +cat > ~/server.js <<EOF +var http = require('http'); +http.createServer(function (req, res) { + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.end('Hello World\n'); +}).listen(1337, '127.0.0.1'); +console.log('Server running at http://127.0.0.1:1337/'); +EOF +{% endhighlight %} + +The server is started with the following command. + +{% highlight bash %} +node ~/server.js +{% endhighlight %} + +If everything has gone according to plan you should see 'Hello World' when you open a web browser at `http://localhost:1337/`. diff --git a/_site_build/about/index.html b/_site_build/about/index.html index 91a6aee..7b5656b 100644 --- a/_site_build/about/index.html +++ b/_site_build/about/index.html @@ -3,5 +3,14 @@ layout: default title: About --- <section id="about"> - <h1>About</h1> + <h1>About this site and me.</h1> + <h2>So who am I?</h2> + <p>My name is David T. Sadler and this is my website.</p> + <p>I have been programming in one language or another ever since being given an <a href="http://en.wikipedia.org/wiki/Acorn_Electron" rel="external nofollow" target="_blank" title="Link to Wikipedia entry on the Acorn Electron">Acorn Electron</a> as my first computer, and over the years I had mainly been developing in C++ before moving into web development.</p> + <h2>Oh god, not another blog?</h2> + <p>Yes I'm afraid so. It's always been in the back of my mind to produce a blog site as a way of developing new skills by writing about programming.</p> + <h2>Disclaimer</h2> + <p>I'm going to be honest and say that I hope this site generates enough traffic so that it can pay for itself. Whether it does remains to be seen though, but I won't know unless I try.</p> + <p>I'm also not claiming to be some programming genius. The articles that I write will be about my own opinions and experiences. I hope that readers will leave comments if they feel I need correcting on some technical point or opinion.</p> + <p>In case you was wondering, the T. stands for Terence, my father's name.</p> </section> diff --git a/_site_build/apple-touch-icon-114x114.png b/_site_build/apple-touch-icon-114x114.png Binary files differnew file mode 100755 index 0000000..cbd94f1 --- /dev/null +++ b/_site_build/apple-touch-icon-114x114.png diff --git a/_site_build/apple-touch-icon-57x57.png b/_site_build/apple-touch-icon-57x57.png Binary files differnew file mode 100755 index 0000000..c683bf9 --- /dev/null +++ b/_site_build/apple-touch-icon-57x57.png diff --git a/_site_build/apple-touch-icon-72x72.png b/_site_build/apple-touch-icon-72x72.png Binary files differnew file mode 100755 index 0000000..7498dfa --- /dev/null +++ b/_site_build/apple-touch-icon-72x72.png diff --git a/_site_build/apple-touch-icon.png b/_site_build/apple-touch-icon.png Binary files differnew file mode 100755 index 0000000..c683bf9 --- /dev/null +++ b/_site_build/apple-touch-icon.png diff --git a/_site_build/css/style.css b/_site_build/css/style.css index f8616dd..3c74375 100644 --- a/_site_build/css/style.css +++ b/_site_build/css/style.css @@ -276,6 +276,10 @@ section#archives ol { list-style-type: disc; } +#license { + text-align: center; +} + /* ==|== non-semantic helper classes ======================================== */ .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; } diff --git a/_site_build/favicon.ico b/_site_build/favicon.ico Binary files differnew file mode 100755 index 0000000..43dd5df --- /dev/null +++ b/_site_build/favicon.ico diff --git a/_site_build/img/localhost.magento-store.com.jpg b/_site_build/img/localhost.magento-store.com.jpg Binary files differnew file mode 100644 index 0000000..c7e6387 --- /dev/null +++ b/_site_build/img/localhost.magento-store.com.jpg |
