分类
未分类

vultr的debian9下安装windows

1、将VPS重装至Debian 9

2、安装依赖

apt-get update -y
apt-get install -y gawk sed grep
3、执行安装脚本

Windows 2008

wget –no-check-certificate -qO InstallNET.sh ‘https://moeclub.org/attachment/LinuxShell/InstallNET.sh’ && bash InstallNET.sh -dd ‘https://odrive.aptx.xin/System/newS2008R2DATA.vhd.gz’
Windows 2012

wget –no-check-certificate -qO InstallNET.sh ‘https://moeclub.org/attachment/LinuxShell/InstallNET.sh’ && bash InstallNET.sh -dd ‘https://odrive.aptx.xin/System/S2012R2DATA2018410.vhd.gz’
Windows 2016

wget –no-check-certificate -qO InstallNET.sh ‘https://moeclub.org/attachment/LinuxShell/InstallNET.sh’ && bash InstallNET.sh -dd ‘https://odrive.aptx.xin/System/S2016DATA2018415.vhd.gz’
这里提供的DD包需要VNC设置密码,如需已设置好密码的DD包自行百度

DD包来源:http://arv.asuhu.com/dd/

分类
未分类

Windows Server 2016离线安装.NET Framework 3.5

windows server 2016默认是不安装.netframework3.5的,可以在添加删除程序中单独添加。但是有时候系统安装文件不在的时候,找不到安装程序就不能安装成功。

这时候单独下载dotnetfx35直接安装是安装不上的,需要用一下方法进行单独安装:

通过 NetFx3.cab 文件安装

NetFx3.cab下载链接:https://pan.baidu.com/s/1O24nLgXhehHveae25p9SLg 密码:amgu

安装方法:下载NetFx3.cab后将其放于C盘WINDOWS文件夹下(C:\Windows)

点击“开始”找到“Windows PowerShell”右击“以管理员身份运行”,输入如下命令:

dism.exe /online /add-package /packagepath:C:\WINDOWS\netfx3.caB

分类
未分类

server2016完美添加virtio驱动

server2016
1,查看:
dism /get-wiminfo /wimfile:C:\install.wim
dism /get-wiminfo /wimfile:C:/boot.wim
2,
挂载install.wim映像第2个索引标准版带GUI,添加驱动
dism /mount-wim /wimfile:C:\install.wim /index:2 /mountdir:C:\mnt
安装进度条约2分钟
dism /image:C:\mnt /add-driver /driver:C:\virtio\NetKVM\2k16\amd64\netkvm.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioscsi\2k16\amd64\vioscsi.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viostor\2k16\amd64\viostor.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viorng\2k16\amd64\viorng.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioserial\2k16\amd64\vioser.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\Balloon\2k16\amd64\balloon.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qxldod\2k16\amd64\qxldod.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\pvpanic\2k16\amd64\pvpanic.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemupciserial\2k16\amd64\qemupciserial.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemufwcfg\2k16\amd64\qemufwcfg.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioinput\2k16\amd64\vioinput.inf /forceunsigned
获取已经添加好的驱动
dism /image:C:\mnt /get-drivers
成功后卸载并保存
dism /unmount-wim /mountdir:C:\mnt /commit
进度条约2分钟
查看boot.wim
dism /get-wiminfo /wimfile:C:/boot.wim
挂载1
dism /mount-wim /wimfile:c:\boot.wim /index:1 /mountdir:C:\mnt
dism /image:C:\mnt /add-driver /driver:C:\virtio\NetKVM\2k16\amd64\netkvm.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioscsi\2k16\amd64\vioscsi.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viostor\2k16\amd64\viostor.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viorng\2k16\amd64\viorng.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioserial\2k16\amd64\vioser.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\Balloon\2k16\amd64\balloon.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qxldod\2k16\amd64\qxldod.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\pvpanic\2k16\amd64\pvpanic.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemupciserial\2k16\amd64\qemupciserial.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemufwcfg\2k16\amd64\qemufwcfg.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioinput\2k16\amd64\vioinput.inf /forceunsigned
卸载和保存1
dism /image:C:\mnt /get-drivers
dism /unmount-wim /mountdir:C:\mnt /commit
挂载1
dism /mount-wim /wimfile::\boot.wim /index:2 /mountdir:C:\mnt
dism /image:C:\mnt /add-driver /driver:C:\virtio\NetKVM\2k16\amd64\netkvm.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioscsi\2k16\amd64\vioscsi.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viostor\2k16\amd64\viostor.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viorng\2k16\amd64\viorng.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioserial\2k16\amd64\vioser.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\Balloon\2k16\amd64\balloon.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qxldod\2k16\amd64\qxldod.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\pvpanic\2k16\amd64\pvpanic.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemupciserial\2k16\amd64\qemupciserial.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemufwcfg\2k16\amd64\qemufwcfg.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioinput\2k16\amd64\vioinput.inf /forceunsigned
卸载和保存2
dism /image:C:\mnt /get-drivers #获取添加的驱动信息
dism /unmount-wim /mountdir:C:\mnt /commit #卸载

封装新的 ISO 镜像
  1. 使用 UltraISO 打开原 Windows ISO 安装盘镜像。
   注意,这里可就不能使用压缩软件了,否则会丢失 ISO 的引导数据。
  2. 在 sources 文件夹下,删除boot.wim与install.wim。
  3. 将添加好驱动的boot.wim与install.wim拖到 sources 下。
  4. 点击【文件】→【另存为】,保存出一个新 ISO 镜像即可。

分类
未分类

vultr付款链接

分类
linux系统

服务器自动挂载第二块硬盘

Centos系统请使用以下命令:

  1. yum install wget -y && wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh

复制代码

Ubuntu系统请使用以下命令:

  1. wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && sudo bash auto_disk.sh

复制代码

Debian系统请使用以下命令:

  1. wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh

复制代码

分类
linux系统

19版centos8安装nvdia驱动时的报错的解决办法

错误日志里面提示安装

please install libelf-dev, libelf-devel or elfutils-libelf-devel

这个提示有错误!!请执行下面的命令!!!

yum install elfutils-libelf-devel

再次安装显卡驱动,完美解决

分类
编程语言

mysql语句字段自增

UPDATE `bbs_thread` SET last_date = last_date + 50000000

分类
linux系统

用shell命令操作数据库

有时候, 要批量执行sql语句, 怎么搞起呢? 在不会shell之前, 我这么搞: 先写一大堆命令, 一起复制到mysq中l执行, 呵呵哒, 虽能笑掉大牙, 但偶尔会有用。 很低级。下面, 我们一起来看看比较好的姿势。

姿势一: shell脚本中写sql语句, 这是我们最容易想到的

来看看, db.sh文件内容如下:

#! /bin/bash
host=”xxx”
port=”xxx”
userName=”xxx”
password=”xxx”
dbname=”xxx”
dbset=”–default-character-set=utf8 -A”

cmd=”show tables”

mysql -h${host} -u${userName} -p${password} ${dbname} -P${port} -e “${cmd}”
执行./db.sh, 获取到了正确的结果。 注意: cmd中可以包含多条命令

#! /bin/bash
host=”xxx”
port=”xxx”
userName=”xxx”
password=”xxx”
dbname=”xxx”
dbset=”–default-character-set=utf8 -A”

cmd=”show tables;
show table;
show table;”

mysql -h${host} -u${userName} -p${password} ${dbname} -P${port} -e “${cmd}”

当然, 你也可以这么搞:

#! /bin/bash
host=”xxx”
port=”xxx”
userName=”xxx”
password=”xxx”
dbname=”xxx”
dbset=”–default-character-set=utf8 -A”

mysql -h${host} -u${userName} -p${password} ${dbname} -P${port} << EOF

show tables;
show tables;
show tables;

EOF
为了保险起见, 根据经验, 经常需要在上述sql语句后加上 exit;语句, 确保mysql退出。

姿势二: 写sql文件, 然后在shell中执行, test.sql文件内容为:

show tables;
执行:
mysql -hDbIP -uUserName -pPassword DbName -PDbPort –default-character-set=utf8 -A < “test.sql”
请注意替换该替换的, 如DbIP, UserName, Password, DbName, DbPort
试了一下, OK的, 结果符合预期。

上述执行语句也可以改为:

mysql -hDbIP -uUserName -pPassword DbName -PDbPort –default-character-set=utf8 -A -e “source test.sql”
亦可。

分类
未分类

锐速换内核和安装

下载更换内核
CentOS6 内核更换为: 2.6.32-504.3.3.el6.x86_64

rpm -ivh http://soft.91yun.pw/ISO/Linux/CentOS/kernel/kernel-firmware-2.6.32-504.3.3.el6.noarch.rpm
rpm -ivh http://soft.91yun.pw/ISO/Linux/CentOS/kernel/kernel-2.6.32-504.3.3.el6.x86_64.rpm –force
CentOS7 内核更换为: 3.10.0-229.1.2.el7.x86_64
rpm -ivh http://soft.91yun.pw/ISO/Linux/CentOS/kernel/kernel-3.10.0-229.1.2.el7.x86_64.rpm –force
查看内核是否安装成功
rpm -qa | grep kernel
如果显示里面有这个内核就对了。

重启,查看内核是否更换成功
reboot
uname -r

锐速破解版安装方法:
1
wget -N –no-check-certificate https://github.com/91yun/serverspeeder/raw/master/serverspeeder.sh && bash serverspeeder.sh

锐速破解版卸载方法:
1
chattr -i /serverspeeder/etc/apx* && /serverspeeder/bin/serverSpeeder.sh uninstall -f

分类
未分类

COSMIC 和 CCLE

使用来自癌症体细胞突变目录(COSMIC)和癌细胞系百科全书(CCLE)的1,393种癌细胞系的全基因组基因分型数据。