网络资源的拷贝粘贴 备份参考之用


30 January 2008

Set Up Your Own Weblog : Lamp Stack

Setup your own apache server to host your weblog free

November 1st, 2007 mysurface Posted in Beginners, mysql, Admin | Hits: 11974 |

Do you feel like you want to create your own blog? Earn some side income through blogging by putting adsense, advertlets, or some other ads? But you want to start it up free of charge, just to try it out. You may think of blogspot. Google has provided a free blog space with tools for you to start off, it does allows you to place your adsense ads on blogspot.

But blogspot have few disadvantages, firstly blogspot can't be accessed from some countries, obviously from China. Secondly, accessing to blogspot sometimes slow, and it is not so feature rich, I can't customize my blog theme easily, do not support php, limited space.

Therefore, you may feel like want to own a dedicated web server. But you want it to be free of charge. Can I get it? The answer is Yes, with few requirements.

  • You need to have a PC that can get access to the internet 24/7.
    (You are not required to have static IP)
  • You need to install Linux on that PC.
    (Okay, this is not mandatory, but the guides below will only covers on Linux.)
  • An account from http://www.no-ip.com/.
    (You can get register to any free dynamic DNS provider besides no-ip, but this post only covers for no-ip users.)
  • Download Wordpress and learn up how to blog using Wordpress.
  • Required to setup port forwarding at your router
  • Thats all you need. Lets look how to set it up step by step.

    Step 1: Install linux ( I ll suggest Ubuntu)
    Howtoforge has covered a complete web servers installation using Ubuntu 7.10. My goal is to build up a simple personal web server, I do not need all the packages that Howtoforge suggested.

    The important stuff we need is LAMP stack! LAMP stack sounds very professional, but it is actually some famous apps on Linux. Linux - Apache - Mysql and PHP, that makes up LAMP.

    apt-get install mysql-server mysql-client libmysqlclient15-dev apache2 apache2-doc apache2-utils libapache2-mod-php5 php5 php5-common php5-mysql

    After that, enable some apache additional modules

    a2enmod rewrite
    a2enmod include
    /etc/init.d/apache2 force-reload

    Fire up your internet browser and type localhost in the url text box. Try to see whether you can access Apache default web page.

    Step 2: Download and install Wordpress on your LAMP stack ready machines.
    You can easily down wordpress at wordpress.org. You just need to unzip it to /var/www, and change the folder name. for example, blog. Access the readme.html from your firefox, http://localhost/blog/readme.html. Read up the installation guide. Basically, you are requested to edit wp-config.php, create mysql user and database.

    To create user for mysql, follow the simple steps here

    mysql -u root

    You may have root password for your mysql. If that is the case, you need to add -p to specified your password.

    mysql -u root -p yourpasswd

    Next, create the user.


    mysql> GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'localhost'
    -> IDENTIFIED BY 'mysqlpasswd' WITH GRANT OPTION;
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'%'
    -> IDENTIFIED BY 'mysqlpasswd' WITH GRANT OPTION;

    After that, logout mysql and login again with your new mysql user account

    mysql -u mysqluser -p

    Now, create the database:

    mysql> create database dbname;

    Last step, edit your wp-config.php in the folder accordingly. You may cp it from a sample config, wp-config-sample.php. Finally, access http://localhost/blog/wp-admin/install.php to install.

    Step 3: Register an account at no-ip, and choose a url
    Register it at http://www.no-ip.com, Login and select a sub domain from them totally free. Find Hosts/redirect at left sidebar, and click Add to choose your url.

    Step 4: Setup Port forwarding at your router
    This is a bit tricky, and its hard for me to illustrate here, because different brand of router may have different ways of setup port forwarding, you will need to check out your router's manual, or contact your router's technical support. You may try to search around the web admin pages in your router with keyword such as "port range forward", "virtual server" , etc. Remember you are required to forward port 80 to your Computer's Local Lan IP, for example, if you are using linksys, it will be look like this:

    Port forwarding on linksys wireless router

    Step 4: Start to blog and ask your friends try to access your blog over the internet.
    You can now try to login with your URL, let say if I choose mysurface.no-ip.net, I will connect to my blog with http://mysurface.no-ip.net/blog. And ask your friend try to access to verify whether have you successfully forward the port. If every things goes smooth, you may start to blog.

    Responsibilities and Caution
    You PC are now connected to the world of Internet, you are responsible to make sure your PC secure, read up web server security articles, web log analysis, how to setup firewall, intruder detection system, etc.

    Make sure you backup your mysql database, wordpress folder weekly to other places, you don't want to lose your data, if anythings happen. You may write a script to upload to your gmail.

    Automated Dynamic IP update
    Due to the fact, you are leasing dynamic IP from your ISP, your global IP may change periodically, no-ip offers a script that allow your PC to automatically sync your new global IP and your URL. You can download the script HERE.

    Summary
    It seems to be quite complicated to setup a web server for beginners. This post will served as a guideline and didn't go into very details, you may need to google it or ask around in the forums if you have stuck along the process. Have fun and wish you all the best on setting up your own dedicated Apache web server.

    As an encouragement, let me tell you one thing. Linux by Examples projects are begins with this setup.

    Morpheus: I'm trying to free your mind, Neo. But I can only show you the door. You're the one that has to walk through it.
    The Matrix, movie

    Technorati Tags: , , , ,

    Isn't it good if you can be part of it?

    Web 2.0 workplaces [PICS]
    cohen's Avatar
    3 Days Ago
    Web 2.0 is special. And so are the places that make it happen.
    Here's how the offices of web 2.0 companies look like. I've also added descriptions to each site in case you've been living in a bubble and don't know what they do.



    Loved and hated by many and founded in march of 2006, Twitter is a social networking and micro-blogging site that allows users to post their latest updates. An update is limited by 140 characters and can be posted through three methods: web form, text message, or instant message.





    The Twitter door.





    The social network of the moment. On February 4th, 2004 Mark Zuckerberg launched The Facebook, a social network that was at the time exclusively for Harvard students. It was a huge hit, in 2 weeks, half of the student body at Harvard had signed up. Other schools in the Boston area began demanding a Facebook network. Zuckerberg immediately recruited his friends Dustin Moskowitz and Chris Hughes to help build Facebook, and within four months, Facebook added 30 more college networks.

    With this success, Zuckerberg, Moskowitz and Hughes moved out to Palo Alto for the summer and rented a sublet. A few weeks later, Zuckerberg ran into the former cofounder of Napster, Sean Parker. Parker soon moved in to Zuckerberg's apartment and they began working together. Parker provided the introduction to their first investor, Peter Thiel, cofounder of PayPal and managing partner of the Founders Fund. Thiel invested $500,000 into Facebook.
    And big Facebook was born.





    Mark putting some to-do items in the impossible whiteboard behind the cabinet









    Digg is a user driven social content website. Everything on Digg is user-submitted. After you submit content, other people read your submission and "Digg" what they like best. If your story receives enough Diggs, it's promoted to the front page for other visitors to see.

    In the fall of 2004, Kevin Rose came up with the idea for Digg. He found programmer Owen Bryne through eLance.com and paid him $10/hour to develop the idea. In addition, Rose paid $99 per month for hosting and $1,200 for the Digg.com domain. In December of 2004, Kevin launched his creation to the world through a post on his blog.




    Craigslist is a man's online classifieds that anyone can use. It cuts straight to the chase without all the frills, and without crying while still telling you that "everything is okay". Everyone appreciates this, because when you want to find a free box of computer parts from 1995 or an apartment in NYC, you need something that just works.









    Mozilla is an open-source software project that uses a community-based approach to develop and provide applications such as the Firefox web browser and Thunderbird email client.
    Firefox is possibly the safest and most sophisticated web browser in existence to date. Its drawing appeal and wonderful security is an essential for any desktop, laptop or notebook owner.










    Joost is a p2p on demand video player that offers professional (legal) programming much like on your television, but whenever you want. With very heavy backing from media giants, Joost looks good to take on competitors.








    Former game designers Stewart Butterfield and Caterina Fake created Flickr, an online photo sharing network, in 2004. Flickr, which began as a photo-sharing feature of their gaming project, has since then blossomed into one of the premire photo-sharing sites on the web. Yahoo! purchased Flickr for $35 million in March of 2005.








    This service pays attention to what you listen to, in order to recommend other music that is similar, while allowing you to do the most fun activity of music, listening to it.








    Founded in July 2006 by Jyri Engestrom and Petteri Kopponen, Jaiku is a micro-blogging and social networking site based in Finland. As a free service, it allows users to post thoughts, or "Jaikus," via the web or using the mobile phone. By allowing people to check their friends' posts or to update their own micro-blog stream, Jaiku can be used as a way for individuals to remain in constant contact with others. It is now part of Google.







    LinkedIn allow their users to form connections with business associates whom they trust. The service can also be used to list jobs, find jobs, or even just plain talk business.







    Netvibes is one of the pioneers of the personalized home page. Netvibes lets you assemble all your favorite widgets, feeds, social networks, email, videos and blogs on one fully-customizable page.








    Launched in 2005, Reddit is a social news website that displays news based on your personal preferences and what the community likes. Your preferences are determined based on your history of voting stories up or down.

    The company was started by two University of Virginia grads in the Y Combinator program and two others (Christopher Slowe and Aaron Swartz) later joined the team.






    1 2

    老北京童谣



    糖瓜祭灶,新年来到;

    姑娘要花,小子要炮;

    老头儿要顶新毡帽,

    老太太要件新棉袄。


    小孩儿小孩儿你别馋,过了腊八就是年;

    腊八粥,喝几天,哩哩啦啦二十三;二十三,糖瓜粘;二十四扫 房子;

    二十五,冻豆腐;二十六,去买肉;

    二十七,宰公鸡;二十八,把面发;  

    二十九,蒸馒头;三十晚上熬一宿;

    初一、初二满街走。

    The First Programmer in the World is a Women

    Ada Lovelace

    From Wikipedia, the free encyclopedia

    Jump to: navigation, search
    Ada Lovelace

    orn December 10, 1815(1815-12-10)
    Piccadilly Terrace, London, England
    Died November 27, 1852 (aged 36)
    6 Great Cumberland Place, Marylebone, London, England

    Augusta Ada King, Countess of Lovelace (December 10, 1815 London, EnglandNovember 27, 1852 Marylebone, London, England [1]), born Augusta Ada Byron, is mainly known for having written a description of Charles Babbage's early mechanical general-purpose computer, the analytical engine. She is also known as the "first programmer".

    Contents

    [hide]

    [edit] Biography

    Ada was the first legitimate child of the poet Lord Byron and his wife, Anne Isabella Milbanke. She was named after Byron's half-sister, Augusta Leigh, whose child he was rumoured to have fathered. Ada was born on December 10, 1815, London, England. On January 16, 1816, Anne Isabella left Byron, taking 1-month old Ada with her. On April 21, Byron signed the Deed of Separation and left England for good a few days later.

    Ada never met her younger half-sister, Allegra Byron, daughter of Lord Byron and Claire Clairmont, who died at the age of five in 1822. Ada did have some contact with Elizabeth Medora Leigh, the daughter of Byron's half-sister Augusta Leigh. Ada and Medora were told by Ada's mother that Byron was Medora's father.

    Ada lived with her mother, as is apparent in her father's correspondence concerning her. Lady Byron was also highly interested in mathematics (Lord Byron once called her "the princess of parallelograms"), which dominated her life, even after marriage. Her obsession with rooting out any of the insanity of which she accused Lord Byron was one of the reasons why Annabella taught Ada mathematics at an early age. Ada was privately home schooled in mathematics and science by William Frend, William King and Mary Somerville. One of her later tutors was Augustus De Morgan. An active member of London society, she was a member of the Bluestockings in her youth.

    Ada Lovelace
    Ada Lovelace

    In 1835 she married William King, 8th Baron King, later 1st Earl of Lovelace. They had three children; Byron born 12 May 1836, Annabella (Lady Anne Blunt) born 22 September 1837 and Ralph Gordon born 2 July 1839. The family lived at Ockham Park, at Ockham, Surrey. Her full name and title for most of her married life was The Right Honourable Augusta Ada, Countess of Lovelace. She is widely known in modern times simply as Ada Lovelace, or by her maiden name, Ada Byron.

    She knew and was taught by Mary Somerville, noted researcher and scientific author of the 19th century, who introduced her in turn to Charles Babbage on June 5, 1833. Other acquaintances were Sir David Brewster, Charles Wheatstone, Charles Dickens and Michael Faraday.

    During a nine-month period in 1842–1843, Ada translated Italian mathematician Luigi Menabrea's memoir on Babbage's newest proposed machine, the Analytical Engine. With the article, she appended a set of notes which specified in complete detail a method for calculating Bernoulli numbers with the Engine, recognized by historians as the world's first computer program. Biographers debate the extent of her original contributions, with some holding that the programs were written by Babbage himself. Babbage wrote the following on the subject, in his Passages from the Life of a Philosopher (1846)[2]:

    I then suggested that she add some notes to Menabrea's memoir, an idea which was immediately adopted. We discussed together the various illustrations that might be introduced: I suggested several but the selection was entirely her own. So also was the algebraic working out of the different problems, except, indeed, that relating to the numbers of Bernoulli, which I had offered to do to save Lady Lovelace the trouble. This she sent back to me for an amendment, having detected a grave mistake which I had made in the process.

    Lovelace's prose also acknowledged some possibilities of the machine which Babbage never published, such as speculating that "the Engine might compose elaborate and scientific pieces of music of any degree of complexity or extent."

    [edit] Interaction with Charles Babbage

    Ada met and corresponded with Charles Babbage on many occasions, including socially and in relation to Babbage's Difference Engine and Analytical Engine. Their relationship was not of a romantic nature.

    Ada was one of the few people who fully understood Babbage's ideas and created a program for the Analytical Engine. Had the Analytical Engine ever actually been built, her program would have been able to calculate a sequence of Bernoulli numbers. Based on this work, Lovelace is now widely credited with being the first computer programmer.

    Babbage was impressed by Ada's intellect and writing skills. He called her "The Enchantress of Numbers". In 1843 he wrote of Ada:[3]

    Forget this world and all its troubles and if possible its multitudinous Charlatans - every thing in short but the Enchantress of Numbers.

    The level of impact of Ada on Babbage's engines are the subject of debate. The debate is difficult to resolve due to Charles Babbage's tendency to not acknowledge (either verbally or in writing) the influence of other people in his work.

    [edit] Death

    Ada Lovelace was bled to death at the age of 36 by her physicians, who were trying to treat her uterine cancer. She perished at the same age as her father and from the same cause: medicinal bloodletting. She left two sons and a daughter, Lady Anne Blunt, famous in her own right as a traveller in the Middle East and a breeder of Arabian horses, co-founder of the Crabbet Arabian Stud.

    At her request, Lovelace was buried next to the father she never knew at the Church of St. Mary Magdalene in Hucknall, Nottingham.

    Over one hundred years after her death, in 1953, Ada Lovelace's notes on Babbage's Analytical Engine were republished after being forgotten. The engine has now been recognized as an early model for a computer and Ada Lovelace's notes as a description of a computer and software.

    [edit] References within computer science

    [edit] Popular cultural references

    [edit] Publications

    [edit] See also

    [edit] References

    1. ^ GRO Register of Deaths: DEC 1852 1a * MARYLEBONE - Augusta Ada Lovelace
    2. ^ (from an excerpt found in Perspectives on the Computer Revolution (1970), edited by Zenon Pylyshyn)
    3. ^ Toole, Betty (1998). "Acknowledgments", The Enchantress of Numbers. Critical Connection. ISBN 0912647183. 

    [edit] External links

    Wikimedia Commons has media related to:
    Google