Hello World

吞风吻雨葬落日 欺山赶海踏雪径

0%

Install Linux Mint

Linux Mint 的安装记录。

Mint 22

Linux Mint 22 is based on Ubuntu 24.04, witch based on Debian Version 13.

1
2
cat /etc/debian_version
trixie/sid

修改 root 密码

1
sudo passwd root

安装openssh-server

1
2
3
4
sudo apt install openssh-server
sudo systemctl start ssh
sudo systemctl enable ssh
sudo systemctl status ssh

设置远程无密码连接

1
vim ~/.ssh/authorized_keys

本地的公钥写入此文件。

本地设置 ssh 别名

1
2
3
4
5
6
7
vim ~/.ssh/config

增加配置
Host mint
HostName IP地址
User 用户名
Port 22

安装zsh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
sudo apt install zsh
chsh -s /usr/bin/zsh

sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh \
| sed 's|^REPO=.*|REPO=${REPO:-mirrors/oh-my-zsh}|g' \
| sed 's|^REMOTE=.*|REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}|g')"

git clone https://gitee.com/eralmtice/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://gitee.com/eralmtice/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

修改`~/.zshrc`文件
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)

应用配置
source ~/.zshrc

安装net-tools

1
sudo apt install net-tools

挂在硬盘

因为原本是 windows 的机器有两个硬盘。所以需要格式化+挂在原先的硬盘,原来的硬盘格式是ntfs 的需要重新格式化一下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
lsblk -lf

sudo fdisk /dev/sda
d -> 1 删除分区
n 创建一个新的
w 保存

sudo mkfs.ext4 /dev/sda1

格式化之后可以挂载了
sudo mount /dev/sda1 ~/data
sudo chown -R forgives:forgives /home/forgives/data

最好使用当前用户挂载
sudo mount -o uid=forgives,gid=forgives /dev/sda1 /home/forgives/data

自动挂载 修改 /etc/fstab
UUID=your-uuid /home/forgives/data ext4 defaults 0 2

可以使用 blkid 查看 UUID
sudo blkid /dev/sda1

参考 https://wiki.archlinux.org/title/Fstab

安装dae

1
2
3
4
5
6
7
8
9
wget https://github.com/daeuniverse/dae/releases/download/v0.8.0/dae-linux-x86_64.zip
unzip dae-linux-x86_64.zip -d dae

./dae
├── dae-linux-x86_64
├── dae.service
├── example.dae
├── geoip.dat
└── geosite.dat
1
2
3
4
5
6
7
8
sudo cp dae-linux-x86_64 /usr/local/bin/dae
sudo mkdir -p /usr/local/share/dae/
sudo mv geoip.dat /usr/local/share/dae/
sudo mv geosite.dat /usr/local/share/dae/
sudo cp dae.service /etc/systemd/system/dae.service
sudo mkdir /etc/dae/
sudo cp config.dae /etc/dae/config.dae
sudo chmod 0640 /etc/dae/config.dae

随后

1
2
3
sudo /usr/local/share/dae/ validate -c /etc/dae/config.dae
sudo systemctl enable dae.service --now
journalctl -xfu dae.service

mysql

mint 自带了安装了 mysql

1
2
mysqld --version
/usr/sbin/mysqld Ver 8.0.39-0ubuntu0.24.04.2 for Linux on x86_64 ((Ubuntu))

直接查看密码

1
sudo cat /etc/mysql/debian.cnf

用上面用户登录之后修改root密码

1
2
3
4
5
use mysql
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
CREATE USER 'root'@'%' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
flush privileges;

别忘了修改配置文件

1
2
3
4
sudo nano /etc/mysql/my.cnf

[mysqld]
bind-address=0.0.0.0

重启服务sudo systemctl restart mysql

参考

https://askubuntu.com/questions/445487/what-debian-version-are-the-different-ubuntu-versions-based-on