Uninote
Uninote
用户根目录
每日点滴

<!DOCTYPE html> <html><head><meta http-equiv='Content-Type' content='text/html; charset=utf8'><title>workman for windows</title> <script> var g_resRoot = '../../../__res/'; var g_json_outline = '{"children":[{"children":[],"level":1,"lvNumber":"1","text":"服务启动"},{"children":[],"level":1,"lvNumber":"2","text":"更新docs"},{"children":[],"level":1,"lvNumber":"3","text":"更新到数据库"},{"children":[],"level":1,"lvNumber":"4","text":"linux合并"}],"level":0,"lvNumber":"","text":"workman for windows"}'; </script> <link rel='stylesheet' type='text/css' href='../../../__res/common.css'><style>.s0{color:#000000;} .s1{color:#000000;} .s2{color:#0000ff;} .s3{color:#c80000;} .s4{color:#000000;} .s5{color:#808080;} .s6{color:#000080;} .s7{color:#000000;} </style> </head><body> <script src='../../../__res/util.js'></script><div id='outline'> <li><a href='#ol_0' style='font-weight:bold; font-size:22px'>workman for windows</a></li> <li> <a href='#ol_1' >服务启动</a></li> <li> <a href='#ol_2' >更新docs</a></li> <li> <a href='#ol_3' >更新到数据库</a></li> <li> <a href='#ol_4' >linux合并</a></li> </div>

<pre id='ol_0' class='title'>workman for windows</pre> <pre><d class='s0'><a href='..../workerman.html'>workerman </a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>如果要调试,需要使用script方式,而非web;这种方式会需要手动kill php进程。</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>此服务目前用于将监听basic\web\docs下的文档更新,在文档更新后提取文档摘要和第一个张图片。</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>E:\uninote\mynote\art_workman_win\do_all.bat</d></pre> <pre><d class='s1'>E:\uninote\mynote\art_workman_win\start.bat</d></pre> <pre><d class='s1'></d></pre> <h1 id='ol_1'>服务启动</h1> <pre><d class='s2'></d></pre> <pre><d class='s3'>先启动redis</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s3'>进入mynote根目录下的art_workman_win,执行:</d><d class='s0'></d></pre> <pre><d class='s0'>php start.php</d></pre> <pre><d class='s0'># 以当前路径为doc root启动一个webserver,监听8080端口</d></pre> <pre><d class='s0'>$webserver = new WebServer('<a href='http://0.0.0.0:8080'>http://0.0.0.0:8080</a>');</d></pre> <pre><d class='s0'>$webserver->addRoot('localhost', DIR);</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>正常应该是如下:</d></pre> <pre><d class='s0'><img src='....\pic\b5ca441b81dcb6cee651ddf313b0f939.jpg' /></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>然后不要关闭这个窗口,也不要点击ctrl+C,否则webserver的服务就终止了。。。</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>---new</d></pre> <pre><d class='s4'>先启动redis</d></pre> <pre><d class='s4'>检查user.txt 确认用户</d></pre> <pre><d class='s4'>update.sh/init.sh</d></pre> <pre><d class='s4'>E:\uninote\mynote\art_workman_win\do_all.bat</d></pre> <pre><d class='s0'></d></pre> <h1 id='ol_2'>更新docs</h1> <pre><d class='s0'>首先进入basic\web\docs,确保存在users.txt文件,将自己的user id写入,并以回车结尾:</d></pre> <pre><d class='s0'><img src='....\pic\1012199f1b740993cd4c36fb30d172a4.jpg' /></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>启动git bash,执行命令:</d></pre> <pre><d class='s0'>./update.sh</d></pre> <pre><d class='s0'>此命令将自动初始化用户doc目录,并拉取文档到最新状态,再通过curl请求通知webserver文件有更细。webserver记录更新了的文档到redis。</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s3'>全部初始化(之前必须执行过update.sh,这里不会clone):./init.sh,</d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>update.sh/init.sh都是请求8080端口index.php:</d></pre> <pre><d class='s5'>/接收参数接口/</d></pre> <pre><d class='s5'>/</d></pre> <pre><d class='s5'> webServer 服务</d></pre> <pre><d class='s5'>* 接收get请求的参数</d></pre> <pre><d class='s5'>* 查看文件进行解析处理文件到redis列表</d></pre> <pre><d class='s5'>*/</d></pre> <pre><d class='s6'>public static function </d><d class='s7'>index1()</d></pre> <pre><d class='s0'></d></pre> <h1 id='ol_3'>更新到数据库</h1> <pre><d class='s1'>在浏览器中输入地址<a href='http://127.0.0.1:8080/process.php并回车'>http://127.0.0.1:8080/process.php并回车</a>,然后不停刷新,知道看到类似的带OKAY输出为止。</d><d class='s2'></d></pre> <pre><d class='s2'><img src='....\pic\e0478198edb171644a5d4a0c6415c23d.jpg' /></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <h1 id='ol_4'>linux合并</h1> <pre><d class='s4'>合并之后,可以不再使用start.php的web方式</d></pre> <pre><d class='s4'>目前直接使用apache,root设置为:E:\uninote\mynote\art_workman_win:</d></pre> <pre><d class='s4'>D:\Apache24_ng\conf\extra\httpd-vhosts.conf</d></pre> <pre><d class='s4'><VirtualHost *:8080></d></pre> <pre><d class='s4'> ServerAdmin webmaster@a.wm.my</d></pre> <pre><d class='s4'> DocumentRoot "E:\uninote\mynote\art_workman_win"</d></pre> <pre><d class='s4'> <Directory "E:\uninote\mynote\art_workman_win"></d></pre> <pre><d class='s4'> Options Indexes FollowSymLinks</d></pre> <pre><d class='s4'> AllowOverride All</d></pre> <pre><d class='s4'> Require all granted</d></pre> <pre><d class='s4'> </Directory></d></pre> <pre><d class='s4'> ServerName a.wm.my</d></pre> <pre><d class='s4'> ServerAlias a.wm.my</d></pre> <pre><d class='s4'> ErrorLog "logs/a.wm.my-error.log"</d></pre> <pre><d class='s4'> CustomLog "logs/a.wm.my-access.log" common</d></pre> <pre><d class='s4'> DirectoryIndex index.php</d></pre> <pre><d class='s4'></VirtualHost></d></pre> </body></html>

网站

eson_done

点赞(0) 阅读(59) 举报
目录
标题