Stratum挖矿协议: 该协议是由SlushPool制定的,请参阅其官方文档:https://slushpool.com/help/manual/stratum-protocol
以下所有报文均使用\n做为行结束符。
矿机订阅:
{"id": 1, "method": "mining.subscribe", "params": []}| #!/bin/bash | |
| # install CUDA Toolkit v9.0 | |
| # instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb) | |
| CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb" | |
| wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG} | |
| sudo dpkg -i ${CUDA_REPO_PKG} | |
| sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
| sudo apt-get update | |
| sudo apt-get -y install cuda-9-0 |
Stratum挖矿协议: 该协议是由SlushPool制定的,请参阅其官方文档:https://slushpool.com/help/manual/stratum-protocol
以下所有报文均使用\n做为行结束符。
矿机订阅:
{"id": 1, "method": "mining.subscribe", "params": []}| #!/bin/bash | |
| # save as /root/del_user.sh | |
| USERNAME=$1 | |
| if [[ -z "$USERNAME" ]]; then | |
| echo "Please give me a username" | |
| exit 1 | |
| fi | |
| echo "This script will" |
| #!/bin/sh | |
| param=$1 | |
| if [ $(id -u) != "0" ]; then | |
| echo "Error: You must be root to run this script." | |
| exit 1 | |
| fi | |
| start() |
| #!/bin/bash | |
| PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
| export PATH | |
| # Check if user is root | |
| if [ $(id -u) != "0" ]; then | |
| echo "Error: You must be root to run this script, please use root to install nfs" | |
| exit 1 | |
| fi |
| <?php | |
| class MCrypt { | |
| private $hex_iv = '00000000000000000000000000000000'; // converted JAVA byte code in to HEX and placed it here | |
| private $key = 'U1MjU1M0FDOUZ.Qz'; //Same as in JAVA | |
| function __construct() { | |
| $this->key = hash('sha256', $this->key, true); | |
| } | |
| function encrypt($str) { |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from Queue import Queue | |
| import threading, random, time | |
| __author__ = 'homeway' | |
| __version__ = '2015.10.01' | |
| class producer(threading.Thread): |
vi /etc/sysctl.conf
# 将net.ipv4.ip_forward=0更改为net.ipv4.ip_forward=1
sysctl -p
DNS的解析方案为 resolve.conf ==> dnsmasq ==> pdnsd
| #!/bin/sh | |
| PROXY_USER=user | |
| PROXY_PASS=password | |
| PROXY_PORT=3128 | |
| # Clear the repository index caches | |
| yum clean all | |
| # Update the operating system |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <stdio.h> | |
| #include <sys/types.h> | |
| #include <string.h> | |
| #include <sys/wait.h> | |
| #include <fcntl.h> | |
| #include <errno.h> | |
| #define TRUE 1 |