Linux命令记录
linux 命令记录
// TODO 之后把这些做成脚本
yum update
yum install rclonecurl -fsSL https://get.docker.com | bash -s docker --mirror Aliyunyum install -y yum-utils device-mappe
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
yum install nginx yum list docker-ce --showduplicates | sort -r
yum install docker-ce-x86_64 docker-ce-cli-20.10.9 containerd.io
systemctl start docker
docker ps
docker version
vim /etc/docker/demon.json
systemctl restart docker
systemctl daemon-reload
systemctl enable docker
docker run --restart=always --name tomcat -p 8080:8080 -v $PWD/webapps:/usr/local/tomcat/webapps -d tomcat
docker run -p 3306:3306 --name mysql -v /mydata/mysql/log:/var/log/mysql -v /mydata/mysql/data:/var/lib/mysql -v /mydata/mysql/conf:/etc/mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7
docker run -p 9000:9000 -p 9001:9001 --name minio -e "MINIO_ROOT_USER=root" -e "MINIO_ROOT_PASSWORD=*******" -v /mnt/data:/data quay.io/minio/minio server /data --console-address ":9001"
mkdir -p /mydata/redis/conf
touch /mydata/redis/conf/redis.conf
docker run -p 6379:6379 --name redis -v /mydata/redis/data:/data -v /mydata/redis/conf/redis.conf:/etc/redis/redis.conf -d
redis redis-server /etc/redis/redis.conf --appendonly yes --requirepass "password"
cd /mydata/
cd redis/
cd conf/
vim redis.conf
docker restart 532
tar -zcvf data.tar.gz data/
ls
rclone config
cd .config/
cd rclone/
vim rclone.conf
rclone lsd minio:
ls
cd /root
ls
cd /mnt/
ls
pwd
rclone copy minio:/album/data.tar.gz ./ -P
scp root@gwozai.com:/mnt/data/album/data.tar.gz /root
docker ps
yum install nginx
nginx -s reload
free -h
ls
docker ps docker ps -a
rclone ls rclone ls minio:
rclone lsd minio:/album
rclone ls minio:/album
shopt | grep hup
nohup
nohup --help
ls
rm -rf data.tar.gz
nohup rclone copy -v minio:/album/data.tar.gz /root/ > /root/rclone.log 2>&1 & jobs -l
ps -ef
jobs -l
ps -ef|grep nohup ps -ef|grep rclone
jobs -l
ls
cat rclone.log
进程管理
- &
用tu
jobs -l
ps -ef | grep rclone
nohup commond &
netstat -ap | grep 8
后台同步命令
nohup rclone copy -v minio:/album/data.tar.gz /root/ > /root/rclone.log 2>&1 &
管理命令
jobs -l
ps -ef
a 显示所有程序
u 以用户为主的格式来显示
x 显示所有程序,不以终端来区分
lsof -i:8090
netstat -ap | grep 8090
netstat -nap|grep 7779
nohup rclone copy -v minio:/album/data.tar.gz /root/ > /root/rclone.log 2>&1 &
无论是否及那个nohup命令的输出重定向到中断,
crontab
ps 命令的学习
- 原文作者:gwozai
- 原文链接:https://blog.gwozai.com/post/nohup/
- 版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议进行许可,非商业转载请注明出处(作者,原文链接),商业转载请联系作者获得授权。