Last active
May 4, 2016 03:55
-
-
Save sigwo/571296dcb54ff6d4109b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ************************************************************************** | |
# Influx installer | |
# Influxd + Influx-qt + desktop icon | |
# Maintained by : sigwo | |
# ************************************************************************** | |
# install dependencies | |
echo "*** Installing dependencies ***" | |
echo | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get install -y qt4-qmake libqt4-dev libminiupnpc-dev libdb++-dev libdb-dev libcrypto++-dev libqrencode-dev libboost-all-dev build-essential libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libssl-dev ufw git | |
echo | |
echo "*** Cloning INFX repo ***" | |
echo | |
git clone https://github.com/influxteam/influx.git infx | |
cd infx | |
qmake | |
make | |
echo | |
# create the firewall rules | |
echo | |
# uncomment the firewall lines and replace the port with the port required for either P2P or rpc port for local mining | |
echo "*** Create firewall rules ***" | |
sudo ufw allow 9239 | |
sudo ufw allow 9238 | |
sudo ufw allow 2210 | |
sudo ufw allow 5950 | |
sudo ufw allow 6050 | |
sudo ufw allow 3000 | |
sudo ufw enable | |
echo | |
# create config file and randomize the password | |
echo "*** Creating configuration file with randomized password ***" | |
echo | |
mkdir ~/.Influx | |
rm -f Influx.conf | |
echo "rpcuser=user | |
rpcpassword=$(cat /dev/urandom | tr -cd '[:alnum:]' | head -c32) | |
rpcallowip = 127.0.0.1 | |
rpcport = 9239 | |
server = 1 | |
daemon = 1 | |
listen = 1" >> ~/.Influx/Influx.conf | |
echo | |
echo | |
# create desktop shortcut for INFX | |
echo "*** Creating desktop icon ***" | |
echo | |
rm -f ~/.Influx/influx.png | |
rm -f ~/Desktop/INFX.desktop | |
wget http://wallet.influxcoin.xyz/assets/img/infx.png -O ~/.Influx/influx.png | |
echo "[Desktop Entry] | |
Name=Influx | |
Type=Application | |
Comment=INFX | |
Categories=Application | |
Exec=/home/$USER/infx/Influx-qt | |
Icon=/home/$USER/.Influx/influx.png | |
Terminal=false | |
StartupNotify=true" >> ~/Desktop/INFX.desktop | |
chmod 755 ~/Desktop/INFX.desktop | |
echo | |
echo "*** Installation finished - you can now run the wallet by double clicking the icon on the desktop ***" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment