部署文档

管理面板


海鲜商城

基础信息

mysql 安装过程记录

  1. 安装 mysql
sudo apt install mysql-server -y
sudo mysql_secure_installation

注意事项:

sudo service mysql restart
sudo service mysql status

默认无密码,只能通过本地连接

  1. 建立远程访问账号
sudo mysql -u root
SELECT user, host FROM mysql.user WHERE user='root';
CREATE USER 'root'@'%' IDENTIFIED WITH 'mysql_native_password' BY 'your_password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit;
  1. 修改 mysql 配置,允许远程访问
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
bind-address = 0.0.0.0
  1. 允许 3306 端口通过 ufw
sudo ufw allow 3306/tcp
sudo ufw reload
  1. 测试连接
mysql -h 192.168.110.16 -u root -p
show databases;

然后输入 your_password(输入字符不可见,如如后直接回车即可)


马杀鸡

服务器账号信息

注意事项,:

配置 zsh 等

  1. 配置 zsh
sudo apt install zsh -y
  1. 配置 oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  1. 配置 zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  1. 配置 zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  1. 配置 .zshrc
vim ~/.zshrc
# 在文件末尾添加以下内容
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
  1. 启用 zsh
# 修改默认zsh
chsh -s $(which zsh)
# 启用zsh
source ~/.zshrc
# 查看当前shell
echo $SHELL

安装宝塔

# 安装宝塔
wget -O install.sh https://download.bt.cn/install/install_lts.sh && sudo bash install.sh ed8484bec
# 运行bt修改你的信息
bt