• vps 11步移站步骤笔记


    移站是经常的事,现在把步骤写上,防止忘记命令

    1.登录SSH

    2.打包数据库,phpmyadmin中备份数据库,导入新数据库,数据库中域名链接进行相应替换

    获取phpmyadmin root密码 cat /usr/local/directadmin/scripts/setup.txt

    3.打包网站:afish、aaaacom等程序路径换成你自己的即可

    cd /home/afish/domains/aaaacom
    tar -zcvf public_html.tar.gz public_html

    4.移动public_html.tar.gz到子目录public_html下

    mv public_html.tar.gz /home/afish/domains/aaaacom/public_html

    5.若旧站还打得开就可以用远程获取命令,否则只能下载压缩包上传到/home/afish/domains/bbbbcom下面

    cd /home/afish/domains/bbbbcom
    wget http://aaaacom/public_html.tar.gz

    6.解压网站到新目录

    cd /home/afish/domains/bbbbcom
    tar -zxvf public_html.tar.gz

    7.更改文件所属组

    cd /home/afish/domains/bbbbcom
    chown -R afish:afish public_html

    8.文件夹与文件读写权限的修改

    cd /home/afish/domains/bbbbcom/public_html
    chmod 777 bmz_cache
    chmod 777 cache
    chmod 777 images
    chmod -R 777 images/magicthumbs
    chmod -R 777 includes/languages/english/html_includes/*
    chmod 755 includes/languages/english/html_includes/classic
    chmod 777 tempEP

    9.登录FTP,前后台配置文件的修改:数据库、用户、密码、.htaccess文件

    configure.php .htaccess

    10.最后为了安全,网站设置好之后,将html_includes、tempEP文件夹读写权限恢复为原始

    cd /home/afish/domains/bbbbcom/public_html
    chmod -R 644 includes/languages/english/html_includes/*
    chmod 755 includes/languages/english/html_includes/classic
    chmod 755 tempEP

    11.若要复制多个站,先使用以下移动命令到新目录,然后重复6到10步骤即可

    mv /home/afish/domains/bbbbcom/public_html.tar.gz /home/afish/domains/cccccom
    tar -zxvf public_html.tar.gz

    打完收工!

    转载请注明出处!小鱼阁工作室 -专注zencart建站,织梦企业建站,ecshop商城,二次开发,产品采集,模板修改!技术QQ 631992791
  • 相关阅读:
    l1-010
    l1-009
    L1-008修改
    l1-008
    Codeforces Round #406 (Div. 2)
    求N!的长度【数学】 51nod 1058 1130
    51nod 1090 & 1267 【二分简单题】
    Codeforces Round #405 (Div. 2)
    Codeforces Round #404 (Div. 2)
    PAT 天梯赛真题集(L2、L3)
  • 原文地址:https://www.cnblogs.com/afish/p/3974512.html
Copyright © 2020-2023  润新知