Uninote
Uninote
用户根目录
每日点滴

<!DOCTYPE html> <html><head><meta http-equiv='Content-Type' content='text/html; charset=utf8'><title>mynote server</title> <script> var g_resRoot = '../../__res/'; var g_json_outline = '{"children":[{"children":[{"children":[],"level":2,"lvNumber":"1.1","text":"dev"}],"level":1,"lvNumber":"1","text":"tools"},{"children":[],"level":1,"lvNumber":"2","text":"workman"},{"children":[{"children":[],"level":2,"lvNumber":"3.1","text":"mynote test 部署"}],"level":1,"lvNumber":"3","text":"mynote test/dev server"},{"children":[{"children":[],"level":2,"lvNumber":"4.1","text":"重启后:"},{"children":[],"level":2,"lvNumber":"4.2","text":"重启后检查服务"},{"children":[],"level":2,"lvNumber":"4.3","text":"logs"},{"children":[],"level":2,"lvNumber":"4.4","text":"mysql log or log ana 的问题?"},{"children":[],"level":2,"lvNumber":"4.5","text":"logs/空间清理"}],"level":1,"lvNumber":"4","text":"mynote online server"},{"children":[],"level":1,"lvNumber":"5","text":"mynote 排错"},{"children":[],"level":1,"lvNumber":"6","text":"mynote 清空数据 test"},{"children":[],"level":1,"lvNumber":"7","text":"mynote 开机自启动"}],"level":0,"lvNumber":"","text":"mynote server"}'; </script> <link rel='stylesheet' type='text/css' href='../../__res/common.css'><style>.s0{color:#000000;} .s1{color:#0000ff;} .s2{color:#000000;} .s3{color:#0000ff;} .s4{color:#000000;} .s5{color:#000000;} .s6{color:#000000;} .s7{color:#000000;} .s8{color:#c80000;} .s9{color:#c80000;} </style> </head><body> <script src='../../__res/util.js'></script><div id='outline'> <li><a href='#ol_0' style='font-weight:bold; font-size:22px'>mynote server</a></li> <li> <a href='#ol_1' >tools</a></li> <li> <a href='#ol_2' >dev</a></li> <li> <a href='#ol_3' >workman</a></li> <li> <a href='#ol_4' >mynote test/dev server</a></li> <li> <a href='#ol_5' >mynote test 部署</a></li> <li> <a href='#ol_6' >mynote online server</a></li> <li> <a href='#ol_7' >重启后:</a></li> <li> <a href='#ol_8' >重启后检查服务</a></li> <li> <a href='#ol_9' >logs</a></li> <li> <a href='#ol_10' >mysql log or log ana 的问题?</a></li> <li> <a href='#ol_11' >logs/空间清理</a></li> <li> <a href='#ol_12' >mynote 排错</a></li> <li> <a href='#ol_13' >mynote 清空数据 test</a></li> <li> <a href='#ol_14' >mynote 开机自启动</a></li> </div>

<pre id='ol_0' class='title'>mynote server</pre> <pre><d class='s0'><a href='../aliyun.html#305b6d3b-cdaa-4ef4-acad-c3c8537bdc57'>aliyun 阿里云 </a></d></pre> <pre><d class='s0'><a href='../aliyun-servers.html'>aliyun-servers </a></d></pre> <pre><d class='s0'><a href='mynote_server.html'>mynote server </a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'><a href='../nginx.html'>nginx </a></d></pre> <pre><d class='s0'><a href='..\git/gogs.html'>gogs </a></d></pre> <pre><d class='s1'></d></pre> <h1 id='ol_1'>tools</h1> <pre><d class='s0'><a href='mynote_todo_index.html#97ce9858-49b9-44fa-ba6d-8c56d86466bb'>mynote tools prj </a></d></pre> <pre><d class='s1'></d></pre> <h2 id='ol_2'>dev</h2> <pre><d class='s1'><a href='http://47.97.186.229:81/'>http://47.97.186.229:81/</a></d></pre> <pre><d class='s1'></d></pre> <h1 id='ol_3'>workman</h1> <pre><d class='s0'><a href='../workerman.html#071f0e9d-2135-41ff-99b0-32680695c8e0'>workerman usage </a></d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>cd mynote/art_workman</d></pre> <pre><d class='s2'>php start.php stop</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>cd mynote/art_workman</d></pre> <pre><d class='s2'>php start.php start -d</d></pre> <pre><d class='s0'></d></pre> <t id='cb0f7556-8abb-40b8-b8db-c3315c2bf4e1'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_4'>mynote test/dev server</h1> <pre><d class='s0'>test1 back:<a href='../aliyun-servers.html#3a426793-71ae-4a43-a35d-fd319dada525'>mynote test </a></d></pre> <pre><d class='s0'>test1 front:<a href='../aliyun-servers.html#476731fa-4fca-4109-907e-c7bc32a848bd'>yxt aliyun server for 备案 </a></d></pre> <pre><d class='s3'></d></pre> <pre><d class='s0'><a href='pvt/mynote-zhh.html#56f60288-cac9-484d-88eb-d61ac61b92d4'>mynote 账号 dev </a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>就是要留下的数据总结:# gogs 仓库</d></pre> <pre><d class='s0'>/home/git/gogs</d></pre> <pre><d class='s0'>/home/git/gogs-repositories</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'># mysql 表</d></pre> <pre><d class='s0'>/root/databases_backup_20181112105821</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'># mynote 原笔记内容以及图片</d></pre> <pre><d class='s0'>/home/www/mynote/basic/web/docs/</d></pre> <pre><d class='s0'>/root/mynote/basic/web/link/take/lib/uploads</d></pre> <pre><d class='s4'></d></pre> <t id='8343a3c0-7dd9-4970-be19-94c3b5708c76'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h2 id='ol_5'>mynote test 部署</h2> <pre><d class='s0'><a href='mynote_init.html#6240c0c2-7466-4c96-b666-d1b9ed0f2bd7'>mynote_init </a></d></pre> <pre><d class='s1'></d></pre> <pre><d class='s0'><a href='..\es/es_sum.html#880e390c-b178-4b34-b730-5d7c11e74790'>es 部署文档 </a></d></pre> </t> </t> <pre><d class='s4'></d></pre> <t id='c30749ca-32b9-48e9-b03e-1fd04e97b6be'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_6'>mynote online server</h1> <pre><d class='s0'><a href='../aliyun-servers.html#2ca3cc2d-5a1f-4fd5-8486-0ff54ea14d01'>mynote online </a></d></pre> <pre><d class='s2'></d></pre> <h2 id='ol_7'>重启后:</h2> <pre><d class='s0'><a href='mynote_server.html#03ad7dde-72d1-4bc3-9a2d-2d069952a96c'>mynote 开机自启动 </a></d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>nginx</d></pre> <pre><d class='s2'>php-fpm</d></pre> <pre><d class='s2'>cd /etc/init.d</d></pre> <pre><d class='s2'>./redis start</d></pre> <pre><d class='s2'>cd /home/www/mynote/art_workman</d></pre> <pre><d class='s2'>su www # 注意要www用户</d></pre> <pre><d class='s2'>php start.php start -d</d></pre> <pre><d class='s4'>/etc/init.d/mysql start</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>su git</d></pre> <pre><d class='s2'>cd /home/git/gogs</d></pre> <pre><d class='s2'># as deamon:</d></pre> <pre><d class='s2'>./gogs web &</d></pre> <pre><d class='s2'></d></pre> <t id='4c073d4d-3e60-43c1-9aa3-1c766f156cbb'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h2 id='ol_8'>重启后检查服务</h2> <pre><d class='s0'><a href='mynote.html#fd4bf8b0-04f1-4da4-b262-37d84790b2d8'>mynote checks </a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s5'>netstat -anopt |grep mysql| grep LISTEN</d><d class='s2'></d></pre> <pre><d class='s2'>netstat -anopt |grep redis| grep LISTEN</d></pre> <pre><d class='s2'>netstat -anopt |grep php-fpm| grep LISTEN</d></pre> <pre><d class='s2'>netstat -anopt |grep nginx| grep LISTEN</d></pre> <pre><d class='s2'>netstat -anopt |grep gogs| grep LISTEN</d></pre> <pre><d class='s2'>netstat -anopt |grep java| grep LISTEN</d></pre> <pre><d class='s2'>netstat -anopt |grep WorkerMan| grep LISTEN</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>cmp E:\uninote\start-check1.txt & E:\uninote\start-check2.txt</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>sample output:</d></pre> <pre><d class='s2'>tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1354/mysqld off (0.00/0/0)</d></pre> <pre><d class='s2'>tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 1010/redis-server 1 off (0.00/0/0)</d></pre> <pre><d class='s2'>tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1429/php-fpm off (0.00/0/0)</d></pre> <pre><d class='s2'>tcp 0 0 0.0.0.0:81 0.0.0.0:* LISTEN 1425/nginx off (0.00/0/0)</d></pre> <pre><d class='s2'>tcp 0 0 0.0.0.0:82 0.0.0.0:* LISTEN 1425/nginx off (0.00/0/0)</d></pre> <pre><d class='s2'>tcp 0 0 0.0.0.0:85 0.0.0.0:* LISTEN 1425/nginx off (0.00/0/0)</d></pre> <pre><d class='s2'>tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 1482/./gogs off (0.00/0/0)</d></pre> <pre><d class='s2'>tcp 0 0 0.0.0.0:9200 0.0.0.0:* LISTEN 1503/java off (0.00/0/0)</d></pre> <pre><d class='s2'>tcp 0 0 0.0.0.0:9300 0.0.0.0:* LISTEN 1503/java off (0.00/0/0)</d></pre> <pre><d class='s2'>tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1454/WorkerMan off (0.00/0/0)</d></pre> <pre><d class='s2'>tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1628/node /usr/node off (0.00/0/0)</d></pre> </t> <pre><d class='s2'></d></pre> <h2 id='ol_9'>logs</h2> <pre><d class='s2'>/home/www/wwwlogs</d></pre> <pre><d class='s0'><a href='..\pub/log_ana.html#5346e0d5-0cd1-4cfa-9bf5-4f2fd02ce03a'>log parser/ana </a></d></pre> <pre><d class='s0'><a href='iindex.html#550aa161-b248-440a-ae14-44e54defc46a'>mynote tool links </a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s2'></d></pre> <t id='e5c95bb1-288d-4f68-b2d8-c26853e9e506'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h2 id='ol_10'>mysql log or log ana 的问题?</h2> <pre><d class='s2'><img src='..\pic\badffad988cb299ea242c99aa57accf2.jpg' /></d><d class='s2'></d></pre> <pre><d class='s2'>可能是 log ana 的数据量太大了,然后被搜索引擎的蜘蛛访问了</d></pre> </t> <pre><d class='s0'></d></pre> </t> <pre><d class='s4'></d></pre> <t id='e227fa3d-6366-4756-bd7c-b8128ae49075'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h2 id='ol_11'>logs/空间清理</h2> <pre><d class='s0'><a href='..\linux/linux_cmds.html#8d0b5bda-54ab-49d0-ba55-a41e65018abe'>磁盘空间统计 du df </a></d></pre> <pre><d class='s0'>log_analysis/ana_logs.txt</d></pre> <pre><d class='s0'>runtime/logs/logs.txt</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>/tmp/mysql.log 清理sh:</d></pre> <pre><d class='s4'>/etc/init.d/mysql stop</d></pre> <pre><d class='s4'>cd /tmp </d></pre> <pre><d class='s4'>echo "" > mysql.log</d></pre> <pre><d class='s4'>/etc/init.d/mysql start</d></pre> <pre><d class='s4'></d></pre> <pre><d class='s0'>再依次postman中 删除mynote索引、初始化es、重新索引全部文章。</d></pre> <pre><d class='s0'></d></pre> </t> <pre><d class='s0'></d></pre> <t id='5b5215f5-0a94-4429-ac61-317e80ac7be9'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <pre><d class='s0'>每个git仓库的HEAD日志也会很大</d></pre> <pre><d class='s6'>$ cat .git/HEAD</d></pre> <pre><d class='s6'>ref: refs/heads/master</d></pre> <pre><d class='s0'>checkout master 需要检测,会导致log很大。</d></pre> </t> <pre><d class='s1'></d></pre> <t id='e64703e3-93a1-4506-885f-672ce5ab7dde'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_12'>mynote 排错</h1> <pre><d class='s0'><a href='mynote.html#fd4bf8b0-04f1-4da4-b262-37d84790b2d8'>mynote checks </a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'><a href='mynote_server.html#e227fa3d-6366-4756-bd7c-b8128ae49075'>logs/空间清理 </a></d></pre> <pre><d class='s0'>服务都启动的了?<a href='mynote_server.html#c30749ca-32b9-48e9-b03e-1fd04e97b6be'>mynote online server </a></d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>logs:</d></pre> <pre><d class='s0'><a href='iindex.html#550aa161-b248-440a-ae14-44e54defc46a'>mynote tool links </a></d></pre> <pre><d class='s3'></d></pre> <pre><d class='s7'>本地开发,卡死,api request network 一直 pending:</d></pre> <pre><d class='s0'>gogs、es等放在虚拟机中的服务,要确认能否访问。<a href='..\software/vmware.html#bcf612f5-b1dc-4142-9a6f-38c06209041d'>vm 双网卡不同子网问题 </a></d></pre> <pre><d class='s0'><a href='..\software/vmware.html#610b202a-6d0b-4f41-aa15-373f5c66529c'>centos vm register </a></d></pre> <pre><d class='s3'></d></pre> </t> <pre><d class='s1'></d></pre> <h1 id='ol_13'>mynote 清空数据 test</h1> <pre><d class='s2'></d></pre> <pre><d class='s2'>tmp_path=/tmp/mynote_init.sql</d></pre> <pre><d class='s2'>cat /home/www/mynote/sql/.sql > $tmp_path</d></pre> <pre><d class='s2'>sed -i "s/CREATE DATABASE/-- /" $tmp_path</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>mysql -u root -proot <<ENDTAG</d></pre> <pre><d class='s2'>use mynote</d></pre> <pre><d class='s2'>source $tmp_path</d></pre> <pre><d class='s2'>ENDTAG</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s8'>-- todo 清空 日志记录数据。。 es 数据</d><d class='s2'></d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>su - www -c '</d></pre> <pre><d class='s2'>cd /home/www/mynote</d></pre> <pre><d class='s2'>rm -rf /home/www/mynote/basic/web/docs</d></pre> <pre><d class='s2'>git reset --hard</d></pre> <pre><d class='s2'>'</d></pre> <pre><d class='s0'></d></pre> <t id='03ad7dde-72d1-4bc3-9a2d-2d069952a96c'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_14'>mynote 开机自启动</h1> <pre><d class='s9'>/etc/rc.local <a href='..\linux/linux.html#15dca64a-c85e-42c6-b7ed-bc12cfca1a24'>linux 环境变量 env </a></d><d class='s0'></d></pre> <pre><d class='s0'><a href='..\linux/linux_cmds.html#82fd52fe-8800-48a0-b0f2-8ba27c4ad7c3'>linux deamon process; background; nohup </a></d></pre> <pre><d class='s0'><a href='mynote_server.html#4c073d4d-3e60-43c1-9aa3-1c766f156cbb'>重启后检查 </a></d></pre> <pre><d class='s3'></d></pre> <pre><d class='s7'># for vm centos</d></pre> <pre><d class='s7'>service iptables stop</d></pre> <pre><d class='s7'></d></pre> <pre><d class='s5'># debug时打开排错,然后在shell中设置PATH为下面的输出值,模拟启动时的环境</d></pre> <pre><d class='s5'># echo $PATH > /tmp/start_env.log</d><d class='s7'></d></pre> <pre><d class='s7'></d></pre> <pre><d class='s7'># 设置需要的 PATH</d></pre> <pre><d class='s7'>export PATH=/usr/node10/bin/:/usr/local/nginx/sbin/:/usr/local/php/sbin/:$PATH</d></pre> <pre><d class='s7'></d></pre> <pre><d class='s2'>nginx</d></pre> <pre><d class='s2'>php-fpm</d></pre> <pre><d class='s2'>cd /etc/init.d</d></pre> <pre><d class='s2'>./redis start</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s2'>su - www -c '</d></pre> <pre><d class='s2'>cd /home/www/mynote/art_workman</d></pre> <pre><d class='s2'>php start.php start -d</d></pre> <pre><d class='s2'>'</d></pre> <pre><d class='s2'></d></pre> <pre><d class='s0'>su - git -c '</d></pre> <pre><d class='s0'> cd /home/git/gogs</d></pre> <pre><d class='s0'> nohup ./gogs web &</d></pre> <pre><d class='s0'>'</d><d class='s7'></d></pre> <pre><d class='s7'></d></pre> <pre><d class='s7'>su - es -c '</d></pre> <pre><d class='s7'> cd elasticsearch-6.7.1</d></pre> <pre><d class='s7'> nohup bin/elasticsearch &</d></pre> <pre><d class='s7'>'</d></pre> <pre><d class='s7'></d></pre> <pre><d class='s7'># front server:</d></pre> <pre><d class='s7'>cd /home/front/</d></pre> <pre><d class='s7'>pm2 start npx -- nuxt start</d></pre> <pre><d class='s7'></d></pre> </t> </d></pre> </body></html>

mynote_res

mynote_tests

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