history 查看历史命令记录
chown -R deploy:admin /ynet 给deploy用户权限
--新增用户、组
adduser deploy
groupadd admin
useradd -d /home/bill -s /bin/bash -m bill
usermod -a -G admin deploy
passwd deploy
rpm -ivh foo-1.0-l.i386.rpm --安装rpm文件
rpm -Uvh *.rpm --nodeps --force -- 一键安全目录下所有rpm文件
-- 启动java
nohup java -jar XXX.jar & (注意,一定要&,如果不写相当于ssh窗口执行,退出终端就停了)
--- mysql ---
mysql -u root -p mysql登录,root为username,回车后输入密码
service mysqld start mysql启动
systemctl restart mysqld mysql重启
-- mysql ,非linux
update mysql.user set authentication_string=PASSWORD('123456') where User='root'; --修改root用户密码
update user set host = '%' where user = 'root'; --开放mysql 给远程地址
grant select, insert, update on `表名`.* to '用户名'@'%' identified by '密码'; -- 给用户针对某个表开放select, insert, update权限
grant all on *.* to 'ynet'@'%';
revoke all on *.* from 'ynet'@'%'; --关闭权限
flush privileges;
--- redis ---
redis-cli -h 47.101.63.222 -p 6379 连接远程redis
redis-cli 连接本地redis
auth 123456 输入密码登录
--- rocketMQ ---
nohup sh bin/mqnamesrv >>mqnamesrv.out &
tail -f ~/logs/rocketmqlogs/namesrv.log
nohup sh bin/mqbroker -n 10.150.3.111:9876 -c conf/broker.conf >>broker.out&
tail -f ~/logs/rocketmqlogs/broker.log
sh bin/mqadmin updateSubGroup -c rocketmq-cluster -g group名 -n "10.150.3.111:9876"
sh mqadmin updateTopic -n 10.150.3.111:9876 -b 10.150.3.111:10911 -t Topic名 -- 创建topic
./mqadmin updateTopic -n localhost:9876 -b localhost:10911 -t tx-mq-TOPIC