就是一行命令10秒钟架设一个blog站点


在Ubuntu Linux下,你在命令终端下输入:nb,回车,系统会提示你:

    The program 'nb' is currently not installed. You can install it by typing:
    sudo apt-get install nanoblogger
    bash: nb: command not found(意思是nb程序未安装,你可以通过输入命令sudo apt-get install nanoblogger安装它)
    那就输入命令:
    sudo apt-get install nanoblogger

    没过一会,就十几秒的时间(nb程序体积很小,仅80多k),nb程序自动下载并安装了。然后我们再看看使用方法:
    nb --help

    输出帮助信息为:

   NanoBlogger - Console weblog engine.
Version 3.3, by Kevin Wood <n1xt3r@fastmail.fm>

Usage:
nb [-b blog_dir] [options]

Options:
-a, --add               create new entry, category, or weblog
                   (directory).
-b, --blogdir <directory>       specify weblog directory.
-B, --body <text>           deprecated, please use '-T' or '--text'
                    instead.
-c, --category   <ID,cat>       specify category (for '--add',
                   '--delete', '--edit', '--list',
                   '--update', and '--update-cache').
--cfgfile <file>           specify an alternate configuration file.
--configure               configure weblog (for '--update').
--datadir <directory>           specify weblog's data directory.
-d, --delete <ID,cat>           delete an entry or category.
-D, --desc <text>           set text of description (for '--add',
                    '--draft', '--makefile' and
                    '--makepage').
-e, --edit <ID,cat>           edit an entry or category.
-E, --draft <file>            edit or create metafile.
-f, --file <file>            specify metafile to import as entry
                    (for '--add').
-h, --help               show this help message.
-i, --interactive <1=on/0=off>    toggle interactive mode (for '--add',
                    '--delete', '--preview', '--publish',
                    and '--update').
-l, --list <all,cat,DATE,max>       list entries or categories (defaults to
                    max).
--manual               view the manual.
-m, --move <ID>           move an entry to a specified
                   category (for '--category').
-M, --makepage <file1> <file2>    create new weblog page (file2) from
                   metafile (file1).
--makefile <file>            create new metafile.
-n, --author <text>           set text of author (for '--add',
                   '--draft', '--makefile' and
                    '--makepage').
--plugindir <directory>        specify weblog's plugin directory.  
-p, --preview               run command to preview weblog.
-P, --publish               run command to publish weblog.
-q, --query <DATE>           specify a query to run (for '--edit' and
                    '--delete').
--template <file>           specify file to load as template (for
                    '--draft', '--makepage' and
                    '--makefile').
--template-dir <directory>       specify weblog's template directory.
-t, --title <text>           set text of title (for '--add',
                   '--category', '--draft',
                    '--makefile' and '--makepage').
--tag <TAG>              specify tag (for '--add', '--draft',
                   '--edit', '--makefile' and
                    '--makepage').
--tag-text <text>            set text of tag (for '--tag').
-T, --text <text>            set text of body (for '--add',
                   '--draft', '--makefile' and
                    '--makepage').
-U, --update-cache <all,DATE,max,expired>
                    force update of weblog's cache removing
                    specified cached data (defaults to
                    'expired').
-u, --update <all,DATE,main,max>    force update of weblog's files updating
                    specified weblog data (defaults to
                    'max').
-v, --verbose <1=on/0=off>       toggle level of verbosity.
-V, --version               display version information.

-c,-d,-e,-m accepts multiple ID numbers seperated by commas (e.g. 1,2,3).

--list and --update can match entries by date (irrelevant of entry id(s)).
date = YYYY-MM-DD, YYYY-MM, YYYY

Examples:

specify the weblog directory to create or add new entry
   nb -b ~/public_html/weblog -a

create new category and title it "News"
   nb -b ~/public_html/weblog -t "News" -c new -a

create new entry using nothing but command line options!
   nb -b ~/public_html/weblog -n 'myname' -t 'Title' -T 'Text!' -a

More info:
URL: http://nanoblogger.sourceforge.net


    哦,提示不少可用命令操作。先建立一个博客吧,在本地服务器的blog目录下建立一个blog(可以多用户哦),命令是:
    nb -b /var/www/blog/ -a
然后就可以通过浏览器访问咯:

   

    至于怎么写blog,可以通过命令行直接写,也可以用任意编辑器撰写好再导入,那都不是难题。
    这个NanoBlogger对空间需求不高,不需要任何数据库,纯静态HTML空间就可以了。功能还是很全面的,还有插件支持哦。博客升级就更简单了,博客可以直接在系统更新时升级。

    现在你知道什么是nb了吧?


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3