Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
azure-cloud-mining-script
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
azure-cloud-mining-script
Commits
06fbc6c5
There was an error fetching the commit references. Please try again later.
Commit
06fbc6c5
authored
7 years ago
by
Petr Ruzicka
Browse files
Options
Downloads
Patches
Plain Diff
build_xmr-stak_docker script improved
parent
b8cded77
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/build_xmr-stak_docker/build_xmr-stak_docker.sh
+31
-26
31 additions, 26 deletions
scripts/build_xmr-stak_docker/build_xmr-stak_docker.sh
with
31 additions
and
26 deletions
scripts/build_xmr-stak_docker/build_xmr-stak_docker.sh
+
31
−
26
View file @
06fbc6c5
#!/bin/bash -uex
#!/bin/bash -uex
if
[[
$EUID
-ne
0
]]
;
then
echo
"This script must be run as root"
exit
1
fi
if
[
-d
xmr-stak-cpu
]
;
then
if
[
-d
xmr-stak-cpu
]
;
then
sudo
git
-C
xmr-stak-cpu clean
-f
git
-C
xmr-stak-cpu clean
-f
d
else
else
sudo
git clone https://github.com/fireice-uk/xmr-stak-cpu.git
git clone https://github.com/fireice-uk/xmr-stak-cpu.git
fi
fi
########################
########################
# Fedora
(latest)
# Fedora
26
########################
########################
sudo
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu fedora:
latest
/bin/bash
-c
"
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu fedora:
26
/bin/bash
-c
"
set -ex ;
set -ex ;
dnf install -y -q gcc gcc-c++ hwloc-devel libmicrohttpd-devel libstdc++-static make openssl-devel cmake ;
dnf install -y -q gcc gcc-c++ hwloc-devel libmicrohttpd-devel libstdc++-static make openssl-devel cmake ;
cd /xmr-stak-cpu ;
cd /xmr-stak-cpu ;
cmake -DCMAKE_LINK_STATIC=ON . ;
cmake -DCMAKE_LINK_STATIC=ON . ;
make install ;
make install ;
"
"
sudo
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_fedora_
latest
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_fedora_
26
sudo
git
-C
xmr-stak-cpu clean
-f
git
-C
xmr-stak-cpu clean
-f
d
exit
########################
########################
# Ubuntu (
latest
)
# Ubuntu (
17.04
)
########################
########################
sudo
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu ubuntu:
latest
/bin/bash
-c
"
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu ubuntu:
17.04
/bin/bash
-c
"
set -ex ;
set -ex ;
apt update -qq ;
apt update -qq ;
apt install -y -qq libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev ;
apt install -y -qq libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev ;
...
@@ -32,14 +37,14 @@ cd /xmr-stak-cpu ;
...
@@ -32,14 +37,14 @@ cd /xmr-stak-cpu ;
cmake -DCMAKE_LINK_STATIC=ON . ;
cmake -DCMAKE_LINK_STATIC=ON . ;
make install ;
make install ;
"
"
sudo
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_ubuntu_
latest
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_ubuntu_
17.04
sudo
git
-C
xmr-stak-cpu clean
-f
git
-C
xmr-stak-cpu clean
-f
d
########################
########################
# Ubuntu 16.04
# Ubuntu 16.04
########################
########################
sudo
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu ubuntu:16.04 /bin/bash
-c
"
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu ubuntu:16.04 /bin/bash
-c
"
set -ex ;
set -ex ;
apt update -qq ;
apt update -qq ;
apt install -y -qq libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev ;
apt install -y -qq libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev ;
...
@@ -47,14 +52,14 @@ cd /xmr-stak-cpu ;
...
@@ -47,14 +52,14 @@ cd /xmr-stak-cpu ;
cmake -DCMAKE_LINK_STATIC=ON . ;
cmake -DCMAKE_LINK_STATIC=ON . ;
make install ;
make install ;
"
"
sudo
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_ubuntu_1604
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_ubuntu_16
.
04
sudo
git
-C
xmr-stak-cpu clean
-f
git
-C
xmr-stak-cpu clean
-f
d
########################
########################
# Ubuntu 14.04
# Ubuntu 14.04
########################
########################
sudo
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu ubuntu:14.04 /bin/bash
-c
"
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu ubuntu:14.04 /bin/bash
-c
"
set -ex ;
set -ex ;
apt update -qq ;
apt update -qq ;
apt install -y -qq curl libmicrohttpd-dev libssl-dev libhwloc-dev software-properties-common ;
apt install -y -qq curl libmicrohttpd-dev libssl-dev libhwloc-dev software-properties-common ;
...
@@ -63,20 +68,20 @@ apt update -qq ;
...
@@ -63,20 +68,20 @@ apt update -qq ;
apt install -y -qq gcc-7 g++-7 make ;
apt install -y -qq gcc-7 g++-7 make ;
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 1 --slave /usr/bin/g++ g++ /usr/bin/g++-7 ;
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 1 --slave /usr/bin/g++ g++ /usr/bin/g++-7 ;
curl -L https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz | tar -xzf - -C /tmp/ ;
curl -L https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz | tar -xzf - -C /tmp/ ;
cd /tmp/cmake-3.9.0/ && ./configure && make && sudo make install && cd -
;
(
cd /tmp/cmake-3.9.0/ && ./configure && make && sudo make install && cd -
) > /dev/null
update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force ;
update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force ;
cd /xmr-stak-cpu ;
cd /xmr-stak-cpu ;
cmake -DCMAKE_LINK_STATIC=ON . ;
cmake -DCMAKE_LINK_STATIC=ON . ;
make install ;
make install ;
"
"
sudo
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_ubuntu_1404
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_ubuntu_14
.
04
sudo
git
-C
xmr-stak-cpu clean
-f
git
-C
xmr-stak-cpu clean
-f
d
########################
########################
# CentOS
(latest)
# CentOS
7
########################
########################
sudo
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu centos:
latest
/bin/bash
-c
"
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu centos:
7
/bin/bash
-c
"
set -ex ;
set -ex ;
yum install -y -q centos-release-scl epel-release ;
yum install -y -q centos-release-scl epel-release ;
yum install -y -q cmake3 devtoolset-4-gcc* hwloc-devel libmicrohttpd-devel openssl-devel make ;
yum install -y -q cmake3 devtoolset-4-gcc* hwloc-devel libmicrohttpd-devel openssl-devel make ;
...
@@ -86,14 +91,14 @@ cmake3 -DCMAKE_LINK_STATIC=ON . ;
...
@@ -86,14 +91,14 @@ cmake3 -DCMAKE_LINK_STATIC=ON . ;
make install ;
make install ;
EOF
EOF
"
"
sudo
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_centos_
latest
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_centos_
7
sudo
git
-C
xmr-stak-cpu clean
-f
git
-C
xmr-stak-cpu clean
-f
d
########################
########################
# CentOS 6.x
# CentOS 6.x
########################
########################
sudo
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu centos:6 /bin/bash
-c
"
docker run
--rm
-it
-v
$PWD
/xmr-stak-cpu:/xmr-stak-cpu centos:6 /bin/bash
-c
"
set -ex ;
set -ex ;
yum install -y -q centos-release-scl epel-release ;
yum install -y -q centos-release-scl epel-release ;
yum install -y -q cmake3 devtoolset-4-gcc* hwloc-devel libmicrohttpd-devel openssl-devel make ;
yum install -y -q cmake3 devtoolset-4-gcc* hwloc-devel libmicrohttpd-devel openssl-devel make ;
...
@@ -103,7 +108,7 @@ cmake3 -DCMAKE_LINK_STATIC=ON . ;
...
@@ -103,7 +108,7 @@ cmake3 -DCMAKE_LINK_STATIC=ON . ;
make install ;
make install ;
EOF
EOF
"
"
sudo
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_centos_6
mv
xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_centos_6
sudo
git
-C
xmr-stak-cpu clean
-f
git
-C
xmr-stak-cpu clean
-f
d
sudo
rm
-rf
xmr-stak-cpu
rm
-rf
xmr-stak-cpu
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment