Using CPU to mine XMR coins on a standalone server Ubuntu

Using CPU to mine XMR coins on a standalone server Ubuntu

It has been introduced before, as follows:
1. MinerGate: Mining station for Windows, Mac, Ubuntu, Fedora, etc.
2. Use a dedicated server to mine Monero
3. Install Litecoin mining on CentOS 7

Mining efficiency is highest under Ubuntu system. Here is the tutorial.

1. Wallet and Payment-ID Acquisition
1. Obtaining a wallet
Monero wallet: https://hitbtc.com/. After registration, you will get the Monero wallet address in the background.

After entering, find XMR Monero below


The QR code or string of characters is the wallet address

2. Obtaining Payment-ID

a. Native generation

 openssl rand -hex 32

b. Go to https://xmr.nanopool.org/ and paste your wallet address in the upper right corner.

Payment-ID and your mining status will appear.

3. Set the minimum withdrawal to 0.3XMR

2. Install the mining program
SSH. Assume the /root directory.
Upgrade and Initialization

 add-apt-repository ppa:ubuntu-toolchain-r/test apt update apt install gcc-5 g++-5 make update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 --slave /usr/bin/g++ g++ /usr/bin/g++-5 curl -L http://www.cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xvzf - -C /tmp/ cd /tmp/cmake-3.4.1/ && ./configure && make && sudo make install && cd - update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force apt install libmicrohttpd-dev libssl-dev libhwloc-dev

Install

 git clone https://github.com/fireice-uk/xmr-stak-cpu xmr-stak cd xmr-stak cmake . make install

3. Set CPU, Wallet, and Payment-ID
1. Set CPU, wallet, and Payment-ID in /root/xmr-stak/bin/config.txt. You can also use the following files instead.
a. Modify CPU information:
cpu_threads_conf section, 50% of the number of CPU cores is recommended
b. Wallet, Payment-ID
The one after wallet_address.
c.pool_address
Change it to one closer to your server.
d. httpd_port
Change to your favorite port, and then use IP:port to check the running status

 "cpu_threads_conf" : [ { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 0 }, { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 2 }, { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 4 }, { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 6 }, ], "use_slow_memory" : "warn", "nicehash_nonce" : false, "aes_override" : null, "use_tls" : false, "tls_secure_algo" : true, "tls_fingerprint" : "", "pool_address" : "xmr-eu1.nanopool.org:14444", "wallet_address" : "錢包地址.Payment-ID", "pool_password" : "", "call_timeout" : 10, "retry_time" : 10, "giveup_limit" : 0, "verbose_level" : 3, "h_print_time" : 60, "daemon_mode" : true, "output_file" : "", "httpd_port" : 1024, "prefer_ipv4" : true,

2. Donation ratio Edit the donate-level.h file under xmr-stak and change
constexpr double fDevDonationLevel = 2.0 / 100.0;
Change to
constexpr double fDevDonationLevel = 0.5 / 100.0;
Other ratios can also be used.

4. Start mining <br />Enter the /root/xmr-stak/bin directory and run

 screen -S mine ./xmr-stak-cpu

You can start mining in the background.

5. Related knowledge
1. CPU settings
4 cores and 8 threads, indicating 1 core and 2 threads
0, 2, 4, 6 means the first thread of 4 cores, that is, each core extracts one thread
0123 means that only the 4 threads of the first 2 cores are used, and the 4 threads of the last 2 cores are not used. (I don’t agree with writing this)
This requires you to test whether to use all 8 threads 0-7 together, or just one thread per core. It is said that there are many hyperthreaded CPUs, and running multiple threads together is not as fast as running a single thread

via: https://qing.su/article/129.html, http://www.hostloc.com/space-uid-3598.html, http://www.hostloc.com/thread-406398-1-1.html, http://www.hostloc.com/thread-411645-1-2.html

<<:  HostMyBytes 1GB RAM Los Angeles OpenVZ VPS Review

>>:  Uninstall MinerGate mining program in Windows and Ubuntu

Recommend

Nearoute 512MB RAM 10Gbps Port Hong Kong KVM VPS Review

Details : Nearoute: $6/month/1GB RAM/15GB SSD spa...

Host4Run: $5/month/512MB RAM/20GB SSD/1TB bandwidth/OpenVZ/Las Vegas

Host4Run, an American hosting provider, seems to ...

vpsGOD: $25/year/256MB memory/10GB space/100GB traffic/KVM

vpsGOD是一家美國主機商,提供KVM VPS,如下: 內存:256MB SWAP:256MB空...

AlpNames .pw Discount $0.99/first year

Purchase address: http://www.buy.pw/ Hurry up if ...

MoeCloud: 2019 National Day event, with Los Angeles cn2 gia kvm vps

Details : MoeCloud: Los Angeles CN2 GIA KVM VPS, ...