旧服务器上 首先备份旧服务器的站点目录,以x-xi.cn为例,进入到站点目录,执行压缩打包命令 zip -r sites.zip sites 打包之后,将x-xi.zip 转移到新的服务器 scp sites.zip root@ip:/data/www/ 备份数据库 mysqldump -u root -p db > db-backup.sql 将…
首先你要有个域名,我这边以在 aliyun 购买的域名为例 前期准备 创建一个Aliyun的AliyunDNSFullAccess权限的子账号,并记录下 AccessKey ID 和 AccessKey Secret 安装 certbot yum install certbot 安装 certbot aliyun 插件: https://githu…
首先需要添加 yum 的源,通过一个官方脚本可以执行 curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash 然后执行安装,会安装最新版本数据库 yum install MariaDB-server 安装完之后,查看运行状态 systemctl st…
首先花 79 元 在腾讯云购买1年的腾讯云轻应用服务器,优惠链接:https://url.cn/YzyglSN0完成购买之后,进入 管理面板:https://console.cloud.tencent.com/lighthouse/instance 选择刚购买的服务器,选择重置密码,重置之后会重启服务器,然后通过外网IP使用ssh登录到服务器 ss…
首先访问nginx的官网,获取最新版本的nginx源码,然后下载到无服务器。 地址地址:http://nginx.org/en/download.html 选择最新版本,以我的为例当时最新版地址是: http://nginx.org/download/nginx-1.23.2.tar.gz 国外服务器网速慢,使用国内镜像地址: https://mi…
简介 portainer是一个可视化docker操作面板工具,可以不用写docker命令实现容器的生命周期进行管理,方便的实现容器的创建、运行、停止、暂停、恢复、删除、复制等。 安装 我们通过 docker-compose 来安装,首先看看配置文件 version: '3' services: portainer: image: portainer…
很多时候我们知道文件内有个文字内容,但是不知道存放在目录下的什么位置,就需要通过内容来检索文件,通常使用一下命令: grep -rnw '/path/to/somewhere/' -e 'pattern' 参数说明 -r 或 -R 是递归 -n 是行号 -w 代表匹配整个单词 -e 正则表达式 举例: 我们需要寻找当前目录下,包含 [Theme A…
以后我将在这个博客网站分享自己有限的经验知识~