xmrig-bash-scripts/README.md

105 lines
4.6 KiB
Markdown
Raw Normal View History

2019-07-26 22:03:20 +03:00
# xmrig-bash-scripts
2019-07-30 19:49:09 +03:00
A set of convenience scripts, written in bash, to help manage installation, configuration and update of [xmrig cpu](https://github.com/xmrig/xmrig) across multiple hosts.
2019-07-27 13:00:13 +03:00
## Download
* https://github.com/seanwhe/xmrig-bash-scripts
* Git clone with `git clone https://github.com/seanwhe/xmrig-bash-scripts`
### Prerequisites
2019-07-30 19:49:09 +03:00
There is allot to install so the install script will do most of the heavy lifting.
At the start the expectation is that you have:
* Computer running Ubuntu 18.04 (LTS)
2019-07-27 13:00:13 +03:00
* User account with sudo privileges
2019-07-30 19:49:09 +03:00
* Installed git
* Optionally installed [xmrig-proxy](https://github.com/xmrig/xmrig-proxy)
### Agreeable
Some knowledge of:
* Linux Command Line Interface
* Unix shell `bash`
There is more to install but the install script will install the rest.
2019-07-27 13:00:13 +03:00
### Installion
2019-07-30 19:49:09 +03:00
1. Change to your user home directory.
`cd ~`
2. Install git.
`sudo apt install git`
3. Clone this project.
`git clone https://github.com/seanwhe/xmrig-bash-scripts`
4. Change into the cloned directory.
2019-07-27 13:00:13 +03:00
`cd xmrig-bash-scripts`
2019-07-30 19:49:09 +03:00
5. Edit the settings file to your preference.
2019-07-27 13:00:13 +03:00
`vim settings.sh`
2019-07-30 19:49:09 +03:00
6. Run the install script
2019-07-27 13:00:13 +03:00
`./install.sh`
2019-07-30 19:49:09 +03:00
7. Attach to the screen session created during the installation.
`screen -r`
### Operation
With the exception of the 'xmrig' binary, which is installed to `/usr/bin/xmrig`, all files remain in the cloned project directory `~/xmrig-bash-scripts`. Any files generated while running the scripts are created in this directory.
During install the folder source for [xmrig cpu](https://github.com/xmrig/xmrig) is cloned to `xmrig-cpu/`in the path. The `config.json` is also created in this path.
This should work out the box, if you edit only the top section of `settings.sh`.
2019-07-27 13:00:13 +03:00
2019-07-30 19:49:09 +03:00
Once you have a running xmrig then you can start playing around and tweaking to suite requirements.
What follows is a brief of the shell scripts you will find. The names are mostly self explanatory. Comments and notes are used liberally in the scripts to help give you hints as to how it works. The scripts are designed to be modular to promote resuse, execute exclusion and standalone execution.
* build.sh - clones xmrig to ``~/xmrig-bash-scripts`/xmrig-cpu`, configures, builds and copies xmrig to `/usr/bin/`
* config.sh - contains variables that aid in defining the values for the attributes found in config.json.
* crontab.sh - installs a cron to start and a cron to stop at specific times (Can be commented out of install if desired).
* depends.sh - installs dependancies required by xmrig and these scripts.
* functions.sh - a collection of functions used in various of the scripts.
* install.sh - the main entry point when first installing.
* maintenance.sh - performs apt update and upgrade.
* settings.sh - contains variables used by these scripts.
* start.sh - starts xmrig in a screen session.
* stop.sh - stops xmrig screen session.
* update.sh - updates and existing installation.
### Viewing the log
Default of the start script is to create a screen session named 'xmrig-cpu'. This can be changed in the settings script if required. To view the log after installation is finished or after running the start script, used the following command:
2019-07-27 13:00:13 +03:00
`screen -r xmrig-cpu`
2019-07-30 19:49:09 +03:00
## Reporting issues
[xmrig cpu](https://github.com/xmrig/xmrig) and [xmrig bash scripts](https://github.com/seanwhe/xmrig-bash-scripts.git) are different projects run by different people.
While the developers of both projects may be seen interacting with one another on either project, we ask that you report issues to the respective projects. In other words, post issues for:
* xmrig, the Monero (XMR) CPU miner, over at [xmrig issues tracker](https://github.com/xmrig/xmrig/issues)
* xmrig-bash-scripts, these conveniece scripts, over at [xmrig-bash-scripts](https://github.com/seanwhe/xmrig-bash-scripts/issues)
2019-07-27 13:00:13 +03:00
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/seanwhe/xmrig-bash-scripts/tags).
2019-07-30 19:49:09 +03:00
## Contributing
Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.
See also the list of [contributors](https://github.com/seanwhe/xmrig-bash-scripts/CONTRIBUTORS)
2019-07-27 13:00:13 +03:00
## Authors
* **Sean Wheller** - *Initial work* - [seanwhe](https://github.com/seanwhe)
## License
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE.md](LICENSE.md) file for details
## Acknowledgments
2019-07-30 19:49:09 +03:00
* Thanks to [fireice-uk](https://github.com/fireice-uk) for developing and maintaining [xmrig products](https://xmrig.com/).