mysql压缩版安装

1、解压到一个目录,修改配置文件

my-default.ini
basedir =E:\ProgramFiles\mysql-5.6.43-winx64
datadir =E:\ProgramFiles\mysql-5.6.43-winx64\data
port =3306

管理员打开CMD命令

mysqld -install
mysqladmin -u root -p password malong#修改密码
mysqld -remove
net stop mysql
mysql -u root -p

use mysql;报错
ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql
mysql -u root -p
换下面方式,为什么?权限问题?我也不懂
mysql -uroot -p
mysqladmin -uroot -p123 password 123123
修改密码后2种方式登录就没有关系了

C# winform 自定义透明控件,可以重叠

直接上代码:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
using System.Drawing.Imaging;

namespace WFControl
{
public partial class ArrowLine : UserControl
{
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x00000020;
return cp;
}
}
public ArrowLine()
{
InitializeComponent();
[subscribe]this.SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);[/subscribe]
this.SetStyle(ControlStyles.ResizeRedraw, false);
}
private int mlineHeight = 5;
private byte mdirection = 0;

///

/// 线条宽度.
///

[Description(“宽度”)]

public int LineHeight
{
get
{
return mlineHeight;
}
set
{
mlineHeight = value;
}
}
private int mIsArrow = 0;
///

/// 是否显示箭头.
///

[Description(“箭头”)]
public int IsArrow
{
get { return mIsArrow; }
set
{
mIsArrow = value;
}
}
///

/// 线条方向
///0:从右至左;1:从下至上;2:从左至右;3:从上至下.
///

[Description(“类型”)]

public byte Direction
{
get
{
return mdirection;
}
set
{
mdirection = value;
}
}
[Description(“颜色”)]
public Color color
{
get;
set;
}
protected override void OnPaint(PaintEventArgs e)
{
Color drawColor = Color.FromArgb(0, Color.Purple);
Brush brush = new SolidBrush(drawColor);

Pen pen = new Pen(this.color);
pen.Width = LineHeight;
AdjustableArrowCap aac = null;
AdjustableArrowCap aac1 = null;
if (mIsArrow == 1)
{
aac = new AdjustableArrowCap(4, 2);
pen.CustomStartCap = aac;
}
if (mIsArrow == 2)
{
aac = new AdjustableArrowCap(4, 2);
pen.CustomEndCap = aac;
}
if (mIsArrow == 3)
{
aac = new AdjustableArrowCap(4, 2);
aac1 = new AdjustableArrowCap(4, 2);
pen.CustomStartCap = aac;
pen.CustomEndCap = aac1;
}

int lenWidth = mlineHeight;
int x1 = 0;
int y1 = 0;
int x2 = 0;
int y2 = 0;
if (Direction == 0)
{
// 0:从右至左; 1:从下至上;2:从左至右; 3:从上至下.
x1 = this.Size.Width;
y1 = this.Size.Height / 2;
x2 = 0;
y2 = y1;
}
else if (Direction == 1)
{
x1 = this.Size.Width / 2;
y1 = this.Size.Height;
x2 = x1;
y2 = 0;
}
else if (Direction == 2)
{
//2:从左至右;
x1 = 0;
y1 = this.Size.Height / 2;
x2 = this.Size.Width;
y2 = y1;
}
else if (Direction == 3)
{
//3:从上至下.
x1 = this.Size.Width / 2;
y1 = 0;
x2 = x1;
y2 = this.Size.Height;
}

//e.Graphics.FillRectangle(brush, 0, 0, this.Size.Width, this.Size.Height);
e.Graphics.DrawLine(pen, x1, y1, x2, y2);
pen.Dispose();
if (mIsArrow == 1 || mIsArrow == 2)
{
aac.Dispose();
}
if (mIsArrow == 3)
{
aac.Dispose();
aac1.Dispose();
}
brush.Dispose();
}
}
}

在CentOS7上安装RabbitMQ

在CentOS7上安装RabbitMQ
1、erlang安装
rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
yum install erlang

rabbitmq安装
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-3.6.15-1.el7.noarch.rpm
yum install rabbitmq-server-3.6.15-1.el7.noarch.rpm

rabbitmq启动
systemctl start rabbitmq-server
rabbitmq管理插件安装
rabbitmq-plugins enable rabbitmq_management
rabbitmq加入开机启动
systemctl enable rabbitmq-server.service
rabbitmq启动服务
systemctl start rabbitmq-server.service
rabbitmq加入管理员和管理组和权限设置
rabbitmqctl add_user admin admin
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

删除guest用户
rabbitmqctl delete_user guest
开放rabbitmq15672端口
firewall-cmd --zone=public --add-port=15672/tcp --permanent
firewall-cmd --reload

查看rabbitmq安装成功
http://rabbitmq-server:15672/
如果发送订阅没有效果
cd /usr/share/doc/rabbitmq-server-3.7.17/
cp rabbitmq.config.example /etc/rabbitmq/
cd /etc/rabbitmq/
mv rabbitmq.config.example rabbitmq.config
修改rabbitmq.config里面disk_free_limit变量为500M,注意取消注释,重启rabbitmq,注意后面逗号影响重新启动

TensorFlow在Centos7上环境安装

1、Python版本为 2.7
yum install python-pip python-dev
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow # Python 2.7; CPU support (no GPU support)
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu #有N卡版本

如果安装失败,执行下面命令
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.6.0-cp27-none-linux_x86_64.whl # Python 2.7
卸载tensorflow
pip uninstall tensorflow
2、验证环境

运行一个简短的 TensorFlow 程序
从 shell 中调用 Python,如下所示:
python
在 Python 交互式 shell 中输入以下几行简短的程序代码:
# Python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

如果系统输出以下内容,就说明您可以开始编写 TensorFlow 程序了:
Hello, TensorFlow!

Fabric区块链学习—Centos7服务器环境配置

区块链学习必备条件:linux操作基础知识,了解虚拟机,翻墙知识,至少熟悉一门开发语言,中高级以上水平,学习能力强!!!
1、虚拟机安装  建议安装centos7 mini版本
https://blog.csdn.net/u010070703/article/details/78005081?locationNum=9&fps=1
2、记得配独立IP,桥接模式

vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
UUID=365a9bb3-6d86-4f27-b2d7-fcadb4b6343a
DEVICE=enp0s3
ONBOOT=yes
IPADDR=172.17.200.88
NETMASK=255.255.255.128
GATEWAY=172.17.200.1
#HWADDR=080027710F6C
DNS1=61.128.192.168
DNS2=61.128.128.68

3、配置centos源,设置阿里yum的源

sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
sudo wget/curl -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
其他命令参考
uname -r
uname -a
cat /proc/version
cat /etc/issue
cat /etc/redhat-release
yum -y install wget

yum clean all
rm -rf /var/cache/yum/*
yum makecache
yum update
ip addr
重启网络
systemctl restart network
安装gcc
yum install gcc 
yum install gcc-c++

4、GCC升级

yum -y install epel-release
yum install centos-release-scl-rh centos-release-scl
yum install devtoolset-3-gcc  devtoolset-3-gcc-c++
source /opt/rh/devtoolset-3/enable  
scl enable devtoolset-3 bash
echo "source /opt/rh/devtoolset-3/enable" >>/etc/profile

提示:yum包找不到去这个网站https://centos.pkgs.org
5、Docker安装

wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.12.0.ce-1.el7.centos.x86_64.rpm
yum install docker-ce-17.12.0.ce-1.el7.centos.x86_64.rpm
docker --version
systemctl start docker
删除所有带none关键字的镜像
docker rmi $(docker images | grep "none" | awk '{print $3}')
docker rmi -f $(docker images -q)
清空重置网络
docker rm -f $(docker ps -aq)
docker network prune
查看网络
docker network list
Docker镜像地址下载
先修改/etc/docker/daemon.json镜像文件地址 换养猪的地址
{ 
"registry-mirrors": ["http://hub-mirror.c.163.com"] 
}
systemctl daemon-reload
systemctl restart docker

6、安装Docker-Compose

curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version

7、安装go语言

wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.10.1.linux-amd64.tar.gz
环境变量
export PATH=$PATH:/usr/local/go/bin 
默认执行文件夹目录
export GOPATH=/opt/gopath

8、node 安装 注意版本
Python必须的2.7

python -v 
yum install pcre pcre-devel  
yum install zlib zlib-devel 
yum install openssl openssl--devel  
yum install -y readline-devel
wget http://nodejs.org/dist/v7.10.1/node-v7.10.1.tar.gz
tar -zxvf node-v7.10.1.tar.gz
cd node-v7.10.1
./configure && make && make install
node -v

9、npm安装

npm cache clean --force
npm install换
npm install -g cnpm --registry=https://registry.npm.taobao.org
或者 
npm config set registry https://registry.npm.taobao.org 
再
cnpm install 或 npm install
升级版本
npm i npm@latest -g

10、linux内核升级

cat /etc/redhat-release
uname -sr
yum clean all
yum update
reboot
上面操作无效

加入ELRepo 仓库:
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
列出可用的系统内核相关包:
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
安装最新的主线稳定内核:
yum --enablerepo=elrepo-kernel install kernel-ml
设置默认启动内核
vi /etc/default/grub 并设置 GRUB_DEFAULT=0
重新创建内核配置
grub2-mkconfig -o /boot/grub2/grub.cfg
reboot
uname -a
删除 CentOS 更新后的旧内核
查看系统中全部的内核 RPM 包
rpm -qa | grep kernel
yum remove 
kernel-tools-3.10.0-514.26.2.el7.x86_64 
kernel-devel-3.10.0-514.10.2.el7.x86_64 
kernel-3.10.0-514.26.2.el7.x86_64 
kernel-3.10.0-327.el7.x86_64 
kernel-headers-3.10.0-514.26.2.el7.x86_64 
kernel-devel-3.10.0-514.26.2.el7.x86_64 
kernel-tools-libs-3.10.0-514.26.2.el7.x86_64;
reboot

CentOS7安装PHP7与Nginx之PHP-FPM模式

采用yum安装PHP7.1.6Released版
1、添加PHP管理软件包的安装源
CentOS/RHEL 7.x安装源:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

CentOS/RHEL 6.x安装源:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

2、
[subscribe]mod_php安装模式

yum install mod_php71w php71w-opcache php71w-pecl-apcu php71w-common php71w-mysqlnd php71w-pdo php71w-pecl-imagick

php-fpm安装模式(现在一般选这个)

yum install php71w-fpm php71w-opcache php71w-pecl-apcu php71w-common php71w-mysqlnd php71w-pdo php71w-pecl-imagick

[/subscribe]
3、安装其他插件包

Package Provides
mod_php71w php71w, mod_php, php71w-zts
php71w-bcmath
php71w-cli php-cgi, php-pcntl, php-readline
php71w-common php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib
php71w-dba
php71w-devel
php71w-embedded php-embedded-devel
php71w-enchant
php71w-fpm
php71w-gd
php71w-imap
php71w-interbase php_database, php-firebird
php71w-intl
php71w-ldap
php71w-mbstring
php71w-mcrypt
php71w-mysql php-mysqli, php_database
php71w-mysqlnd php-mysqli, php_database
php71w-odbc php-pdo_odbc, php_database
php71w-opcache php71w-pecl-zendopcache
php71w-pdo php71w-pdo_sqlite, php71w-sqlite3
php71w-pdo_dblib php71w-mssql
php71w-pear
php71w-pecl-apcu
php71w-pecl-imagick
php71w-pecl-memcached
php71w-pecl-mongodb
php71w-pecl-redis
php71w-pecl-xdebug
php71w-pgsql php-pdo_pgsql, php_database
php71w-phpdbg
php71w-process php-posix, php-sysvmsg, php-sysvsem, php-sysvshm
php71w-pspell
php71w-recode
php71w-snmp
php71w-soap
php71w-tidy
php71w-xml php-dom, php-domxml, php-wddx, php-xsl
php71w-xmlrpc

4、启动php-fpm(默认端口9000)

systemctl start php-fpm

5、对应配置文件路径如下

/etc/php-fpm.conf
/etc/php.ini

6、安装nginx源
CentOS/RHEL 7.x:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

7、安装nginx

yum install nginx

8、启动nginx

systemctl start nginx

9、NGINX配置文件地址如下

/etc/nginx/nginx.conf

10、NGINX整合PHP-FPM,按照如下格式修改nginx server节点。

	
#增加权限 否则报错
chmod +777 /var/run/php-fpm/php-fpm.sock
root         /usr/share/nginx/html/;#PHP文件存放目录
location / {
         index index.php index.html;
         try_files $uri $uri/ /index.php?$args;
        }
location ~ \.php$ {
         fastcgi_pass  unix:/var/run/php-fpm/php-fpm.sock;
         fastcgi_index index.php;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         fastcgi_param QUERY_STRING    $query_string;
         fastcgi_param REQUEST_METHOD  $request_method;
         fastcgi_param CONTENT_TYPE    $content_type;
         fastcgi_param CONTENT_LENGTH  $content_length;
         include fastcgi_params;
       }

11、重新启动nginx

systemctl restart nginx

KMS激活windows10系统、office全套正版系统方法

对windows用户来说,KMS模拟器的出现简直是个奇迹,帮助大量用户解决了windows/office的激活问题,KMS模拟器从最早的虚拟机镜像移植逐步进化到了现在的RPC报文模拟。
此方法只能激活OFFICE系列VOL版,其他版本可以自行百度转化成VOL版本。
windows系统不受限制。
测试win10,office2013以上可以激活,其他未知。
#以及后面代表注释

windows激活方法:
1、用管理员命令打开cmd.exe命令提示符,执行以下命令;

slmgr /ipk  NPPR9-FWDCX-D2C8J-H872K-2YT43
slmgr /skms xykz.f3322.org
slmgr /ato

Office激活方法:
2、用管理员命令打开cmd.exe命令提示符,执行以下命令;

cd C:\Program Files (x86)\Microsoft Office\Office15  #换成你的office安装目录
cscript ospp.vbs /sethst:xykz.f3322.org  
cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99  
cscript ospp.vbs /act  

3、OFFICE密匙参考

https://technet.microsoft.com/en-us/library/dn385360.aspx

Product GVLK
Office 2013 Professional Plus YC7DK-G2NP3-2QQC3-J6H88-GVGXT
Office 2013 Standard KBKQT-2NMXY-JJWGP-M62JB-92CD4
Project 2013 Professional FN8TT-7WMH6-2D4X9-M337T-2342K
Project 2013 Standard 6NTH3-CW976-3G3Y2-JK3TX-8QHTT
Visio 2013 Professional C2FG9-N6J68-H8BTJ-BW3QX-RM3B3
Visio 2013 Standard J484Y-4NKBF-W2HMG-DBMJC-PGWR7
Access 2013 NG2JY-H4JBT-HQXYP-78QH9-4JM2D
Excel 2013 VGPNG-Y7HQW-9RHP7-TKPV3-BG7GB
InfoPath 2013 DKT8B-N7VXH-D963P-Q4PHY-F8894
Lync 2013 2MG3G-3BNTT-3MFW9-KDQW3-TCK7R
OneNote 2013 TGN6P-8MMBC-37P2F-XHXXK-P34VW
Outlook 2013 QPN8Q-BJBTJ-334K3-93TGY-2PMBT
PowerPoint 2013 4NT99-8RJFH-Q2VDH-KYG2C-4RD4F
Publisher 2013 PN2WF-29XG2-T9HJ7-JQPJR-FCXK4
Word 2013 6Q7VD-NX8JD-WJ2VH-88V73-4GBJ7

4、其他命令参考

cscript ospp.vbs /dstatus #查看原密钥后五位  
cscript ospp.vbs /unpkey:XXXXX #卸载原密钥,XXXXX代表后五位 

5、windows以及office正版下载地址

ed2k://|file|cn_windows_10_enterprise_x64_dvd_6846957.iso|4162242560|3F657E387CD65FE7BA69DACAAE0E3510|/

ed2k://|file|SW_DVD5_Office_Professional_Plus_2013_64Bit_ChnSimp_MLF_X18-55285.ISO|958879744|678EF5DD83F825E97FB710996E0BA597|/

https://pan.baidu.com/share/link?shareid=3433199708&uk=1862861517&app=zd