首页 » 畏罪自爱

脚本地址:https://github.com/oneinstack/lnmp
  1. Media change: please insert the disc labeled

编辑/etc/apt/sources.list 删除cdrom那行

  1. There are problems and -y was used without --force-yes

方法1 apt-get update
方法2 Add to /etc/apt/apt.conf:
APT::Get::AllowUnauthenticated 1 ;

3.最重要的,更改中国源

vim /etc/apt/sources.list

 

deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib

windows下调用git pull,注意代码仓库必须在php根目录下面的文件夹。中文路径的处理

1.这里做了中文路径的处理

<?php
    $pro_dir = $_SERVER['DOCUMENT_ROOT']."/data/User/admin/home/我的文档/code/lcloud_ark_dd";
    $pro_dir  = iconv('utf-8', 'gb2312', $pro_dir);
    echo $pro_dir;
    echo "<br/>";
    chdir($pro_dir);
    echo getcwd();
    $shell = "git pull 2>&1";
    exec($shell,$out);
    echo "<br/>";
    print_r($out);
?>

git 1.7 之后支持只签出部分文件夹,操作如下

1.注意dt-center-sdk-dev是要clone的文件夹


git init lcloud_ark_dd&& cd lcloud_ark_dd
git config core.sparsecheckout true

echo dt-center-sdk-dev >> .git/info/sparse-checkout

# 设置远程仓库地址
git remote add origin ssh://github.com/abc.git

# 用 pull 来拉取代码
git pull origin master

由于防火墙原因,没法直接访问数据库,于是用mysql proxy搭建了个代理
  1. 下载地址:https://downloads.mysql.com/archives/proxy/ 绿色免安装
  2. 配置文件mysql-proxy.conf,注意log文件夹要创建出来,修改proxy-backend-addresses和proxy-address 为你的
[mysql-proxy]
proxy-address=127.0.0.1:6217
admin-lua-script=D:/Users/shenfeng271/dev/tool/mysql-proxy-0.8.5-windows-x86-32bit/lib/mysql-proxy/lua/admin.lua
proxy-backend-addresses=1.2.3.4:3897
log-file=D:/Users/shenfeng271/dev/tool/mysql-proxy-0.8.5-windows-x86-32bit/log/mysql-proxy.log
log-level=debug
daemon=true
keepalive=true
  1. 运行
mysql-proxy.exe --defaults-file=D:/Users/shenfeng271/dev/tool/mysql-proxy-0.8.5-windows-x86-32bit/bin/mysql-proxy.conf