cd /root
curl -O http://vestacp.com/pub/vst-install.sh
bash vst-install.sh --nginx yes --phpfpm yes --apache no --vsftpd no --proftpd no --exim yes --dovecot yes --spamassassin yes --clamav yes --named yes --iptables yes --fail2ban yes --mysql yes --postgresql no --remi yes --quota no
rm /home/admin/web/yourdomain.com/public_html/index.html
rm /home/admin/web/yourdomain.com/public_html/robots.txt
cd /home/admin/web/yourdomain.com/public_html
unzip File_Hosting_Script_*
rm File_Hosting_Script_*
chmod 755 _config.inc.php
chmod 755 plugins/
chmod 755 files/
chmod 755 logs/
chmod 755 cache/
crontab -e
nano /home/admin/conf/web/nginx.yourdomain.com.confIMPORTANT - If you've enabled https, this file will be named as:
nano /home/admin/conf/web/snginx.yourdomain.com.conf
Replace with: client_max_body_size 5G;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
include fastcgi_params;
}
#location / {
if (!-e $request_filename) {
rewrite ^/(.*) /index.php?_page_url=$1 last;
}
#}
location /files/ {
internal;
}
# these locations would be hidden by .htaccess normally
location /logs/ {
deny all;
}
service nginx restart
cp /etc/php.ini /etc/php-ORIG.ini
sed -i 's/memory_limit = .*/memory_limit = 512M/' /etc/php.ini
sed -i 's/upload_max_filesize = .*/upload_max_filesize = 5G/' /etc/php.ini
sed -i 's/post_max_size = .*/post_max_size = 5G/' /etc/php.ini
sed -i 's/max_execution_time = .*/max_execution_time = 180/' /etc/php.ini
sed -i 's/max_input_time = .*/max_input_time = 180/' /etc/php.ini
sed -i 's/output_buffering = .*/output_buffering = 4096/' /etc/php.ini
sed -i 's/;output_handler =.*/output_handler =/' /etc/php.ini
sed -i 's/zlib.output_compression = .*/zlib.output_compression = Off/' /etc/php.ini
sed -i 's/zlib.output_compression_level = .*/zlib.output_compression_level = -1/' /etc/php.ini
sed -i 's/;zlib.output_handler =.*/zlib.output_handler =/' /etc/php.ini
cp /etc/nginx/nginx.conf /etc/nginx/nginx-ORIG.conf
sed -i '/http {/a fastcgi_read_timeout 300;' /etc/nginx/nginx.conf
sed -i '/http {/a fastcgi_keep_conn on;' /etc/nginx/nginx.conf
sed -i '/http {/a fastcgi_buffering off;' /etc/nginx/nginx.conf
sed -i '/http {/a proxy_buffering off;' /etc/nginx/nginx.conf
sed --in-place '/gzip /d' /etc/nginx/nginx.conf
sed -i '/http {/a gzip off;' /etc/nginx/nginx.conf
sed --in-place '/worker_connections /d' /etc/nginx/nginx.conf
sed -i '/events {/a worker_connections 10000;' /etc/nginx/nginx.conf
cp /etc/php-fpm.d/www.conf /etc/php-fpm.d/www-ORIG.conf
sed --in-place '/pm = dynamic/d' /etc/php-fpm.d/www.conf
sed --in-place '/pm.max_children = /d' /etc/php-fpm.d/www.conf
sed -i -e '$arequest_terminate_timeout = 300' /etc/php-fpm.d/www.conf
sed -i -e '$apm = ondemand' /etc/php-fpm.d/www.conf
sed -i -e '$apm.max_children = 75' /etc/php-fpm.d/www.conf
sed -i -e '$apm.process_idle_timeout = 10s' /etc/php-fpm.d/www.conf
cp /etc/my.cnf /etc/my-ORIG.cnf
sed -i 's/max_connections.*/max_connections=600/' /etc/my.cnf
sed --in-place '/query_cache_size=*/d' /etc/my.cnf
sed -i '/max_connections=600/a query_cache_limit = 1048576' /etc/my.cnf
sed -i '/max_connections=600/a query_cache_type = 1' /etc/my.cnf
sed -i '/max_connections=600/a query_cache_size = 268435456' /etc/my.cnf
service mysqld restart or service mariadb restart
service nginx restart
service php-fpm restart
rm /home/admin/web/fs1.yourdomain.com/public_html/index.html
rm /home/admin/web/fs1.yourdomain.com/public_html/robots.txt
rsync -avh --progress --exclude 'files/*' --exclude 'logs/*' --exclude 'cache/*' --exclude '___OLD_SITE/*' /home/admin/web/yourdomain.com/public_html/ [email protected]:/home/admin/web/fs1.yourdomain.com/public_html
define("_CONFIG_SITE_HOST_URL", "fs1.yourdomain.com");
define("_CONFIG_SITE_FULL_URL", "fs1.yourdomain.com");
define("_CONFIG_DB_HOST", "1.1.1.1"); /* database host name */
nano /etc/my.cnf
#bind-address = 127.0.0.1
service mysqld restart
chmod +x /home/admin/web/yourdomain.com/public_html/
bash vst-install.sh --nginx yes --phpfpm yes --apache no --vsftpd no --proftpd no --exim yes --dovecot yes --spamassassin yes --clamav yes --named yes --iptables yes --fail2ban yes --mysql yes --postgresql no --remi yes --quota noYou will need to upgrade PHP to v7.4 after:
yum install yum-utilsIf you see other dependency issues with roundcube or phpMyAdmin, these may need removing via yum first.
yum-config-manager --enable remi-php74
yum update -y