ZENLIX.docs
Search…
Ubuntu 18.04+VestaCP
1
$ sudo apt-get update
Copied!
1
$ curl -O http://vestacp.com/pub/vst-install.sh
Copied!
1
$ sudo bash vst-install.sh --nginx yes --phpfpm yes --apache no --named no --remi yes --vsftpd no --proftpd no --iptables yes --fail2ban yes --quota no --exim no --dovecot no --spamassassin no --clamav no --mysql yes --postgresql no --hostname example.com --email [email protected] --password [email protected]
Copied!
1
$ sudo apt install -y build-essential
Copied!
1
$ wget http://download.redis.io/releases/redis-stable.tar.gz
2
$ tar xzf redis-stable.tar.gz
3
$ cd redis-stable
4
$ make
5
$ sudo make install
6
$ cd utils
7
$ sudo ./install_server.sh
8
$ sudo update-rc.d redis_6379 defaults
Copied!
1
$ sudo apt install -y php-imap php-ldap php-zip nodejs npm
Copied!
1
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
Copied!
1
$ sudo service nginx restart
2
$ sudo service php-fpm restart
3
4
$ exit
Copied!
2
$ cd web/example.com/public_html
Copied!
1
$ sudo npm install dotenv --save -g
2
$ sudo npm install pm2 -g
3
$ sudo npm install socket.io ioredis dotenv
Copied!
1
$ sudo /usr/local/vesta/bin/v-add-database admin zenlix zenlix [email protected]
2
$ sudo apt-get install -y supervisor
Copied!
1
$ sudo wget -O /usr/local/vesta/data/templates/web/nginx/php-fpm/zenlix.tpl https://ru.zenlix.com/files/zenlix.tpl
2
$ sudo wget -O /usr/local/vesta/data/templates/web/nginx/php-fpm/zenlix.stpl https://ru.zenlix.com/files/zenlix.stpl
3
$ sudo /usr/local/vesta/bin/v-change-web-domain-tpl admin example.com zenlix RESTART
Copied!
1
$ cd ~/web/example.com/public_html/
2
$ git init .
3
$ git pull "http://:@git.zenlix.com/snisar/zenlix35.git" master
4
$ chmod -R +w ./storage/*
5
$ chmod -R +w ./bootstrap/*
6
$ chmod -R +w ./nodejs/*
Copied!
1
$ sudo service nginx restart
2
$ sudo service php-fpm restart
3
4
$ php artisan zenlix:install
Copied!
1
$ cd ~/web/example.com/public_html/nodejs/
2
$ sudo pm2 start server.js -n zenserver --watch /home/zenlix/zenlix/nodejs/
3
$ sudo pm2 startup
4
$ sudo pm2 save
5
$ sudo pm2 install pm2-logrotate
Copied!
1
$ sudo /usr/local/vesta/bin/v-add-cron-job admin '*' '*' '*' '*' '*' "/usr/bin/php /home/admin/web/example.com/public_html/artisan schedule:run >> /dev/null 2>&1"
Copied!
Или:
1
$ (crontab -l ; echo "* * * * * /usr/bin/php /home/admin/web/example.com/public_html/artisan schedule:run >> /dev/null 2>&1")| crontab -
Copied!
1
$ echo "
2
[program:zenlix-worker]
3
process_name=%(program_name)s_%(process_num)02d
4
command=/usr/bin/php /home/admin/web/example.com/public_html/artisan queue:work --sleep=3 --tries=3 --daemon
5
autostart=true
6
autorestart=true
7
user=admin
8
numprocs=8
9
" | sudo tee --append /etc/supervisor/conf.d/zenlix-worker.conf
Copied!
1
$ sudo supervisorctl reread
2
$ sudo supervisorctl update
3
$ sudo supervisorctl start zenlix-worker:*
Copied!
Last modified 1yr ago
Copy link