toptek
Legendary
Offline
Activity: 1274
Merit: 1000
|
 |
November 16, 2016, 04:13:27 PM Last edit: November 16, 2016, 04:43:30 PM by toptek |
|
when you installed minera did you use Ubuntu 16 ?. if so, the problem may be with the PHP in Ubuntu 16 you have use php 7.0 . i was having kind of the same issue . I made up my own install_minera.sh and do manual installs no issue now but one bfg doesn't auto start but no big deal, i just haven't got around to fixing it . here's is my install_minera.sh with the corrected php for Ubuntu 16.4.1 installs. my install_minera.sh file installs no mining software other then maybe cpuminer, i replace BFG with my own version with the cp command. #!/bin/bash # This is the main install script for Minera https://github.com/michelem09/minera # This script, as Minera, is intended to be used on a Debian-like system
echo -e "-----\nSTART Minera Install script\n-----\n"
echo -e "-----\nInstall extra packages\n-----\n" apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y build-essential libtool libcurl4-openssl-dev libjansson-dev libudev-dev libncurses5-dev autoconf automake postfix redis-server git screen php7.0-cli php7.0-curl php7.0-fpm php7.0-readline php7.0-json wicd-curses uthash-dev libmicrohttpd-dev libevent-dev libusb-1.0-0-dev libusb-dev libblkmaker-0.1-dev shellinabox supervisor lighttpd
echo -e "Adding Minera user\n-----\n" adduser minera --gecos "" --disabled-password echo "minera:minera" | chpasswd
echo -e "Adding groups to Minera\n-----\n" usermod -a -G dialout,plugdev,tty,www-data minera
echo -e "Adding sudoers configuration for www-data and minera users\n-----\n" echo -e "\n#Minera settings\nminera ALL = (ALL) NOPASSWD: ALL\nwww-data ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
MINER_OPT="--gc3355-detect --gc3355-autotune --freq=850 -o stratum+tcp://ltc.ghash.io:3333 -u michelem.minera -p x --retries=1" MINER_BIN=`pwd`"/minera-bin/" MINERA_LOGS="/var/log/minera" MINERA_CONF=`pwd`"/conf" MINERA_OLD_LOGS=`pwd`"/application/logs"
echo -e "Adding SSL certificate\n-----\n" mkdir /etc/lighttpd/certs cp $MINERA_CONF/lighttpd.pem /etc/lighttpd/certs/ chmod 400 /etc/lighttpd/certs/lighttpd.pem
echo -e "Copying Lighttpd conf\n-----\n" cp $MINERA_CONF/lighttpd.conf /etc/lighttpd/ cp $MINERA_CONF/10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf cp $MINERA_CONF/15-php7.0-fpm.conf /etc/lighttpd/conf-available/15-php7.0-fpm.conf ln -s /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/10-fastcgi.conf ln -s /etc/lighttpd/conf-available/15-php7.0-fpm.conf /etc/lighttpd/conf-enabled/15-php7.0-fpm.conf service lighttpd restart
echo -e "Playing with minera dirs\n-----\n" chown -R minera.minera `pwd` mkdir -p $MINERA_LOGS chmod 777 $MINERA_LOGS chmod 777 $MINERA_CONF chmod 777 minera-bin/cgminerStartupScript chown -R minera.minera $MINERA_LOGS rm -rf $MINERA_OLD_LOGS ln -s $MINERA_LOGS $MINERA_OLD_LOGS
echo -e "Adding Minera logrotate\n-----\n" cp `pwd`"/minera.logrotate" /etc/logrotate.d/minera service rsyslog restart
echo -e "Adding default startup settings to redis\n-----\n" echo -n $MINER_OPT | redis-cli -x set minerd_settings echo -n "70e880b1effe0f770849d985231aed2784e11b38" | redis-cli -x set minera_password echo -n "1" | redis-cli -x set guided_options echo -n "0" | redis-cli -x set manual_options echo -n "1" | redis-cli -x set minerd_autodetect echo -n "1" | redis-cli -x set anonymous_stats echo -n "cpuminer" | redis-cli -x set minerd_software echo -n '["132","155","3"]' | redis-cli -x set dashboard_coin_rates echo -e '[{"url":"stratum+tcp://ltc.ghash.io:3333","username":"michelem.minera","password":"x"}]' | redis-cli -x set minerd_pools
echo -e "Adding minera startup command to rc.local\n-----\n" chmod 777 /etc/rc.local
RC_LOCAL_CMD='su - minera -c "/usr/bin/screen -dmS cpuminer '$MINER_BIN'minerd '$MINER_OPT'"\nexit 0'
sed -i.bak "s/exit 0//g" /etc/rc.local
echo -e $RC_LOCAL_CMD >> /etc/rc.local
echo -e "Adding cron file in /etc/cron.d\n-----\n"
echo -e "*/1 * * * * www-data php `pwd`/index.php app cron" > /etc/cron.d/minera
echo -e "Configuring shellinabox\n-----\n" sudo cp conf/shellinabox /etc/default/ sudo service shellinabox restart
echo -e "Copying cg/bfgminer udev rules\n-----\n" sudo cp conf/01-cgminer.rules /etc/udev/rules.d/ sudo cp conf/70-bfgminer.rules /etc/udev/rules.d/ sudo service udev restart
echo -e "Installing NVM and Node requirements\n-----\n" su - minera -c /var/www/minera/install_nvm.sh
echo -e "Installing libblkmaker\n-----\n" LIBCOUNT=`strings -n5 /etc/ld.so.cache|grep -i libblkmaker|wc -l` if [ $LIBCOUNT -lt 2 ]; then cd minera-bin/src/libblkmaker sudo make install sudo ldconfig fi
echo -e "Generating unique SSH keys\n-----\n" sudo rm /etc/ssh/ssh_host_* sudo dpkg-reconfigure openssh-server sudo service ssh restart
echo -e "Building miners, this will take loooooooot of time in a low resource system, I strongly suggest you to take a beer (better two) and relax a while. Your Minera will be ready after this.\n-----\n" su - minera -c /var/www/minera/build_miner.sh
echo -e 'DONE! Minera is ready!\n\nOpen the URL: http://'$(hostname -I | tr -d ' ')'/minera/\n\nAnd happy mining!\n' I manually install minera on any PI type Or PC, i can install Ubuntu 16 on and not just RPI's, like this :. sudo apt-get update sudo apt-get upgrade
sudo apt-get install -y lighttpd php7.0-cgi sudo lighty-enable-mod fastcgi-php sudo lighty-enable-mod fastcgi sudo service lighttpd force-reload
sudo apt-get install -y redis-server git screen php7.0-cli php7.0-curl libblkmaker-0.1-dev
cd /var/www sudo git clone https://github.com/michelem09/minera cd /var/www/minera
sudo ./install_minera.sh replace the install_minera.sh file before you do this: here:
|
|
|
|
paintballer4lfe
Newbie
Offline
Activity: 10
Merit: 0
|
 |
November 16, 2016, 09:26:44 PM |
|
when you installed minera did you use Ubuntu 16 ?. if so, the problem may be with the PHP in Ubuntu 16 you have use php 7.0 . i was having kind of the same issue . I made up my own install_minera.sh and do manual installs no issue now but one bfg doesn't auto start but no big deal, i just haven't got around to fixing it . here's is my install_minera.sh with the corrected php for Ubuntu 16.4.1 installs. my install_minera.sh file installs no mining software other then maybe cpuminer, i replace BFG with my own version with the cp command. #!/bin/bash # This is the main install script for Minera https://github.com/michelem09/minera # This script, as Minera, is intended to be used on a Debian-like system
echo -e "-----\nSTART Minera Install script\n-----\n"
echo -e "-----\nInstall extra packages\n-----\n" apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y build-essential libtool libcurl4-openssl-dev libjansson-dev libudev-dev libncurses5-dev autoconf automake postfix redis-server git screen php7.0-cli php7.0-curl php7.0-fpm php7.0-readline php7.0-json wicd-curses uthash-dev libmicrohttpd-dev libevent-dev libusb-1.0-0-dev libusb-dev libblkmaker-0.1-dev shellinabox supervisor lighttpd
echo -e "Adding Minera user\n-----\n" adduser minera --gecos "" --disabled-password echo "minera:minera" | chpasswd
echo -e "Adding groups to Minera\n-----\n" usermod -a -G dialout,plugdev,tty,www-data minera
echo -e "Adding sudoers configuration for www-data and minera users\n-----\n" echo -e "\n#Minera settings\nminera ALL = (ALL) NOPASSWD: ALL\nwww-data ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
MINER_OPT="--gc3355-detect --gc3355-autotune --freq=850 -o stratum+tcp://ltc.ghash.io:3333 -u michelem.minera -p x --retries=1" MINER_BIN=`pwd`"/minera-bin/" MINERA_LOGS="/var/log/minera" MINERA_CONF=`pwd`"/conf" MINERA_OLD_LOGS=`pwd`"/application/logs"
echo -e "Adding SSL certificate\n-----\n" mkdir /etc/lighttpd/certs cp $MINERA_CONF/lighttpd.pem /etc/lighttpd/certs/ chmod 400 /etc/lighttpd/certs/lighttpd.pem
echo -e "Copying Lighttpd conf\n-----\n" cp $MINERA_CONF/lighttpd.conf /etc/lighttpd/ cp $MINERA_CONF/10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf cp $MINERA_CONF/15-php7.0-fpm.conf /etc/lighttpd/conf-available/15-php7.0-fpm.conf ln -s /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/10-fastcgi.conf ln -s /etc/lighttpd/conf-available/15-php7.0-fpm.conf /etc/lighttpd/conf-enabled/15-php7.0-fpm.conf service lighttpd restart
echo -e "Playing with minera dirs\n-----\n" chown -R minera.minera `pwd` mkdir -p $MINERA_LOGS chmod 777 $MINERA_LOGS chmod 777 $MINERA_CONF chmod 777 minera-bin/cgminerStartupScript chown -R minera.minera $MINERA_LOGS rm -rf $MINERA_OLD_LOGS ln -s $MINERA_LOGS $MINERA_OLD_LOGS
echo -e "Adding Minera logrotate\n-----\n" cp `pwd`"/minera.logrotate" /etc/logrotate.d/minera service rsyslog restart
echo -e "Adding default startup settings to redis\n-----\n" echo -n $MINER_OPT | redis-cli -x set minerd_settings echo -n "70e880b1effe0f770849d985231aed2784e11b38" | redis-cli -x set minera_password echo -n "1" | redis-cli -x set guided_options echo -n "0" | redis-cli -x set manual_options echo -n "1" | redis-cli -x set minerd_autodetect echo -n "1" | redis-cli -x set anonymous_stats echo -n "cpuminer" | redis-cli -x set minerd_software echo -n '["132","155","3"]' | redis-cli -x set dashboard_coin_rates echo -e '[{"url":"stratum+tcp://ltc.ghash.io:3333","username":"michelem.minera","password":"x"}]' | redis-cli -x set minerd_pools
echo -e "Adding minera startup command to rc.local\n-----\n" chmod 777 /etc/rc.local
RC_LOCAL_CMD='su - minera -c "/usr/bin/screen -dmS cpuminer '$MINER_BIN'minerd '$MINER_OPT'"\nexit 0'
sed -i.bak "s/exit 0//g" /etc/rc.local
echo -e $RC_LOCAL_CMD >> /etc/rc.local
echo -e "Adding cron file in /etc/cron.d\n-----\n"
echo -e "*/1 * * * * www-data php `pwd`/index.php app cron" > /etc/cron.d/minera
echo -e "Configuring shellinabox\n-----\n" sudo cp conf/shellinabox /etc/default/ sudo service shellinabox restart
echo -e "Copying cg/bfgminer udev rules\n-----\n" sudo cp conf/01-cgminer.rules /etc/udev/rules.d/ sudo cp conf/70-bfgminer.rules /etc/udev/rules.d/ sudo service udev restart
echo -e "Installing NVM and Node requirements\n-----\n" su - minera -c /var/www/minera/install_nvm.sh
echo -e "Installing libblkmaker\n-----\n" LIBCOUNT=`strings -n5 /etc/ld.so.cache|grep -i libblkmaker|wc -l` if [ $LIBCOUNT -lt 2 ]; then cd minera-bin/src/libblkmaker sudo make install sudo ldconfig fi
echo -e "Generating unique SSH keys\n-----\n" sudo rm /etc/ssh/ssh_host_* sudo dpkg-reconfigure openssh-server sudo service ssh restart
echo -e "Building miners, this will take loooooooot of time in a low resource system, I strongly suggest you to take a beer (better two) and relax a while. Your Minera will be ready after this.\n-----\n" su - minera -c /var/www/minera/build_miner.sh
echo -e 'DONE! Minera is ready!\n\nOpen the URL: http://'$(hostname -I | tr -d ' ')'/minera/\n\nAnd happy mining!\n' I manually install minera on any PI type Or PC, i can install Ubuntu 16 on and not just RPI's, like this :. sudo apt-get update sudo apt-get upgrade
sudo apt-get install -y lighttpd php7.0-cgi sudo lighty-enable-mod fastcgi-php sudo lighty-enable-mod fastcgi sudo service lighttpd force-reload
sudo apt-get install -y redis-server git screen php7.0-cli php7.0-curl libblkmaker-0.1-dev
cd /var/www sudo git clone https://github.com/michelem09/minera cd /var/www/minera
sudo ./install_minera.sh replace the install_minera.sh file before you do this: here: It is 16.04, i tried your modified install and php7 but it just shells out refused connection and errors, i'm going to play around with it a little more but for the mean time i spun up a 14.04 server that i'll see if it changes/works on it. I don't care what version it goes on i just want it to work.
|
|
|
|
Senja Kemuning
|
 |
November 17, 2016, 02:59:55 AM |
|
I'm sorry, late to read and follow this thread, very happy can found this thread. Want to know, is this software can be used for all pools? Is last version also supports if I use Antminer S7?
|
|
|
|
toptek
Legendary
Offline
Activity: 1274
Merit: 1000
|
 |
November 17, 2016, 06:31:46 AM Last edit: November 17, 2016, 06:55:34 AM by toptek |
|
php7.0 and do a clean install don't try to install over pnp5 that minera is using with Ubuntu 15 or lower it may not work or do what your saying . unless you uninstall minera then uninstall anything to do with php 5. under Ubuntu 16, it doesn't really replace it like thy say it may make things worse . for it to down load install it needs to be stated as php7.0 not php7, I might be wrong it may have changed . and php7.0 doesn't work to well with Ubuntu 14 if you can even download it with Ubuntu 14, i would rather use Ubuntu 16 . php 5 won't install with Ubuntu 16 any way it may say some thing like no such package is available in Ubuntu 16, unless you share it that's another mess to deal with , for me minera runs better under Ubuntu 16 clean installed. A few tips to help some . thanks top. This site is the best place Ive found for all most any PI type that offers Ubuntu 16 images they even have tools to build your own image but no RPI support, Ubuntu 16 has RPI images you can use off there site or from the RPI site . . or build it http://www.armbian.com/
|
|
|
|
michelem (OP)
Legendary
Offline
Activity: 1015
Merit: 1000
|
 |
November 17, 2016, 07:35:47 AM |
|
I'm sorry, late to read and follow this thread, very happy can found this thread. Want to know, is this software can be used for all pools? Is last version also supports if I use Antminer S7?
Yes with any pool, but with S7 you have to enable it for API access and you must have Cgminer installed. But you should give a try to the new Minera (beta) at https://app.getminera.com
|
|
|
|
michelem (OP)
Legendary
Offline
Activity: 1015
Merit: 1000
|
 |
November 17, 2016, 07:41:20 AM |
|
It is 16.04, i tried your modified install and php7 but it just shells out refused connection and errors, i'm going to play around with it a little more but for the mean time i spun up a 14.04 server that i'll see if it changes/works on it. I don't care what version it goes on i just want it to work.
Can I see some of that errors with php7.0?
|
|
|
|
zOU
|
 |
November 17, 2016, 08:52:33 AM |
|
Yes with any pool, but with S7 you have to enable it for API access and you must have Cgminer installed. But you should give a try to the new Minera (beta) at https://app.getminera.comI still have to figure out how to do it on a S7....
|
|
|
|
michelem (OP)
Legendary
Offline
Activity: 1015
Merit: 1000
|
 |
November 17, 2016, 09:16:32 AM |
|
Yes with any pool, but with S7 you have to enable it for API access and you must have Cgminer installed. But you should give a try to the new Minera (beta) at https://app.getminera.comI still have to figure out how to do it on a S7.... May be S7 hasn't Cgminer (like S9)? Or what's the problem with it?
|
|
|
|
zOU
|
 |
November 17, 2016, 09:23:21 AM |
|
editing cgminer.conf has no effet, it is overwritten by the system... and even though it is supposed to accept API commands, it doesn't
but I don't really need it
|
|
|
|
BroMarduk
Newbie
Offline
Activity: 5
Merit: 0
|
 |
November 17, 2016, 04:30:32 PM |
|
I noticed on my RPi with multiple IPs, the URLs that Minera generates after running the installation script and at boot puts all the IPs into the same address like: Connect to http://192.168.1.1192.168.1.2192.168.1.3/minera to manage MineraI can fix it by replacing the existing block in rc.local to something like this: # Print the IP address that Minera works on _IP=$(echo $(hostname -I)\ | tr " " "\n") || true printf "Starting Minera Bitcoin Mining Monitor...\n" if [ -z "$_IP" ]; then printf "Unable to find Minera management address" else printf "Connect to manage Minera at\n" for item in $_IP do printf " http://%s/minera\n" "$item" done fi printf " Happy mining!\n" Which will print each address separately. This, as usual, gets overwritten whenever making a change to Minera that overwrites the rc.local file (not that I change it that often, but YMMV). Just passing the snippet along in case any of the developers find it useful and want to use it in a future release. I also noticed on my RPI3, that on startup, I get all sorts of redis-cli errors. This seemed to be due to the fact that redis-server had not fully started up. I added a sleep 5 statement in the rc.local right before the first redis-cli call and that fixed the errors. Be nice to have a setting in Minera to optionally add that sleep in if needed. Best, Dan
|
|
|
|
GatekeeperZA
Newbie
Offline
Activity: 23
Merit: 0
|
 |
November 21, 2016, 04:07:04 PM |
|
Hey guys I wanted to find out im testing the latest Stratum Proxy but I cannot get CPUMiner connect CG and BFG miner connects fine but am having issues with only cpuminer. has anyone sucessfully got cpuminer in minera to connect to the proxy.. if so please post suggestions... my whole reason is to test XnSub is this even compatible .. as i have seen reports of it working but am personally not able to get it going.. please help. thanks guys..
|
|
|
|
michelem (OP)
Legendary
Offline
Activity: 1015
Merit: 1000
|
 |
November 22, 2016, 08:02:46 AM |
|
Hey guys I wanted to find out im testing the latest Stratum Proxy but I cannot get CPUMiner connect CG and BFG miner connects fine but am having issues with only cpuminer. has anyone sucessfully got cpuminer in minera to connect to the proxy.. if so please post suggestions... my whole reason is to test XnSub is this even compatible .. as i have seen reports of it working but am personally not able to get it going.. please help. thanks guys..
CPUMiner fork in Minera is a special fork done in 2014 (and never updated) to work with Gridseed ( https://github.com/siklon/cpuminer-gc3355), it was make by a guy I didn't see anymore and I'm pretty sure it hasn't extranonce (XnSub) support. So you can quit your tries because it will never work with that.
|
|
|
|
michelem (OP)
Legendary
Offline
Activity: 1015
Merit: 1000
|
 |
November 22, 2016, 08:05:23 AM |
|
I noticed on my RPi with multiple IPs, the URLs that Minera generates after running the installation script and at boot puts all the IPs into the same address like: Connect to http://192.168.1.1192.168.1.2192.168.1.3/minera to manage MineraI can fix it by replacing the existing block in rc.local to something like this: Which will print each address separately. This, as usual, gets overwritten whenever making a change to Minera that overwrites the rc.local file (not that I change it that often, but YMMV). Just passing the snippet along in case any of the developers find it useful and want to use it in a future release. I also noticed on my RPI3, that on startup, I get all sorts of redis-cli errors. This seemed to be due to the fact that redis-server had not fully started up. I added a sleep 5 statement in the rc.local right before the first redis-cli call and that fixed the errors. Be nice to have a setting in Minera to optionally add that sleep in if needed. Best, Dan Thanks man, I noticed that too, may be one day I will fix all these problems with the old Minera but I'd like to concentrate to the new Minera now.
|
|
|
|
BroMarduk
Newbie
Offline
Activity: 5
Merit: 0
|
 |
November 27, 2016, 06:43:57 PM |
|
Thanks man, I noticed that too, may be one day I will fix all these problems with the old Minera but I'd like to concentrate to the new Minera now.
No worries. But that does make be wonder, will the new Minera support stick miners or just network miners?
|
|
|
|
zOU
|
 |
November 27, 2016, 06:49:19 PM |
|
network miners directly, and stick miners by communicating with the cgminer instance.
I have it monitoring 4 S3+, 4 S5, 1 S7, and a bunch of USB miners connected on a laptop.
|
|
|
|
BroMarduk
Newbie
Offline
Activity: 5
Merit: 0
|
 |
November 28, 2016, 07:32:43 PM |
|
network miners directly, and stick miners by communicating with the cgminer instance.
I have it monitoring 4 S3+, 4 S5, 1 S7, and a bunch of USB miners connected on a laptop.
Great. I'm currently running BFGminer with Minera 0.7.0, but could easily switch if necessary, so thanks for letting me know.
|
|
|
|
michelem (OP)
Legendary
Offline
Activity: 1015
Merit: 1000
|
 |
December 08, 2016, 07:54:25 AM |
|
Hello Mineras, I've updated the beta version of the new Minera, now you can clone the pools but also you can skip to add the pools when you add a miner and let Minera gets them from the online miner. Then you can also easily select multiple miners for a pool, just click the relative button in the pool repository to get a list of all the miners to be selected/deselected. Finally I fixed and add sorting to almost every tables (there are still some little bugs but much better than before) and fixed some bugs around. If you wanna give a try please go to https://app.getminera.com/
|
|
|
|
zOU
|
 |
December 08, 2016, 09:56:12 AM |
|
Very nice !
Thank you !
Note: it can detect USB miners running on an old laptop, but it can't find the usb miners I have running on the same RPI (using cgminer too)
|
|
|
|
giantkin
|
 |
December 08, 2016, 01:32:47 PM |
|
oh...before i forget. (if i already posted this...and forgot...sorry..my memory needs cleaned lol)
I figured out why ...or more likely...how to not let it...... let me start fresh.
on the dashboard, you can enter the pools etc and add new ones. and its all great.
However, even if u SAVE there... the pools will clear if the PI reboots....
u gotta go into the ....(forget name argh memory) actual settings of the miner/controller and add the pools there.... if u save it there, it sticks and will be there on reboot.
again, sorry if i repeated this. my memory only works when......what was i talking about?
gk
|
http://choicehost.biz Domains and DIY -hosting I save $5 or so, for each domain a year. (Compared to other Domain Registrars)
|
|
|
GatekeeperZA
Newbie
Offline
Activity: 23
Merit: 0
|
 |
December 08, 2016, 05:00:43 PM |
|
Hey Michelem Do you install this on the current 0.7.0 Raspnerry PI running minera. [ as the same one my gridseeds are plugged into ] or can you please provide some specifics for install.. or please can someone post how to get the beta running...? [ does it need a separate system ie stuff like that] sorry for being ignorant... Thanks for the patience.. Hello Mineras, I've updated the beta version of the new Minera, now you can clone the pools but also you can skip to add the pools when you add a miner and let Minera gets them from the online miner. Then you can also easily select multiple miners for a pool, just click the relative button in the pool repository to get a list of all the miners to be selected/deselected. Finally I fixed and add sorting to almost every tables (there are still some little bugs but much better than before) and fixed some bugs around. If you wanna give a try please go to https://app.getminera.com/
|
|
|
|
|