phpcoin linux节点教程

PHP专题3年前 (2022)更新 admin
345 0
奖励节点 特价vps

节点官方教程https://github.com/phpcoinn/node/wiki/Node-installation

1
重装系统ubuntu 20.00 18.00 版本
2 下载宝塔面板
https://www.bt.cn/download/linux.html
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh

ubuntu 服务器安全组 开通 8888端口

3.linux命令行回车

export DB_NAME=phpcoin
export DB_USER=phpcoin
export DB_PASS=phpcoin

apt update
echo “install php with apache server”
apt install apache2 php libapache2-mod-php php-mysql php-gmp php-bcmath php-curl unzip -y
apt install mysql-server -y

mysql -e “create database $DB_NAME;”
mysql -e “create user ‘$DB_USER’@’localhost’ identified by ‘$DB_PASS’;”
mysql -e “grant all privileges on $DB_NAME.* to ‘$DB_USER’@’localhost’;”

cat << EOF > /etc/apache2/sites-available/phpcoin.conf

ServerAdmin webmaster@localhost
DocumentRoot /var/www/phpcoin/web
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

EOF
a2dissite 000-default
a2ensite phpcoin
service apache2 restart

4.将phpcoin下载下来通过宝塔面板上传到/var/www/phpcoin phpcoin文件
https://github.com/phpcoinn/node

5.linux命令行回车

cp config/config-sample.inc.php config/config.inc.php
sed -i “s/ENTER-DB-NAME/$DB_NAME/g” config/config.inc.php
sed -i “s/ENTER-DB-USER/$DB_USER/g” config/config.inc.php
sed -i “s/ENTER-DB-PASS/$DB_PASS/g” config/config.inc.php

echo “PHPCoin: configure node”
echo “===================================================================================================”
mkdir tmp
mkdir web/apps
chown -R www-data:www-data tmp
chown -R www-data:www-data web/apps

export IP=$(curl -s http://whatismyip.akamai.com/)
echo “PHPCoin: open start page”
echo “===================================================================================================”
curl “http://$IP” > /dev/null 2>&1

6.将区块链数据库文件下载下来通过宝塔面板,上传到/var/www/phpcoin/temp/ blockchain.sql.zip
https://phpcoin.net/download/blockchain.sql.zip

cd /var/www/phpcoin/tmp

命令行解压文件得到blockchain.sql
unzip blockchain.sql.zip

切换到路径
cd /var/www/phpcoin
导入到数据库
php cli/util.php importdb tmp/blockchain.sql

同步数据库
php cli/util.php download-apps

设置自动更新phpcoin文件
cd /var/www/phpcoin/scripts
chmod +x install_update.sh
./install_update.sh

通过宝塔面板找到文件路径,打开编辑设置钱包地址,公钥 私钥
/var/www/phpcoin/config/config.inc.php

© 版权声明
奖励节点

相关文章

暂无评论

暂无评论...