# GPU mining with trueminer To miner with `getrue`: ``` wget https://github.com/truechain/truechain-engineering-code/releases/download/v1.1.2/getrue-linux-amd64-1.1.2-b44661c.tar.gz tar -zxvf getrue-linux-amd64-1.1.2-b44661c.tar.gz ``` <br/> the detail 'getrue' you can reference [CPU_mine](#CPU_Mining) To install and build GPU `trueminer` from source: ``` cd trueminer mkdir build cd build cmake .. cmake -budid . make install ``` <br/> To install and build CPU `trueminer` from source: ``` cd trueminer mkdir build cd build cmake .. -DETHASHCL=OFF -DBINKERN=OFF -DETHASHCUDA=OFF -DAPICORE=ON -DETHASHCPU=ON cmake -budid . make install ``` <br/> The detail `trueminer` install [trueminer readme.md](https://github.com/truechain/trueminer/blob/master/README.md) <br/> To set up GPU mining you need a coinbase account. It can be an account created locally or remotely. <br/> ### Using trueminer with getrue on solo mode * start `getrue` to support remote mining ``` ./getrue --datadir ./data --config ./data/config --rpc --rpcaddr 0.0.0.0 --rpcapi "etrue,:net,web3,miner" --mine --remote --coinbase <coinbase> console ``` <br/> `getrue` will listen all ip address when giving `--rpcaddr 0.0.0.0`, you can give the exact ip address that want miner to connect, or `--rpcaddr 127.0.01` only allow the miner running on the host to connect `getrue`. <br/> `trueminer` communicates with `getrue` on port 8545 . You also can change port by giving the [rpcport option](https://github.com/truechain/truechain-engineering-code/wiki/Command-Line-Options) to `getrue`. <br/> trueminer will find getrue on any port. Note that you need to set the param with `hostname:port` to connect the `getrue` . <br/> Also note that you do **have** need to give `getrue` the `--mine` option to start the miner , and also need use `--remote` to support remote getwork . * trueminer solo mode using CPU ``` trueminer --cpu -P http://hostname:port ``` * trueminer solo mode using GPU ``` trueminer -G -P http://hostname:port ``` <br/> Use `trueminer -H ` get trueminer a full list of available commands. If the default command `trueminer` does not work, try to specify the OpenCL device with: `--opencl-device X` where X is 0, 1, 2, etc. When running `trueminer` with `-M` (benchmark), you should see something like: Benchmarking on platform: { "platform": "NVIDIA CUDA", "device": "GeForce GTX 750 Ti", "version": "OpenCL 1.1 CUDA" } Benchmarking on platform: { "platform": "Apple", "device": "Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz", "version": "OpenCL 1.2 " } <br/> ### Using trueminer with getrue on stratum mode * trueminer stratum mode using CPU ``` trueminer --cpu -P stratum+tcp://WALLET.WORKER@hostname:port ``` <br/> * trueminer stratum mode using GPU ``` trueminer -G -P stratum+tcp://WALLET.WORKER@hostname:port ``` <br/> `trueminer` use stratum protocl to connect the mining pool , the **hostname:port** is pool hostname and port <br/> **Note** hashrate info is not available in `getrue` ,you have use `trueminer`need add params `-R`. <br/>