访问WR703N在OpenWrt的[Wiki页][wr703n-openwrt],然后在Flashing一节中找到下载链接:[squashfs-factory.bin][flash.bin],下载后别忘了[比对md5][md5sum]。[1]
进入路由器管理界面,出厂配置为http://192.168.1.1,用户名和密码均为admin,然后进入固件更新,选择下载的文件,然后更新。
| require "aliyun_sls" | |
| module Fluent | |
| class SlsOutput < Output | |
| Plugin.register_output('sls', self) | |
| def initialize | |
| super | |
| @sls_con = AliyunSls::Connection.new(ENV["PROJECT"], ENV["REGION"], ENV["SECRET"], ENV["KEY"]) | |
| @topic = `hostname`.strip |
| #! /usr/bin/env ruby | |
| require "rqrcode" | |
| require "uuid" | |
| require "erb" | |
| @qr = RQRCode::QRCode.new(ARGV[0]) | |
| file = File.expand_path($0) |
| #termcapinfo rxvt* 'hs:ts=\E]2;:fs=\007:ds=\E]2;\007' | |
| #hardstatus string "screen (%n: %t)" | |
| source /etc/screenrc | |
| altscreen off | |
| hardstatus none | |
| # hardstatus string '%{= kg}[ %H ][%{= kw}%= %?%-Lw%?%{R}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{W} %c %{g}]' | |
| # hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]' | |
| # hardstatus string "%{= bk} %{= wk} %-Lw%{bw}%n+%f %t%{wk}%{wk}%+Lw %=%{kw}%{= R}%{-}" | |
| # hardstatus string "%{= kw} %H %{wk} [%= %-Lw%{r}%n+%f %t%{k}%+Lw %= ] %{kw} %c %{kw}%{= R}%{-}" | |
| # hardstatus string "%{= rw} %H %{wk} %-Lw%{r}%n+%f %t%{wk}%+Lw %= %c%{kw}%{= R}%{-}" |
| 查看方法: | |
| tail -fn100 /var/log/nginx/access.log | |
| 例子: | |
| 58.16.228.134 - - [29/Aug/2012:10:47:20 +0800] "200" POST /api/v1/users/update_device_token?user_credentials=Z2caLs3BuAfZ0LKPe0 HTTP/1.1 "微电视 2.05 (iPhone; iPhone OS 5.1.1; zh_CN)" upstream_response_time 0.341 msec 1346208440.833 request_time 0.431 | |
| 日志格式: | |
| '$remote_addr - $remote_user [$time_local] "$status" $request "$http_user_agent" ' | |
| 'upstream_response_time $upstream_response_time ' | |
| 'msec $msec request_time $request_time'; |
| # Simple bijective function | |
| # Basically encodes any integer into a base(n) string, | |
| # where n is ALPHABET.length. | |
| # Based on pseudocode from http://stackoverflow.com/questions/742013/how-to-code-a-url-shortener/742047#742047 | |
| ALPHABET = | |
| "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split(//) | |
| # make your own alphabet using: | |
| # (('a'..'z').to_a + ('A'..'Z').to_a + (0..9).to_a).shuffle.join |
| # | |
| # Including this module in an OmniAuth strategy implementation allows it to have | |
| # a runtime-defined callback path extension. The callback path always begins | |
| # with the predefined callback path, but may extend it. Specify a callback path | |
| # extension at runtime by passing the 'callback' parameter to the request-phase | |
| # auth URL. For example, the below URL: | |
| # | |
| # http://your.host/auth/facebook?callback=users/create | |
| # | |
| # Will issue a callback to: |
| # If your workers are inactive for a long period of time, they'll lose | |
| # their MySQL connection. | |
| # | |
| # This hack ensures we re-connect whenever a connection is | |
| # lost. Because, really. why not? | |
| # | |
| # Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or somewhere similar) | |
| # | |
| # From: | |
| # http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/ |
| # 按照coreseek网站上的安装步骤没装上,所以采用了下面的安装方式,安装成功! | |
| sudo port install autoconf263 libtool-devel m4 autoconf automake libtool | |
| cd mmseg-3.2.14 | |
| aclocal && glibtoolize --copy --force --ltdl && autoreconf -i -f && automake --a && ./configure --prefix=/usr/local/mmseg3 && make && sudo make install | |
| cd ../csft-3.2.14 | |
| ./configure --prefix=/usr/local/coreseek --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-pgsql |
| sphinx: &using | |
| address: sphinx-server-host-ip | |
| bin_path: /usr/local/bin | |
| searchd_binary_name: searchd | |
| indexer_binary_name: indexer | |
| enable_star: 1 | |
| min_prefix_len: 3 | |
| prefix_fields: name | |
| mem_limit: 1024M | |
| morphology: 'none' |