当前位置: 首页 > wzjs >正文

公司网站制作价格wordpress 图片存储

公司网站制作价格,wordpress 图片存储,网上怎么接单做网站,2022年域名申请时间在之前的文章中,已经介绍了如何解锁ax6000的ssh,以及必坑指南。 今天突发奇想,为了不让我的nas天天开着tailscale,所以我想让我的tailscale运行在路由器,这样完美实现穿透。 首先,通过ssh登录ax6000&#x…

在之前的文章中,已经介绍了如何解锁ax6000的ssh,以及必坑指南。
今天突发奇想,为了不让我的nas天天开着tailscale,所以我想让我的tailscale运行在路由器,这样完美实现穿透。
首先,通过ssh登录ax6000,发现ax6000可用闪存奇小。很是无语。
在这里插入图片描述
如上图所示,最大的192MB是在tmpfs中,不是非易失存储。重新上电就会被擦除。

不过还是有办法的,继续看吧。

1.确认ax6000的linux架构

uname -a
Linux XiaoQiang 4.4.60 #0 SMP PREEMPT Mon Mar 22 06:59:08 2021 aarch64 GNU/Linux

aarch64

2.从tailscale官方下载

curl --cacert /etc/curlssl/cacert.pem -O https://pkgs.tailscale.com/stable/tailscale_1.80.3_arm.tgz

这里下载时,需要添加证书,cacert.pem需要从curl官网下载 。
然后通过scp导入到/etc/curlssl/

3.解压

tar -xzf tailscale_1.80.3_arm.tgz

4.第一次运行

cd tailscale_1.80.3_arm
./tailscaled
tailscale up --advertise-routes=192.168.0.0/24

执行后,会生成一个网站,复制打开,登录tailscale,然后连接,就可以添加成功了

===============================================
以上是手动开启的方法,tailscale_1.80.3_arm.tgz解压有50MB+,根本无法保存在ax6000闪存中。

  • 所以怎么办?

有了,我们可以每次开机后,执行shell脚本,然后进行下载到/tmp目录,然后解压重新启动。

  • 但是每次重启后,需要重新登录,怎么办?
    有了,我们可以把第一次手动登录后的缓存存起来,下次开机可以复用。

开整:

1.先将之前的tailscale缓存到/etc目录

cp /var/lib/tailscale /etc/tailscale/cache

2.编写脚本

vi /etc/tailscale/tailscale_install.sh
#!/bin/sh# Define log file path
LOG_DIR="/tmp/tailscale"
LOG_FILE="$LOG_DIR/install_tailscale.log"# Create log directory
mkdir -p "$LOG_DIR" || { echo "Failed to create log directory $LOG_DIR"; exit 1; }# Clear log file (if it exists)
> "$LOG_FILE"# Function: Print log and write to file
log() {echo "$1"echo "$1" >> "$LOG_FILE"
}# Check if 8.8.8.8 is in /etc/resolv.conf, if not, append it
if ! grep -q "8.8.8.8" /etc/resolv.conf; thenlog "Adding Google DNS (8.8.8.8) to /etc/resolv.conf..."echo "nameserver 8.8.8.8" >> /etc/resolv.confif [ $? -eq 0 ]; thenlog "Google DNS added successfully."elselog "Failed to add Google DNS. Please check permissions."exit 1fi
elselog "Google DNS (8.8.8.8) is already in /etc/resolv.conf."
fi# Enter /tmp directory
cd /tmp || { log "Failed to enter /tmp directory"; exit 1; }# Create tailscale directory
mkdir -p tailscale || { log "Failed to create tailscale directory"; exit 1; }
cd tailscale || { log "Failed to enter tailscale directory"; exit 1; }# Download Tailscale package
MAX_RETRIES=3
RETRY_COUNT=0
DOWNLOAD_SUCCESS=falsewhile [ $RETRY_COUNT -lt $MAX_RETRIES ]; dolog "Attempting to download Tailscale package (Attempt $((RETRY_COUNT + 1))..."curl --cacert /etc/curlssl/cacert.pem -O https://pkgs.tailscale.com/stable/tailscale_1.80.3_arm.tgz >> "$LOG_FILE" 2>&1if [ $? -eq 0 ]; thenlog "Download successful!"DOWNLOAD_SUCCESS=truebreakelselog "Download failed, retrying..."RETRY_COUNT=$((RETRY_COUNT + 1))fi
doneif [ "$DOWNLOAD_SUCCESS" = false ]; thenlog "Download failed. Please check your network connection or the URL."exit 1
fi# Check if the file exists
if [ ! -f tailscale_1.80.3_arm.tgz ]; thenlog "File tailscale_1.80.3_arm.tgz not found. Please check if the download was successful."exit 1
fi# Extract the package
log "Extracting Tailscale package..."
tar -xzf tailscale_1.80.3_arm.tgz >> "$LOG_FILE" 2>&1 || { log "Extraction failed. Please check if the file is complete."; exit 1; }# Recover cache
cp /etc/tailscale/cache /var/lib/tailscale -r
# Enter the extracted directory
cd tailscale_1.80.3_arm || { log "Failed to enter tailscale_1.80.3_arm directory"; exit 1; }# Start Tailscale and set up routing
log "Starting Tailscale..."
/tmp/tailscale/tailscale_1.80.3_arm/tailscaled >> "$LOG_FILE" 2>&1 &
if [ $? -ne 0 ]; thenlog "Failed to start tailscaled. Please check permissions or dependencies."exit 1
filog "Setting up Tailscale routes..."
/tmp/tailscale/tailscale_1.80.3_arm/tailscale up --advertise-routes=192.168.0.0/24 >> "$LOG_FILE" 2>&1 &
if [ $? -ne 0 ]; thenlog "Failed to set up Tailscale routes. Please check the configuration."exit 1
filog "Tailscale installation and startup completed!"
log "Log saved to: $LOG_FILE"

注意/etc/resolve.conf中没有注释的8.8.8.8,如果被注释了,可能无法下载。

3.添加脚本到开机启动

vi /etc/rc.local
/etc/tailscale/tailscale_install.sh

重启试试?


文章转载自:

http://KuINkhpI.xLwrm.cn
http://5EcqxRdg.xLwrm.cn
http://xqMgSCVt.xLwrm.cn
http://s00D3FP3.xLwrm.cn
http://ARuPskJ3.xLwrm.cn
http://Xtaqz4Vs.xLwrm.cn
http://0khpTQwI.xLwrm.cn
http://CNSiF4VG.xLwrm.cn
http://Rzg4X4JG.xLwrm.cn
http://54nHW3E5.xLwrm.cn
http://ZQ3PWc7I.xLwrm.cn
http://ZRda0arX.xLwrm.cn
http://fxcTSXLd.xLwrm.cn
http://481K3WX9.xLwrm.cn
http://gBRGBMcC.xLwrm.cn
http://i5CMAeqI.xLwrm.cn
http://h0oRA5tr.xLwrm.cn
http://bAM18vLB.xLwrm.cn
http://Thxg1xdn.xLwrm.cn
http://1rV2Nz8w.xLwrm.cn
http://qakWPFLn.xLwrm.cn
http://3SrvURbd.xLwrm.cn
http://Fyf9M3Iv.xLwrm.cn
http://BX85defZ.xLwrm.cn
http://JohQemWA.xLwrm.cn
http://TLMdndil.xLwrm.cn
http://5YfgxZLZ.xLwrm.cn
http://xj4CvSSp.xLwrm.cn
http://XssiQwa3.xLwrm.cn
http://nyRg9fvm.xLwrm.cn
http://www.dtcms.com/wzjs/771661.html

相关文章:

  • pt网站怎么做磁力兔子
  • 深圳网站建设系统烟台网站开发多少钱
  • 台州商务网站网站备案被注销
  • 炫丽的网站西安高端网站建设
  • 崇礼做网站的公司宁波seo深度优化平台有哪些
  • 中小企业网站建设示范平台对网站备案的认识
  • 手机网站导航设计模板品牌红酒网站建设
  • 五个常见的电子商务网站网址即速应用小程序官网
  • 网站页脚有什么作用东莞智通人才网官网登录
  • 外贸建站教程网页开发工具的作用有多大
  • 网站备案升级58企业名录企业黄页
  • 网站推广公司认准乐云seo爱辉网站建设
  • html源码网站建设中qq 互联网站开发代码
  • 上传文档到网站上怎么做网站设计要素
  • 多平台网站设计实例湖南省住房与城乡建设部网站
  • 做企业网站的合同网页升级紧急通知在哪里看
  • 简单网站建设推荐小说手机网站建设
  • 郑州外贸网站建设哪家好找工程项目
  • 天津网站排名优化腾讯合作网站建设有哪些公司
  • 创意新颖的产品设计seo网络营销外包
  • 腾讯云网站建设流程图在婚恋网站做翻译好吗
  • 清华大学精品课程网站怎么注销公司法人身份
  • 旅游网站建设策划书范文济南制作网站公司
  • 彩票网站如何做wordpress 备案信息修改
  • 网站的反链要怎么做php 网站反盗链
  • 网站快照是自己做的吗潮州网络推广公司
  • uzi视频网站谁做的莆田百度seo公司
  • wordpress入门建站教程二科讯cms网站管理系统kesioncms
  • 免费的行情网站app大全下载高端网站案例欣赏
  • 天河区pc端网站建设网站推广服务具体内容包括哪些