Advertisement
Sweetening

Untitled

Jul 16th, 2024
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Step 1: Install Required Dependencies
  4. sudo apt-get update
  5. sudo apt-get install -y git build-essential cmake libuv1-dev libssl-dev libhwloc-dev
  6.  
  7. # Step 2: Download and Build XMRig
  8. if [ ! -d "xmrig" ]; then
  9. git clone https://github.com/xmrig/xmrig.git
  10. fi
  11.  
  12. cd xmrig
  13. if [ ! -d "build" ]; then
  14. mkdir build
  15. fi
  16.  
  17. cd build
  18. cmake ..
  19.  
  20. if [ $? -ne 0 ]; then
  21. echo "Error: Failed to configure XMRig. Please check dependencies and try again."
  22. exit 1
  23. fi
  24.  
  25. make
  26.  
  27. if [ $? -ne 0 ]; then
  28. echo "Error: Failed to build XMRig. Please check dependencies and try again."
  29. exit 1
  30. fi
  31.  
  32. # Step 3: Configure Mining Pool
  33. echo '{
  34. "pools": [
  35. {
  36. "algo": "randomx",
  37. "url": "pool-url:port",
  38. "user": "your-wallet-address.your-worker-name",
  39. "pass": "x",
  40. "tls": false,
  41. "keepalive": true
  42. }
  43. ]
  44. }' > config.json
  45.  
  46. # Step 4: Start Mining
  47. ./xmrig
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement