Never copy and paste commands that you do not understand or that were given to you by unknown people. This can be dangerous for your system, your security and your privacy. You can accidentally delete important files, get infected by a virus, give access to your data or do other unwanted actions. Always check and learn the commands before running them and use reliable sources of information.
- Debian (or similar OS)
- Login as
root
- Turn on unattended-upgrades
- PHP 8.3
- Caddy 2.7.6
One-liner:
apt purge apache* && \
apt purge php* && \
apt update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get autoremove -f -y && apt-get autoclean -y && \
apt install net-tools curl sudo wget git sqlite3 unzip -y && \
sudo apt -y install lsb-release apt-transport-https ca-certificates && \
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list &&
apt update && \
export PHP_VERSION=8.3 && \
apt install php${PHP_VERSION} php${PHP_VERSION}-fpm php${PHP_VERSION}-opcache php${PHP_VERSION}-zip php${PHP_VERSION}-sqlite3 php${PHP_VERSION}-gmp php${PHP_VERSION}-xml php${PHP_VERSION}-mbstring php${PHP_VERSION}-gd php${PHP_VERSION}-curl php-pear -y \
&& \
\
echo "unattended-upgrades unattended-upgrades/enable_auto_updates boolean true" | debconf-set-selections && \
apt install unattended-upgrades -y \
&& \
\
export CADDY_VERSION=2.8.4 && \
wget https://github.com/caddyserver/caddy/releases/download/v${CADDY_VERSION}/caddy_${CADDY_VERSION}_linux_amd64.deb && \
dpkg -i caddy_${CADDY_VERSION}_linux_amd64.deb && \
unlink caddy_${CADDY_VERSION}_linux_amd64.deb && \
caddy version; \
php -vphp -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"nano /etc/caddy/Caddyfilehttp://:80 {
root * /www/w8io
php_fastcgi unix//run/php/php8.3-fpm.sock
route {
file_server /static/*
rewrite * /index.php
}
}nano /etc/php/8.3/fpm/pool.d/www.conf- search for "owner" with
Ctrl + Wand replace with "caddy:caddy" - (optionally) add more
pm.max_childrenfor examplepm.max_children = 16(i use for w8.io)
service php8.3-fpm restart && service caddy restartmkdir /www && \
chown -R www-data:www-data /www
chsh -s /bin/bash www-datasu - www-datacd /www && \
git clone https://github.com/deemru/w8io.git && \
cd /www/w8io && \
composer update -o --no-cachecp config.sample.php config.php
nano config.php- change
W8IO_NETWORK(default:W) - change
W8IO_NODES(default:http://127.0.0.1:6869andhttps://nodes.wavesexplorer.com) - change
W8IO_MAX_UPDATE_BATCHto 10..50 if your node is local (default:1)
- You should run
php w8_updater.phpcommand a few times - Or you can run
bash updater.shto do it for you - You should reach
updaterstatus forw8_updaterto be able to browse your data - Beware it can take A LOT of time to fully index your blockchain (mainnet 3-5 days with local node)
logoutnano /etc/crontab@reboot www-data nohup bash /www/w8io/updater.sh > /www/w8io/var/db/updater.sh.log &
@reboot www-data nohup bash /www/w8io/updater_headers.sh > /www/w8io/var/db/updater_headers.sh.log &
If you feel you messed up with permissions you can always do as root:
chown -R www-data:www-data /www