pes2020猪场手游,联赛sim挂机脚本

2020年5月16日

Dim x, y, time

Randomize

x = Int((30 – (-30) + 1) * Rnd + (-30))

y = Int((10 – (- 10 ) + 1) * Rnd + (- 10 ))

time = Int((200 – (- 1 ) + 1) * Rnd + (- 1 ))

IfColor 8, 754, “14100e”, 0 Then

MoveTo 200, 310

LeftClick 1

End If

IfColor 490, 490, “1400dc”, 0 Then

MoveTo 357 + x, 485 + y

LeftClick 1

Delay 1000 + time

End If

IfColor 1228, 89, “ff7a00”, 0 Then

MoveTo 1228 + y, 89 + y

LeftClick 1

End If

IfColor 720, 59, “ff7a00”, 0 Then

MoveTo 174 + x, 147 + y

LeftClick 1

Delay 3000 + time

MoveTo 330 + x, 633 + y

LeftClick 1

Delay 3000 + time

MoveTo 894 + x, 220 + y

LeftClick 1

Delay 3000 + time

End If

IfColor 404, 126, “2f3bff”, 0 Then

Delay 1000 + time

MoveTo 206 + x, 195 + y

LeftClick 1

Delay 2000 + time

MoveTo 96 + x, 312 + y

LeftClick 1

Delay 2000 + time

MoveTo 705 + x, 188 + y

LeftClick 1

Delay 2000 + time

IfColor 769, 615, “ff7a00”, 0 Then

MoveTo 265 + x, 615 + y

LeftClick 1

Else

MoveTo 639 + x, 615 + y

LeftClick 1

End If

Delay 2000 + time

MoveTo 639 + x, 241 + y

LeftClick 1

Delay 4000 + time

MoveTo 190 + x, 717 + y

LeftClick 1

Delay 2000 + time

LeftClick 1

End If

IfColor 750,714, “f4eeee”,0 then

MoveTo 640 + x, 714 + y

LeftClick 1

Delay 120 + time

End If

IfColor 1091,710,”fd7900″,0 Then

MoveTo 1091 + x + x, 710 + y

LeftClick 1

Delay 4001

End If

IfColor 642,307,”6430ff”,2 Then

MoveTo 707 + x, 583 + y

LeftClick 1

Delay 2001 + time

MoveTo 745 + x, 713 + y

LeftClick 1

Delay 2012 + time

MoveTo 627 + x, 245 + y

LeftClick 1

Delay 2052 + time

MoveTo 512 + x, 414 + y

LeftClick 1

Delay 2031 + time

MoveTo 716 + x, 446 + y

LeftClick 1

Delay 6047 + time

MoveTo 716 + x, 537 + y

LeftClick 1

Delay 2013 + time

MoveTo 1092 + x, 714 + y

LeftClick 1

Delay 2087 + time

End If

IfColor 705,605,”f1decb”,0 Then

MoveTo 705 + x, 605 + y

LeftClick 1

Delay 102 + time

End If

IfColor 62,77,”301e00″,0 Then

MoveTo 884 + x * 5, 364 + y * 15

LeftClick 1

Delay 102 + time

End If

IfColor 329,660,”301e00″,0 Then

MoveTo 884 + x * 5, 364 + y * 15

LeftClick 1

Delay 102 + time

End If

IfColor 706, 500, “F1DECB”, 0 Then

MoveTo 706 + x, 500 + y

LeftClick 1

Delay 102 + time

End If

IfColor 738, 553, “F1DECB”, 0 Then

MoveTo 738 + x, 553 + y

LeftClick 1

Delay 1102 + time

MoveTo 722 + x, 711 + y

LeftClick 1

Delay 1202 + time

End If

IfColor 722, 459, “F1DECB”, 0 Then

MoveTo 722 + x, 459 + y

LeftClick 1

Delay 104 + time

End If

Delay 100 + time

==================
BY B站hoassi支持自动闪退重进,图标放第二行第一列

pes2020猪场手游,天梯sim挂机脚本

2020年5月16日

Dim x, y, time

Randomize

x = Int((30 – (-30) + 1) * Rnd + (-30))

y = Int((10 – (- 10 ) + 1) * Rnd + (- 10 ))

time = Int((200 – (- 1 ) + 1) * Rnd + (- 1 ))

IfColor 1200, 50, “ffffff”, 0 Then

MoveTo 200, 310

LeftClick 1

End If

IfColor 44, 71, “2A00E0”, 0 Then

MoveTo 357 + x, 485 + y

LeftClick 1

Delay 1000 + time

End If

IfColor 1228, 89, “ff7a00”, 0 Then

MoveTo 1228 + y, 89 + y

LeftClick 1

End If

IfColor 727, 66, “3C081A”, 0 Then

MoveTo 174 + x, 147 + y

LeftClick 1

Delay 3000 + time

MoveTo 935 + x, 365 + y

LeftClick 1

Delay 3000 + time

MoveTo 637 + x, 386 + y

LeftClick 1

Delay 3000 + time

End If

IfColor 404, 126, “2f3bff”, 0 Then

Delay 1000 + time

MoveTo 206 + x, 195 + y

LeftClick 1

Delay 2000 + time

MoveTo 96 + x, 312 + y

LeftClick 1

Delay 2000 + time

MoveTo 705 + x, 188 + y

LeftClick 1

Delay 2000 + time

IfColor 769, 615, “ff7a00″, 0 Then

MoveTo 265 + x, 615 + y

LeftClick 1

Else

MoveTo 639 + x, 615 + y

LeftClick 1

End If

Delay 2000 + time

MoveTo 639 + x, 241 + y

LeftClick 1

Delay 4000 + time

MoveTo 190 + x, 717 + y

LeftClick 1

Delay 2000 + time

LeftClick 1

End If

IfColor 1091,710,”fd7900″,0 Then

MoveTo 1091 + x + x, 710 + y

LeftClick 1

Delay 4001

End If

IfColor 642,307,”6430ff”,2 Then

MoveTo 707 + x, 583 + y

LeftClick 1

Delay 2001 + time

MoveTo 745 + x, 713 + y

LeftClick 1

Delay 2012 + time

MoveTo 627 + x, 245 + y

LeftClick 1

Delay 2052 + time

MoveTo 512 + x, 414 + y

LeftClick 1

Delay 2031 + time

MoveTo 716 + x, 446 + y

LeftClick 1

Delay 6047 + time

MoveTo 716 + x, 537 + y

LeftClick 1

Delay 2013 + time

MoveTo 1092 + x, 714 + y

LeftClick 1

Delay 2087 + time

End If

IfColor 705,605,”f1decb”,0 Then

MoveTo 705 + x, 605 + y

LeftClick 1

Delay 102 + time

End If

IfColor 62,77,”301e00″,0 Then

MoveTo 884 + x * 5, 364 + y * 15

LeftClick 1

Delay 102 + time

End If

IfColor 329,660,”301e00″,0 Then

MoveTo 884 + x * 5, 364 + y * 15

LeftClick 1

Delay 102 + time

End If

IfColor 706, 500, “F1DECB”, 0 Then

MoveTo 706 + x, 500 + y

LeftClick 1

Delay 102 + time

End If

IfColor 738, 553, “F1DECB”, 0 Then

MoveTo 738 + x, 553 + y

LeftClick 1

Delay 1102 + time

MoveTo 722 + x, 711 + y

LeftClick 1

Delay 1202 + time

End If

IfColor 722, 459, “F1DECB”, 0 Then

MoveTo 722 + x, 459 + y

LeftClick 1

Delay 104 + time

End If

Delay 100 + time

=================
BY B站hoassi支持自动闪退重进,图标放在左边第一列第二行

pes2020国际服手游,SIM季节赛挂机脚本

2020年5月16日

Dim x, y, time

Randomize

x = Int((30 – (-30) + 1) * Rnd + (-30))

y = Int((10 – (- 10 ) + 1) * Rnd + (- 10 ))

time = Int((200 – (- 1 ) + 1) * Rnd + (- 1 ))

IfColor 1200, 50, “ffffff”, 0 Then

MoveTo 200, 180

LeftClick 1

End If

IfColor 226, 287, “7800eb”, 0 Then

MoveTo 357 + x, 485 + y

LeftClick 1

Delay 1000 + time

End If

IfColor 1228, 89, “ff7a00”, 0 Then

MoveTo 1228 + y, 89 + y

LeftClick 1

End If

IfColor 720, 59, “ff7a00”, 0 Then

Delay 2000 + time

MoveTo 174 + x, 147 + y

LeftClick 1

Delay 3000 + time

IfColor 331, 388, “ffffff”, 0 Then

MoveTo 1057 + x, 629 + y * 2

LeftClick 1

Delay 3000 + time

End If

End If

IfColor 723, 192, “fe7900”, 0 Then

IfColor 764, 192, “fefefe”, 0 Then

IfColor 678, 192, “fefefe”, 0 Then

MoveTo 809 + x, 365 + y * 5

LeftClick 1

Delay 3000 + time

End If

End If

End If

IfColor 404, 126, “2f3bff”, 0 Then

Delay 1000 + time

IfColor 206, 195, “ffffff”, 0 Then

MoveTo 206 + x, 195 + y

LeftClick 1

Delay 2000 + time

MoveTo 96 + x, 312 + y

LeftClick 1

Delay 3000 + time

MoveTo 747 + x, 186 + y

LeftClick 1

Delay 3000 + time

End If

IfColor 30, 615, “FFFFFF”, 0 Then

MoveTo 30 + x, 545 + y

LeftClick 1

Else

MoveTo 639 + x, 545 + y

LeftClick 1

End If

Delay 2000 + time

MoveTo 1111 + x, 717 + y

LeftClick 1

Delay 6000 + time

MoveTo 639 + x, 450 + y

LeftClick 1

Delay 2000 + time

MoveTo 156 + x, 717 + y

LeftClick 1

End If

IfColor 260,211,”2f3bff”,0 Then

Delay 2001 + time

IfColor 837, 208, “2f3bff”, 0 Then

MoveTo 803 + x, 255 + y*3

LeftClick 1

Delay 213 + time

MoveTo 803 + x, 407 + y*3

LeftClick 1

Delay 209 + time

MoveTo 803 + x, 559 + y*3

LeftClick 1

Delay 230 + time

End If

MoveTo 454 + x, 254 + y*3

LeftClick 1

Delay 231 + time

MoveTo 454 + x, 406 + y*3

LeftClick 1

Delay 210 + time

MoveTo 454 + x, 558 + y*3

LeftClick 1

Delay 224 + time

MoveTo 745 + x, 713 + y

LeftClick 1

Delay 2012 + time

MoveTo 627 + x, 245 + y

LeftClick 1

Delay 2052 + time

MoveTo 512 + x, 414 + y

LeftClick 1

Delay 2031 + time

MoveTo 716 + x, 446 + y

LeftClick 1

Delay 6047 + time

MoveTo 716 + x, 537 + y

LeftClick 1

Delay 2013 + time

MoveTo 1113 + x, 719 + y

LeftClick 1

Delay 2087 + time

End If

IfColor 1091,710,”fd7900″,0 Then

MoveTo 1107 + x * 4, 717 + y * 3

LeftClick 1

Delay 2001 + time

End If

IfColor 705,605,”f1decb”,0 Then

MoveTo 705 + x, 605 + y

LeftClick 1

Delay 102 + time

End If

IfColor 37,117,”472344″,2 Then

MoveTo 1091 + x + x, 710 + y

LeftClick 1

Delay 102 + time

End If

IfColor 82,184,”472344″,2 Then

MoveTo 1091 + x + x, 710 + y

LeftClick 1

Delay 110 + time

End If

IfColor 706, 500, “F1DECB”, 0 Then

MoveTo 706 + x, 500 + y

LeftClick 1

Delay 102 + time

End If

IfColor 710, 714, “f4eeee”, 0 Then

MoveTo 638 + x+ x, 717 + y

LeftClick 1

Delay 500 + time

End If

IfColor 738, 553, “F1DECB”, 0 Then

MoveTo 738 + x, 553 + y

LeftClick 1

Delay 1102 + time

MoveTo 722 + x, 711 + y

LeftClick 1

Delay 1202 + time

End If

IfColor 722, 459, “F1DECB”, 0 Then

MoveTo 722 + x, 459 + y

LeftClick 1

Delay 104 + time

End If

IfColor 93, 468, “fe7900”, 0 Then

IfColor 93, 604, “fe7900”, 0 Then

IfColor 183, 714, “fe7900”, 0 Then

MoveTo 183 + x, 714 + y

LeftClick 1

Delay 2000 + time

End If

End If

End If

IfColor 1149, 591, “ff7a00”, 0 Then

IfColor 586, 591, “ff7a00”, 0 Then

IfColor 1101, 591, “ffffff”, 0 Then

MoveTo 920 + x, 400 + y

LeftClick 1

Delay 2000 + time

End If

End If

End If

Delay 100 + time

=========================
BY B站hoassi,APP图标放第一行第一列

PES2020手游刷熟练度教练列表

2020年5月7日

管理值 阵型 姓名 国籍
750 4231 拉斯洛*伯勒尼 罗马尼亚
730 532 马里乌斯*舒穆迪卡 罗马尼亚
730 4222 艾库特*科贾曼 土耳其
720 4213 伯纳德*沙朗德 瑞士
720 433 卡莱*英厄布里格森 挪威
710 3223 贝尼亚特*圣何塞 西班牙
700 3232 安德烈*加斯帕尔 巴西
700 433 马克*布里斯 比利时
700 4231 埃罗尔*布卢特 土耳其
700 4321 肯特*涅尔森 丹麦
690 4222 金钟夫 韩国
690 4231 迪奥尼西奥*博松 阿根廷
690 4321 胡利奥*里瓦斯 乌拉圭
690 4312 罗伯托*文图拉托 意大利
690 5212 哈基姆*沙克尔 伊拉克
680 4222 热尔松*古斯芒 巴西
670 4321 贝恩德*霍勒巴赫 德国
670 4231 伊斯梅尔*卡塔尔 土耳其
660 4231 胡伦*皮纳塔尔 哥伦比亚
660 4231 阿德里安*洛伦索 哥伦比亚
650 433 克里斯蒂安*尼尔森 丹麦
640 433 彼得*瑟伦森 丹麦
600 3232 赫尔曼*科明 罗马尼亚
600 5221 素拉蓬I*空贴 泰国
590 4231 巴勇*坤南 泰国
580 3241 差萨克*西里普姆 泰国

HWSignatureEx.dll SogouExe.exe删不掉?

2020年4月21日

先试更改用户所有者
takeown /f 111/ /r /a

再试授权
icacls 111/ /grant “administrators:(f)” /t /c

然后就可以完全删掉了。

Centos7安装openmeetings4

2020年4月14日

vi /etc/selinux/config
selinux=disable

# epel repo
yum install -y epel-release

# rpmfusion repo
sudo yum localinstall –nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm

# nux repo
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

# Adobe repo 64-bit x86_64 For Flash player
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

# JDK11. icedtea-web for can access to record and share desktop
yum install -y java-11-openjdk-devel icedtea-web wget

# 选择JDK版本
update-alternatives –config java

# OpenMeetings will need LibreOffice to convert to pdf the uploaded office files
yum -y install libreoffice libreoffice-headless

# Installation of Ghostscript, necessary packages and libraries
yum install -y ghostscript libjpeg libjpeg-devel freetype freetype-devel unzip gcc gcc-c++ ncurses ncurses-devel make zlib zlib-devel libtool bison bison-devel openssl-devel bzip2 bzip2-devel file-roller git autoconf automake pkgconfig tomcat-native nmap vlc

# ImageMagick, work the images files jpg, png, gif. Sox, work the sound
yum install -y ImageMagick sox giflib giflib-devel giflib-utils

# OpenMeetings even need Adobe Flash Player for cam and audio
yum install -y flash-plugin

# FFmpeg work with video
yum install -y glibc alsa-lib-devel faac faac-devel faad2 faad2-devel gsm gsm-devel imlib2 imlib2-devel lame-devel vorbis-tools theora-tools libvpx-devel vlc autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel curl

# Installation MariaDB data server
yum install -y mariadb-server
# 启动,设置
systemctl start mariadb.service
mysqladmin -u root password YOUR-password
mysql -u root -p
# create a user with all permission on this meetdb database. name of the database:meetdb; user for that database:meetuser; password of that user:meetuser
> CREATE DATABASE meetdb DEFAULT CHARACTER SET ‘utf8’;
> CREATE USER meetuser;
> GRANT ALL PRIVILEGES ON meetdb.* TO ‘meetuser’@’localhost’ IDENTIFIED BY ‘1a2B3c4D’ WITH GRANT OPTION;
> FLUSH PRIVILEGES;
> \q

# Installation of OpenMeetings
mkdir /opt/meeting
cd /opt/meeting
wget http://archive.apache.org/dist/openmeetings/4.0.10/bin/apache-openmeetings-4.0.10.tar.gz
tar xzvf apache-openmeetings-4.0.10.tar.gz
mv apache-openmeetings-4.0.10.tar.gz /opt

# Download and install the connector between OpenMeetings and MariaDB:
cd /opt
wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.48/mysql-connector-java-5.1.48.jar
cp /opt/mysql-connector-java-5.1.48.jar /opt/meeting/webapps/openmeetings/WEB-INF/lib

# Script to launch red5-OpenMeetings
cd /opt
wget https://cwiki.apache.org/confluence/download/attachments/27838216/red5-2
cp red5-2 /etc/init.d/
chmod +x /etc/init.d/red5-2
vi /etc/init.d/red5-2
RED5_HOME=/opt/red54010
…to
RED5_HOME=/your-path-installation

# Run red5-OpenMeetings
systemctl restart mariadb.service
/etc/init.d/red5-2 start

# go with your browser to:
http://localhost:5080/openmeetings

# 配置openmeetings
打开的网页,下一步,
第2页配置 Choose DB type to MySQL
mysql
localhost
3306
meetdb
meetuser
your-password
第3页,创建管理员用户
第4页,下一步,
第5页,配置IMAGEMAGICK,FFMPEG,SOX,LIBREOFFICE路径
ImageMagick Path == /usr/bin
FFMPEG Path == /usr/bin
FFMPEG Path == /usr/bin
OpenOffice/LibreOffice Path for
jodconverter == /usr/lib64/libreoffice
第6页,下一步,
第7页,Finish
# 重启应用
/etc/init.d/red5-2 restart
第8页,Enter the Application

# 防火墙开启如下端口
1935 5080

=========================
# 编译安装Ghostscript 9.27
cd /opt
wget https://cwiki.apache.org/confluence/download/attachments/27838216/ghostscript.sh
chmod +x ghostscript.sh
…and run it:
./ghostscript.sh
…when be finished will announce it: GhostScript compilation is Finished!
rm -Rf /opt/ghostscript-9.27

# 编译安装SOX
wget http://ftp.icm.edu.pl/packages/sox/14.4.2/sox-14.4.2.tar.gz
tar xzvf sox-14.4.2.tar.gz
cd /opt/sox-14.4.2
./configure
make && make install
cd /op

# 编译安装FFMPEG
https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
cd /opt
wget https://cwiki.apache.org/confluence/download/attachments/27838216/ffmpeg_centos7.sh
…concede execution permission to it:
chmod +x ffmpeg_centos7.sh
…and run it (be connected to Internet). The compilation will spend about 30 minutes:
./ffmpeg_centos7.sh
All the compiled files will be installed in: /usr/local/bin

windows打补丁后无法引导

2020年3月24日

针对挂起补丁进行清理卸载去除:
dism /image:e:\ /cleanup-image /revertpendingactions

查看挂起的补丁:
dism /image:e:\ /get-packages /format:table

卸载某补丁:
32位系统:
dism /Image:C:\ /Remove-Package /PackageName:Package_for_KB3146706~31bf3856ad364e35~x86~~6.1.1.2

64位系统:
dism /Image:C:\ /Remove-Package /PackageName:Package_for_KB3146706~31bf3856ad364e35~amd64~~6.1.1.2

重装WIN7引发的双硬盘双系统ARCH LINUX无法引导问题

2020年3月10日

一、环境介绍
UEFI-GPT
arch linux
/dev/sdb

BIOS-MBR
win7
/dev/sda

二、GHOST WIN7后现象:
ARCH LINUX已无法引导,无法找到系统。哪怕是把安装WIN7的SATA硬盘禁用掉,ARCH LINUX也无法引导启动。
WIN7系统无论从哪块硬盘都可以引导启动。(非常奇怪。GHOST的时候是在BIOS里面禁用ARCH LINUX所在SATA硬盘的)

三、排错过程
1、用ARCH LINUX安装U盘引导UEFI模式,进入arch emergency shell
查看磁盘分区信息
lsblk -f
直接挂载
mount /dev/sdb3 new_root
mount /dev/sdb1 /boot
安装GRUB
grub-install –target=x86_64-efi –efi-directory=/boot –bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

2、如果进入的是GRUB>提示符模式,请按如下操作恢复引导
find (hd1,0)/vmlinuz-(找到内核所在分区。按TAB键补齐命令,若能补齐命令,则内核在此分区)
root (hd1,0)
kernel /vmlinuz-按TAB键补齐命令
initrd /initramfs-按TAB键补齐命令
boot
或者
set root=(hd1,2)
linux (hd1,0)/vmlinuz-按TAB键补齐命令 root=/dev/sdb3
initrd (hd1,0)/initramfs-按TAB键补齐命令
boot

进入系统后
查看磁盘分区信息
lsblk -f
mount /dev/sdb3 /mnt/
mount /dev/sdb1 /mnt/boot
arch-chroot /mnt
重装GRUB
grub-install –target=x86_64-efi –efi-directory=/boot –bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
reboot

—————-
错误的步骤:
EASYbcd安装WINPE双系统引导程序
a、添加新条目——操作系统——LINUX/BSD——添加条目
b、编辑引导菜单——USE METRO BOOTloader(去掉打勾选项)——保存设置
重启电脑,卡在GRUB>提示符,因为BIOS未强制使用UEFI引导,所以efivar-tester的时候报错UEFI variables not supported on this machine
截止此处已无解。毕竟ARCH LINUX是在UEFI+GTP下面安装使用的,而WINDOWS是BIOS+MBR。

===========================
PS:创建ARCH安装U盘
1、找到U盘的盘符
lsblk -f
2、若U盘自动挂载了,请卸载
umount /xxx/udisk
3、做启动U盘
sudo dd bs=4M if=/home/xxx/Downloads/archlinux-2020.02.01-x86_64.iso of=/dev/sdc status=progress && sync

————-
BTW:双系统引导菜单
所有版本的 Windows 都不支持 BIOS 引导 GPT 分区上的 Windows 或 UEFI 引导 MBR 分区上的 Windows.目前官方 (Microsoft) 没有在 UEFI-MBR 或 BIOS-GPT 上运行 Windows 的方法.因此 Windows 只支持 UEFI-GPT 或 BIOS-MBR 启动.参阅 http://support.microsoft.com/kb/2581408
安装在 BIOS 模式下的 Arch Linux 的启动管理器也无法加载位于另一个 UEFI-GPT 硬盘上的 Windows.反之亦然

win7菜单引导archlinux
arch linux shell
dd if=/dev/sdb1 of=/mnt/archboot.bin bs=512 count=1

win7 cmd
新建启动菜单,生成{ID}
bcdedit /create /d “arch” /application bootsector
bcdedit /set {ID} device partition=c:
bcdedit /set {ID} path c:\archboot.bin
加入启动菜单
bcdedit /displayorder {ID} /addlast
bcdedit /timeout 3
删除启动菜单项
bcdedit /delete {ID}

————-
若想ARCH自动生产GRUB双系统引导菜单,就使用如下命令
pacman -S os-prober
mount /dev/sda1 /mnt
os-prober
grub-mkconfig -o /boot/grub/grub.cfg

若不想安装os-prober,那么就直接编辑GRUB菜单
vi /boot/grub/custom.cfg

if [ “${grub_platform}” == “pc” ]; then
menuentry “Microsoft Windows Vista/7/8/8.1/10 BIOS/MBR” {
insmod part_msdos
insmod ntfs
insmod ntldr
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1 –hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1 XXXXXXXXXXXXXXXX
ntldr /bootmgr
}
fi

XXXXXXXXXXXXXXXX是指文件系统的 UUID,可以通过 lsblk –fs 命令查看,或者用blkid查看

grafana与prometheus安装部署

2020年1月16日

1、prometheus安装
# 新建用户,下载GO语言的2进制执行软件包
useradd prometheus; passwd prometheus
wget https://github.com/prometheus/prometheus/releases/download/v2.15.2/prometheus-2.15.2.linux-amd64.tar.gz
wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz
tar -xvzf prometheus*.tar.gz
tar -xvzf node_exporter*.tar.gz

# 编辑监控本机自启动配置文件
vi /etc/systemd/system/node_exporter.service
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/home/prometheus/node_exporter/node_exporter

[Install]
WantedBy=multi-user.target

# 设置成为自启动
systemctl enable node_exporter

————————-
# 文件尾部添加node_exporter本机监控模块
vi home/prometheus/prometheus.yml
– job_name: ‘node_exporter’
scrape_interval: 15s
static_configs:
– targets: [‘localhost:9100’]

# 编辑时序DB自启动配置文件
vi /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus Monitoring
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/home/prometheus/prometheus/prometheus \
–config.file /home/prometheus/prometheus/prometheus.yml \
–storage.tsdb.path /home/prometheus/prometheus/ \
–web.console.templates=/home/prometheus/prometheus/consoles \
–web.console.libraries=/home/prometheus/prometheus/console_libraries
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

# 设置成为自启动
systemctl enable prometheus

2、安装Grafana
# 编辑源
vi /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt

# 在线安装
yum install grafana

# 设置成为自启动
systemctl enable grafana-server.service

# 添加数据源
点击Grafana logo打开侧边栏
点击 “Data Sources”
选择 “Add New”
选择 “Prometheus” 作为数据源
设置Prometheus服务的URL (例如本机: http://localhost:9090/)
点击 “Add” 测试连通性并保存数据源

pacman使用技巧

2020年1月9日

查询已安装的软件包
pacman -Qs

显示软件包的详尽的信息
pacman -Si

获取已安装软件包所包含文件的列表
pacman -Ql

查询远程库中软件包包含的文件
pacman -Fl

显示软件包的依赖树
pactree

检查一个安装的软件包被那些包依赖
whoneeds

检查一个安装的软件包被那些包依赖
whoneeds
pactree -r

清除未安装软件包的缓存,会保留软件包的当前有效版本
pacman -Sc

清理所有缓存。除非空间不足,否则不应这么做
pacman -Scc

默认会删除近3个版本前的软件包
paccache -r

下载包而不安装它
pacman -Sw

安装一个本地包(不从源里下载)
pacman -U /path/xxx.pkg.tar.xz

同步文件数据库
pacman -Fy
查询包含某个文件的包名
pacman -Fs pacman

将所有软件包按占用空间大小排序
expac -H M ‘%m\t%n’ | sort -h

递归删除孤立软件包
pacman -Rs $(pacman -Qtdq)
如果没有孤立软件包,将显示错误 error: no targets specified. 这个是正常的,因为 pacman -Rns 没有收到任何参数.

删除孤立软件包
pacman -Rns xxx

删除base软件包组以外的所有软件包
pacman -Rs $(comm -23 <(pacman -Qeq|sort) <((for i in $(pacman -Qqg base); do pactree -ul $i; done)|sort -u|cut -d ' ' -f 1))

避免过度清理缓存
vi /etc/pacman.conf的[options]段
CleanMethod = KeepCurrent

备份已安装软件包列表
comm -23 <(pacman -Qeq|sort) pkglist

安装列表中所有软件包
pacman -S $(< pkglist)

要是备份的软件包列表包含非官方软件包(从AUR或其他什么地方下载的),就得使用下面这个吓人的命令了,不然pacman会出错:
pacman -S –needed $(diff <(cat badpkglist|sort) <(diff <(cat badpkglist|sort) <(pacman -Slq|sort)|grep \<|cut -f2 -d' ')|grep \<|cut -f2 -d' ')

要是你的系统遭到了大规模破坏(比如rm -rf什么的),可以通过pacman重新安装所有软件包来挽救。
pacman -Qeq | pacman -S –
pacman -Qdq | pacman -S –asdeps –
如果安装了外来软件包,使用上面的命令会出错。下面的命令先生成所有软件包列表,再用pacman -Qmq剔除外来软件包,即重新安装所有仓库中可以找到的软件包,同时保留依赖安装、手动安装标志:
comm -23 <(pacman -Qeq) <(pacman -Qmq) | pacman -S –
comm -23 <(pacman -Qdq) “$db”

find /bin /etc /lib /sbin /usr \
! -name lost+found \
\( -type d -printf ‘%p/\n’ -o -print \) | sort > “$fs”

comm -23 “$fs” “$db”

要生成不属于任何软件包的文件列表:
pacman-disowned.sh > non-db.txt

递归删除孤立软件包:
pacman -Rs $(pacman -Qtdq)

列出所有不属于base或base-devel的已安装软件包
comm -23 <(pacman -Qeq|sort) <(pacman -Qgq base base-devel|sort)

———————–
回滚
cd /var/cache/pacman/pkg/
pacman -U networkmanager-qt-5.63.0-1-x86_64.pkg.tar.xz

以后不再更新此不稳定的软件组
vi /etc/pacman.conf
IgnoreGroup = networkmanager

添加第三方源
vi /etc/pacman.conf
[archlinuxcn]
Server = https://repo.archlinuxcn.org/$arch
倒入PGP密钥
sudo pacman -Syy && sudo pacman -S archlinuxcn-keyring

————————-
升级时遇到问题: "file exists in filesystem"(conflicting files)!
pacman -Qo 文件的完整路径 检查哪个软件包提供了文件

Signature from "User ” is unknown trust, installation failed
更新已知密钥
pacman-key –refresh-keys
手动升级archlinux-keyring软件包
pacman -Sy archlinux-keyring && pacman -Su

“failed to commit transaction (invalid or corrupted package” 错误
find /var/cache/pacman/pkg/ -iname “*.part” -exec rm {} \;

“error: failed to init transaction (unable to lock database)” 错误
rm /var/lib/pacman/db.lck

升级系统重启后,出现”unable to find root device”错误,无法登陆
如果系统可以启动,运行如下命令可以生产原始内核 linux 的 initramfs:
# mkinitcpio -p linux
如果上面方法不行,请下载最新的安装程序进行启动,执行:
# mount /dev/sdxY /mnt #Your root partition.
# mount /dev/sdxZ /mnt/boot #If you use a separate /boot partition.
# arch-chroot /mnt
# pacman -Syu mkinitcpio systemd-tools linux
重新安装内核(linux 软件包)将会自动运行 mkinitcpio -p linux 重新生成 initramfs 镜像,不需要单独生成。
之后建议执行 exit, umount /mnt/{boot,} 然后 reboot.
Note: 如果无法进入 arch-chroot 或 chroot 环境,但是需要重新安装软件包,可以使用 pacman -r /mnt -Syu foo bar

PowerpillError: aria2c exited with 8
powerpill -Syyu

===========================
https://wiki.archlinux.org/index.php/Pacman
https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks