Install Litecoin: Porovnání verzí
Z Poznámkový blok
Řádka 35: | Řádka 35: | ||
all: | all: | ||
− | + | apt-get -y install $(PACKAGES) | |
cd $(SRC_ROOT) | cd $(SRC_ROOT) | ||
− | + | if [ ! -d $(DB4DIR) ]; then \ | |
− | + | if [ ! -f $(DB4FILE) ]; then \ | |
− | + | wget $(DB4URL); \ | |
− | + | fi && \ | |
− | + | echo $(DB4HASH) $(DB4FILE) | sha256sum -c && \ | |
− | + | rm -Rf $(DB4VERSION) && \ | |
− | + | tar -xzvf $(DB4FILE) && \ | |
− | + | cd $(DB4VERSION)/build_unix/ && \ | |
− | + | ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$(DB4DIR) && \ | |
− | + | mkdir -p $(DB4DIR) && \ | |
− | + | make install; \ | |
− | + | fi | |
− | + | if [ ! -d litecoin ]; then \ | |
− | + | git clone https://github.com/litecoin-project/litecoin.git && \ | |
− | + | cd litecoin && \ | |
− | + | CURRENT=`git tag | grep -P '^v[\d\.]+$$' | sort --version-sort | tail -1` && \ | |
− | + | git checkout tags/$$CURRENT -b local-$$CURRENT && \ | |
− | + | ./autogen.sh && \ | |
− | + | ./configure --without-gui LDFLAGS="-L$(DB4DIR)/lib/" CPPFLAGS="-I$(DB4DIR)/include/"; \ | |
− | + | fi | |
install: all | install: all | ||
− | + | cd litecoin; \ | |
− | + | make install; \ | |
+ | |||
+ | sudo adduser litecoin --gecos "litecoin" --disabled-password | ||
+ | echo "litecoin:${LITECOINT_USER_PASSWORD}" | sudo chpasswd | ||
+ | |||
+ | rm -rf /home/litecoin/.litecoin | ||
+ | mkdir /home/litecoin/.litecoin | ||
+ | echo 'daemon=1' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'server=1' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'gen=0' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'port=5889' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'rpcport=5899' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'rpcallowip=127.0.0.1' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'rpcuser=vertcoinuser' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo "rpcpassword=${VERTCOIN_RPC_PASSWORD}" >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'rpcworkqueue=300' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'blockmaxsize=1000000' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'mintxfee=0.00001' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'minrelaytxfee=0.00001' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | echo 'maxconnections=200' >> /home/litecoin/.litecoin/litecoin.conf | ||
+ | |||
clean: | clean: | ||
− | + | rm -Rf litecoin | |
− | + | rm -Rf $(DB4VERSION) | |
rm -f $(DB4FILE) | rm -f $(DB4FILE) | ||
Verze z 4. 3. 2018, 17:39
Prvně vytvoříme soubor
SRC_ROOT=/usr/src DB4DIR=/usr/local/db4 DB4VERSION=db-4.8.30.NC DB4FILE=$(DB4VERSION).tar.gz DB4URL=http://download.oracle.com/berkeley-db/$(DB4FILE) DB4HASH=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef PACKAGES= \ automake \ autotools-dev \ bsdmainutils \ build-essential \ libboost-chrono-dev \ libboost-filesystem-dev \ libboost-program-options-dev \ libboost-system-dev \ libboost-test-dev \ libboost-thread-dev \ libevent-dev \ libminiupnpc-dev \ libprotobuf-dev \ libqrencode-dev \ libqt5core5a \ libqt5dbus5 \ libqt5gui5 \ libssl-dev \ libtool \ libzmq3-dev \ pkg-config \ protobuf-compiler \ qttools5-dev \ qttools5-dev-tools \ all: apt-get -y install $(PACKAGES) cd $(SRC_ROOT) if [ ! -d $(DB4DIR) ]; then \ if [ ! -f $(DB4FILE) ]; then \ wget $(DB4URL); \ fi && \ echo $(DB4HASH) $(DB4FILE) | sha256sum -c && \ rm -Rf $(DB4VERSION) && \ tar -xzvf $(DB4FILE) && \ cd $(DB4VERSION)/build_unix/ && \ ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$(DB4DIR) && \ mkdir -p $(DB4DIR) && \ make install; \ fi if [ ! -d litecoin ]; then \ git clone https://github.com/litecoin-project/litecoin.git && \ cd litecoin && \ CURRENT=`git tag | grep -P '^v[\d\.]+$$' | sort --version-sort | tail -1` && \ git checkout tags/$$CURRENT -b local-$$CURRENT && \ ./autogen.sh && \ ./configure --without-gui LDFLAGS="-L$(DB4DIR)/lib/" CPPFLAGS="-I$(DB4DIR)/include/"; \ fi install: all cd litecoin; \ make install; \ sudo adduser litecoin --gecos "litecoin" --disabled-password echo "litecoin:${LITECOINT_USER_PASSWORD}" | sudo chpasswd rm -rf /home/litecoin/.litecoin mkdir /home/litecoin/.litecoin echo 'daemon=1' >> /home/litecoin/.litecoin/litecoin.conf echo 'server=1' >> /home/litecoin/.litecoin/litecoin.conf echo 'gen=0' >> /home/litecoin/.litecoin/litecoin.conf echo 'port=5889' >> /home/litecoin/.litecoin/litecoin.conf echo 'rpcport=5899' >> /home/litecoin/.litecoin/litecoin.conf echo 'rpcallowip=127.0.0.1' >> /home/litecoin/.litecoin/litecoin.conf echo 'rpcuser=vertcoinuser' >> /home/litecoin/.litecoin/litecoin.conf echo "rpcpassword=${VERTCOIN_RPC_PASSWORD}" >> /home/litecoin/.litecoin/litecoin.conf echo 'rpcworkqueue=300' >> /home/litecoin/.litecoin/litecoin.conf echo 'blockmaxsize=1000000' >> /home/litecoin/.litecoin/litecoin.conf echo 'mintxfee=0.00001' >> /home/litecoin/.litecoin/litecoin.conf echo 'minrelaytxfee=0.00001' >> /home/litecoin/.litecoin/litecoin.conf echo 'maxconnections=200' >> /home/litecoin/.litecoin/litecoin.conf
clean: rm -Rf litecoin rm -Rf $(DB4VERSION) rm -f $(DB4FILE)
Spustíme jej
make -C Debian_LitecoinCore_install install