0%

scoop

# 安装Scoop
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

如果上面安装不成功的话,可以尝试下面这个
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iwr -useb 'https://raw.fastgit.org/kidonng/scoop-install/fastgit/install.ps1' | iex

# 卸载Scoop
scoop uninstall scoop

# 添加源
scoop bucket add mochi https://hub.fastgit.org/Qv2ray/mochi
scoop bucket add dorado https://github.com/h404bi/dorado
scoop bucket add nirsoft
scoop bucket add extras
scoop bucket add java
scoop bucket add jetbrains
scoop bucket add main
scoop bucket add nerd-fonts
scoop bucket add nightlies
scoop bucket add nonportable
scoop bucket add versions

我的常用软件

scoop install curl telnet grep aria2 figlet

scoop install 7zip beyondcompare-zh-cn dark ffmpeg fiddler \
      format-factory geekuninstaller idea innounp \
      notepadplusplus pdf-xchange-editor postman python37 redis-desktop-manager \
      teamviewer tesseract typora v2ray vim winscp xmind8 \
      youtube-dl potplay virtualbox-np git

配置WSL2

https://docs.microsoft.com/zh-cn/windows/wsl/install-win10?source=docs#step-3---enable-virtual-machine-feature

https://blog.csdn.net/qq_39749527/article/details/107449609

出现问题【请启用虚拟机平台 Windows 功能并确保在 BIOS 中启用虚拟化解决】
https://www.cnblogs.com/venusian/p/11726958.html
bcdedit /set hypervisorlaunchtype auto

# 如果使用过VMWare
bcdedit /set hypervisorlaunchtype auto

其他软件

魔音MORIN http://www.huanghunxiao.com/index.html

音乐标签 https://www.cnblogs.com/vinlxc/p/11347744.html

Fiddler https://api.getfiddler.com/win/latest

PowerToys https://github.com/microsoft/PowerToys/releases/latest

Office Tool Plus https://otp.landian.vip/zh-cn

Navicat https://navicat.com.cn/products

1. navicat-patcher.exe <Navicat installation path>
2. navicat-keygen.exe -text .\RegPrivateKey.pem
3. 选择Navicat产品类别、语言以及输入主版本号、输入用户名和组织名
4. 断开网络 并打开Navicat。找到注册窗口,并填入keygen给你的序列号。然后点击激活按钮,选择手动激活。
5. 在手动激活窗口你会得到一个请求码,复制它并把它粘贴到keygen里。最后别忘了连按至少两下回车结束输入。
6. 如果不出意外,你会得到一个看似用Base64编码的激活码。直接复制它,并把它粘贴到Navicat的手动激活窗口,最后点激活按钮。

VirtualBox https://www.virtualbox.org/wiki/Downloads
CentOS https://wiki.centos.org/Download
基础教程 https://blog.csdn.net/wang2834557/article/details/103872427

vim /etc/sysconfig/network-scripts/ifcfg-ens33

BOOTPROTO="static"
ONBOOT="yes"
IPADDR=""
NETMASK="255.255.255.0"
GATEWAY=""
DNS1="8.8.8.8"
yum install net-tools

Linux 软件安装

zsh(必备)

https://www.cnblogs.com/lingr7/p/12804510.html

sudo apt-get install zsh
chsh -s /bin/zsh

antigen

https://github.com/zsh-users/antigen

# 需要翻墙
wget -q -O ~/.antigen.zsh git.io/antigen

echo -e "source ~/.antigen.zsh" >> ~/.zshrc

高版本git

1. yum install git

2. yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker -y

3. wget https://github.com/git/git/archive/refs/tags/v2.31.1.tar.gz
(get releases version from https://github.com/git/git/releases)

4. tar zxvf git-2.9.2.tar.gz
cd git-2.9.2
make prefix=/usr/local/git
make prefix=/usr/local/git install

Docker中的服务配置

安装Docker

curl -sSL https://get.daocloud.io/docker | sh

配置Docker的国内源,将以下内容保存到 /etc/docker/daemon.json

{
    "registry-mirrors": [
        "https://mirror.ccs.tencentyun.com",
        "http://registry.docker-cn.com",
        "https://docker.mirrors.ustc.edu.cn",
        "http://hub-mirror.c.163.com"
    ]
}

启动Docker

systemctl start docker

安装Docker-Compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.28.6/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

redis

mkdir -p /home/docker/redis/data

将以下内容保存到 /home/docker/redis/docker-compose.yml

version: "3"
services:
  redis:
    container_name: redis
    image: redis:latest
    environment:
      redisPwd: 123456 # 这里填redis.conf配置这里填redis配置文件中的密码
    ports:
      - 6806:6379
    restart: always
    command: /bin/bash -c "redis-server /etc/redis/redis.conf"
    volumes:
      - ./redis.conf:/etc/redis/redis.conf
      - ./healthcheck.sh:/etc/redis/healthcheck.sh
      - ./data:/data
    healthcheck:
      test: ["CMD", "/bin/bash", "/etc/redis/healthcheck.sh"]
      interval: 1m30s
      timeout: 30s
      retries: 3

将以下内容保存到 /home/docker/redis/healthcheck.sh

host="$(hostname -i || echo '127.0.0.1')"
result="$(redis-cli -h ${host} -a ${redisPwd} ping)"
if [ $result = 'PONG' ]; then
    exit 0;
else
    exit 1
fi

将以下内容保存到 /home/docker/redis/redis.conf

bind 0.0.0.0

daemonize no

pidfile /var/run/redis_6806.pid

port 6379

tcp-backlog 511

timeout 0

tcp-keepalive 0

loglevel notice

logfile ""

databases 16

save 900 1
save 300 10
save 60 10000

stop-writes-on-bgsave-error yes

rdbcompression yes
rdbchecksum yes

dbfilename dump.rdb

dir ./

slave-serve-stale-data yes
slave-read-only yes

repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no

slave-priority 100

requirepass 123456

maxmemory 1gb

appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no

auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-rewrite-incremental-fsync yes

lua-time-limit 5000

cluster-enabled no
cluster-config-file nodes-6379.conf
cluster-node-timeout 15000

slowlog-log-slower-than 10000
slowlog-max-len 128

latency-monitor-threshold 0
notify-keyspace-events ""

hash-max-ziplist-entries 512
hash-max-ziplist-value 64

list-max-ziplist-entries 512
list-max-ziplist-value 64

set-max-intset-entries 512

zset-max-ziplist-entries 128
zset-max-ziplist-value 64

hll-sparse-max-bytes 3000
activerehashing yes

client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60

hz 10

执行命令安装redis

cd /home/docker/redis

# 确保docker已经启动,若已经启动则忽略这条命令
systemctl restart docker

docker-compose up -d

zookeeper

执行命令

mkdir -p /home/docker/zookeeper/data/
mkdir -p /home/docker/zookeeper/logs/

将以下内容保存到 /home/docker/zookeeper/docker-compose.yml

version: "3"
services:
 zk:
   container_name: zk
   image: zookeeper:latest
   ports:
     - 2181:2181
   restart: always
   volumes:
     - ./zoo.cfg:/conf/zoo.cfg
     - ./data:/data/zookeeper/data
     - ./logs:/data/zookeeper/logs
     - ./healthcheck.sh:/home/healthcheck.sh
   healthcheck:
     test: ["CMD", "/bin/bash", "/home/healthcheck.sh"]
     interval: 1m30s
     timeout: 30s
     retries: 3

将以下内容保存到 /home/docker/zookeeper/zoo.cfg

dataLogDir=/data/zookeeper/logs
dataDir=/data/zookeeper/data
tickTime=2000
initLimit=10
syncLimit=5
clientPort=2181
standaloneEnabled=true

将以下内容保存到 /home/docker/zookeeper/healthcheck.sh

#!/bin/bash
result="$(zkServer.sh status | grep 2181)"
if [ "$result" ]; then
    exit 0;
else
    exit 1
fi

执行命令安装zookeeper

cd /home/docker/zookeeper

# 确保docker已经启动,若已经启动则忽略这条命令
systemctl restart docker

docker-compose up -d

MySQL

执行命令

# mysql数据存放位置
mkdir -p /home/docker/mysql/data

# 可以将用于数据库初始化的sql文件放到这个目录下,mysql安装时会进行执行。
mkdir -p /home/docker/mysql/init

将以下内容保存到 /home/docker/mysql/docker-compose.yml

version: "3"
services:
  mysql57:
    container_name: mysql
    image: mysql:5.7
    restart: always
    ports:
      - 3306:3306
    environment:
      - TZ=Asia/Shanghai
      - MYSQL_ROOT_PASSWORD=admin # 这里填写mysql密码
    volumes:
      - ./data:/var/lib/mysql
      - ./my.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
      - ./init:/docker-entrypoint-initdb.d
      - ./healthcheck.sh:/home/healthcheck.sh
    healthcheck:
      test: ["CMD", "/bin/bash", "/home/healthcheck.sh"]
      interval: 1m30s
      timeout: 30s
      retries: 3

将以下内容保存到 /home/docker/mysql/healthcheck.sh

#!/bin/bash
result="$(service mysql status | grep 'is running')"
if [ "$result" ]; then
    exit 0;
else
    exit 1
fi

将以下内容保存到 /home/docker/mysql/my.cnf

[mysqld]
user=mysql

datadir     =   /var/lib/mysql
pid-file    =   /var/run/mysqld/mysqld.pid
socket      =   /var/run/mysqld/mysqld.sock

symbolic-links=0
default-storage-engine=INNODB
character_set_server=utf8mb4
collation-server=utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci'
default-time_zone='+8:00'
lower_case_table_names=1

[mysql]
default-character-set = utf8

[mysql.server]
default-character-set = utf8

[mysqld_safe]
default-character-set = utf8

[client]
default-character-set = utf8

执行命令

cd /home/docker/mysql

# 确保docker已经启动,若已经启动则忽略这条命令
systemctl restart docker

docker-compose up -d

docker exec -it mysql bash

# 配置mysql外部访问权限

Python

pip install -r < requirement.txt

requirement.txt内容如下

ipython==7.19.0
jedi==0.17.2
pyinstaller==4.2
PyMuPDF==1.18.8
requests-html==0.10.0