Skip to content

Instantly share code, notes, and snippets.

@inerba
Last active September 28, 2018 06:49
Show Gist options
  • Save inerba/33bdc9c6088c9ecd2979389aaa084910 to your computer and use it in GitHub Desktop.
Save inerba/33bdc9c6088c9ecd2979389aaa084910 to your computer and use it in GitHub Desktop.

Prerequisiti

Ubuntu 16.04

Operazioni preliminari

sudo apt-get update && sudo apt-get upgrade

VESTACP

Installazione

curl -O http://vestacp.com/pub/vst-install.sh
bash vst-install.sh

Inserimento templates extra

  • curry cms
  • laravel
  • drupal
  • redmine

(https://github.com/errogaht/vesta_templates)

cd /usr/local/vesta/data/templates/web
git clone https://github.com/errogaht/vesta_templates.git
cp -R vesta_templates/apache2 .
cp -R vesta_templates/nginx .
rm -R vesta_templates

Fix per phpmyadmin

(https://forum.vestacp.com/viewtopic.php?f=14&t=10307)

Ubuntu curl -O -k https://raw.githubusercontent.com/skurudo/phpmyadmin-fixer/master/pma-ubuntu.sh && chmod +x pma-ubuntu.sh && ./pma-ubuntu.sh

Debian curl -O -k https://raw.githubusercontent.com/skurudo/phpmyadmin-fixer/master/pma-debian.sh && chmod +x pma-debian.sh && ./pma-debian.sh

php.ini VESTACP

/etc/php/7.0/apache2/php.ini

upload_max_filesize = 64M # Maximum file size your server will allowed to be uploaded, in megabytes
post_max_size = 64M # Maximum data size allowed to uploaded, in megabytes
memory_limit = 512M #Maximum amount of memory a script may consume, in megabytes
max_input_time = 120 # Maximum amount of time each script can wait for requested data, 
max_execution_time = 60 # Maximum allowed execution time of each script, in seconds.
max_input_vars: The maximum number of variable form elements that can be submitted to a single page.

my.cnf Mysql server has gone away fix

/etc/mysql/my.cnf

edit

wait_timeout=600
max_allowed_packet = 64M

service mysql restart

Creazione SWAP (2GB)

2gb = 1024 * 1024 * 2

dd if=/dev/zero of=/swap bs=1024 count=2097152 
mkswap /swap && chown root. /swap && chmod 0600 /swap && swapon /swap
echo /swap swap swap defaults 0 0 >> /etc/fstab
echo vm.swappiness = 0 >> /etc/sysctl.conf && sysctl -p

Altre estensioni php

sudo apt-get install php7.0-zip

Composer sistem-wide

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

NPM e node.js

sudo apt-get install nodejs npm

Memcached

sudo apt-get install php5-memcached memcached

Elasticsearch

Login as root

sudo -s

Update Aptitude

apt-get update

Install Java

apt-get install openjdk-7-jre-headless -y

Download and install Elasticsearch Public Signing Key

wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

Add repository

echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list

Update Aptitude

apt-get update

Install Elasticsearch

apt-get install elasticsearch

Set Elasticsearch to run on startup

update-rc.d elasticsearch defaults 95 10

Start Elasticsearch server

/etc/init.d/elasticsearch start

php-cgi eat up the memory

https://forum.vestacp.com/viewtopic.php?t=4758&start=10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment