ps -ef|grep cassandra #查看cassandra是否运行
ps -ef|grep kairosdb #查看kairosdb是否远行
启动命令 service kairosdb start
授权
mysql>grant all privileges on *.* to'root'@'%'identified by 'youpassword' with grant option。grant all privileges on *.* to 'root'@'172.168.0.7' identified by 'admin' with grant option。mysql>grant all privileges on *.* to 'root'@'%' identified by 'youpassword' with grant option。
mongo库目录
cd /opt/mongodb-3.4.2/bin/
备份mongo库
./mongodump -h 127.0.0.1 -d GDDB -o /bjyn/dbbak/20180119
恢复mongo库
./mongorestore -h 127.0.0.1:8532 -d GDDB /bjyn/dbbak/20180119/GDDB/
凝思磐石先用普通用户登录,再切换root用户
su - root
再输入root密码
python目录
cd /bjyn/python_project/file/
supervisor路径
/etc/supervisor/conf
启动supervisor
更新supervisor(修改supervisor配置文件后执行)
/root/anaconda2/bin/supervisorctl update
启动supervisor里面的服务
start python_rpc
停止supervisor里面的服务
stop python_rpc
启动所有supervisor里面的服务
start all
重启supervisor里面的服务
restart python_rpc
查看进程
ps -ef|grep YN_RPC
杀进程
kill -9 1234
tomcat目录
cd /opt/apache...../bin/
启动tomcat
./startup.sh
停止tomcat
./shutdown.sh
查看tomcat日志
tail -f ../logs/catalina.out
文件授权
chmod 777 /目录
chmod 777 -R /目录
查看硬盘信息
df -h
查看CPU信息(型号)
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
查看内 存信息
# cat /proc/meminfo
# 查看物理CPU个数
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
/etc/init.d/supervisord start
//批量杀进程
kill -9 `ps -ef | grep djava.uti | grep -v tail | grep -v vi | grep -v grep | awk '{print $2}'`。ps -ef|grep monitor_psr.sh|grep iboss2|grep ismp|grep -v grep|awk {print $2}|xargs kill -9。pid=`ps aux | grep tomcat | grep -v grep | grep -v retomcat | awk '{print $2}'`。
数据库区分大小写
lower_case_table_names=1
MYSQL忘记密码
skip-grant-tables
service mysql stop
use mysql
update user set password=password("12345") where user="root";
//移动到某个路径
mv ynjk /bjyn/dbbak
//删除文件
rm -rf ynjk.war
//启动防火墙
systemctl start firewalld.service
//添加端口
firewall-cmd --permanent --add-port=3306/tcp
firewall-cmd --reload
//kairosdb启动
service kairosdb start
ps -ef|grep java
ps -ef|grep YN_realTim ......
kill -9