Uninote
Uninote
用户根目录
每日点滴
 mynote server
mynote server
aliyun 阿里云 
aliyun-servers 
mynote server 
nginx 
gogs 

tools

mynote tools prj 

dev

http://47.97.186.229:81/

workman

workerman usage 
cd mynote/art_workman
php start.php stop
cd mynote/art_workman
php start.php start -d
lv1= lv2= type=

mynote test/dev server

test1 back:mynote test 
test1 front:yxt aliyun server for 备案 
mynote 账号 dev 
就是要留下的数据总结:# gogs 仓库
/home/git/gogs
/home/git/gogs-repositories
# mysql 表
/root/databases_backup_20181112105821
# mynote 原笔记内容以及图片
/home/www/mynote/basic/web/docs/
/root/mynote/basic/web/link/take/lib/uploads
lv1= lv2= type=

mynote test 部署

mynote_init 
es 部署文档 
lv1= lv2= type=

mynote online server

mynote online 

重启后:

mynote 开机自启动 
nginx
php-fpm
cd /etc/init.d
./redis start
cd /home/www/mynote/art_workman
su www # 注意要www用户
php start.php start -d
/etc/init.d/mysql start
su git
cd /home/git/gogs
# as deamon:
./gogs web &
lv1= lv2= type=

重启后检查服务

mynote checks 
netstat -anopt |grep mysql| grep LISTEN
netstat -anopt |grep redis| grep LISTEN
netstat -anopt |grep php-fpm| grep LISTEN
netstat -anopt |grep nginx| grep LISTEN
netstat -anopt |grep gogs| grep LISTEN
netstat -anopt |grep java| grep LISTEN
netstat -anopt |grep WorkerMan| grep LISTEN
cmp E:\uninote\start-check1.txt & E:\uninote\start-check2.txt
sample output:
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      1354/mysqld         off (0.00/0/0)
tcp        0      0 127.0.0.1:6379              0.0.0.0:*                   LISTEN      1010/redis-server 1 off (0.00/0/0)
tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN      1429/php-fpm        off (0.00/0/0)
tcp        0      0 0.0.0.0:81                  0.0.0.0:*                   LISTEN      1425/nginx          off (0.00/0/0)
tcp        0      0 0.0.0.0:82                  0.0.0.0:*                   LISTEN      1425/nginx          off (0.00/0/0)
tcp        0      0 0.0.0.0:85                  0.0.0.0:*                   LISTEN      1425/nginx          off (0.00/0/0)
tcp        0      0 0.0.0.0:3000                0.0.0.0:*                   LISTEN      1482/./gogs         off (0.00/0/0)
tcp        0      0 0.0.0.0:9200                0.0.0.0:*                   LISTEN      1503/java           off (0.00/0/0)
tcp        0      0 0.0.0.0:9300                0.0.0.0:*                   LISTEN      1503/java           off (0.00/0/0)
tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN      1454/WorkerMan      off (0.00/0/0)
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      1628/node /usr/node off (0.00/0/0)

logs

/home/www/wwwlogs
log parser/ana 
mynote tool links 
lv1= lv2= type=

mysql log or log ana 的问题?

可能是 log ana 的数据量太大了,然后被搜索引擎的蜘蛛访问了
lv1= lv2= type=

logs/空间清理

磁盘空间统计 du df 
log_analysis/ana_logs.txt
runtime/logs/logs.txt
/tmp/mysql.log  清理sh:
/etc/init.d/mysql stop
cd /tmp 
echo "" > mysql.log
/etc/init.d/mysql start
再依次postman中 删除mynote索引、初始化es、重新索引全部文章。
lv1= lv2= type=todo
每个git仓库的HEAD日志也会很大
$ cat .git/HEAD
ref: refs/heads/master
checkout master 需要检测,会导致log很大。
lv1= lv2= type=

mynote 排错

mynote checks 
logs/空间清理 
服务都启动的了?mynote online server 
logs:
mynote tool links 
本地开发,卡死,api request network 一直 pending:
gogs、es等放在虚拟机中的服务,要确认能否访问。vm 双网卡不同子网问题 
centos vm register 

mynote 清空数据 test

tmp_path=/tmp/mynote_init.sql
cat /home/www/mynote/sql/*.sql > $tmp_path
sed -i "s/CREATE DATABASE*/-- /" $tmp_path
mysql -u root -proot <<ENDTAG
use mynote
source $tmp_path
ENDTAG
-- todo 清空 日志记录数据。。 es 数据
su - www -c '
cd /home/www/mynote
rm -rf /home/www/mynote/basic/web/docs
git reset --hard
'
lv1= lv2= type=

mynote 开机自启动

/etc/rc.local linux 环境变量 env 
linux deamon process; background; nohup 
重启后检查 
# for vm centos
service iptables stop
# debug时打开排错,然后在shell中设置PATH为下面的输出值,模拟启动时的环境
# echo $PATH > /tmp/start_env.log
# 设置需要的 PATH
export PATH=/usr/node10/bin/:/usr/local/nginx/sbin/:/usr/local/php/sbin/:$PATH
nginx
php-fpm
cd /etc/init.d
./redis start
su - www -c '
cd /home/www/mynote/art_workman
php start.php start -d
'
su - git -c '
	cd /home/git/gogs
	nohup ./gogs web &
'
su - es -c '
        cd elasticsearch-6.7.1
        nohup bin/elasticsearch &
'
# front server:
cd /home/front/
pm2 start npx -- nuxt start

mynote_res

mynote_tests

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