lokomotivan
10/17/2017 - 1:14 PM

VestaCP

VestaCP

Connect to your server as root via SSH
ssh root@my.ip.address

see current dir
pwd

list dirs
ls

go to domains folder
cd /home/admin/web

go back to root
cd -

delete all files and folders in "lampp" dir
rm -rf lampp

or as super user
sudo rm -rf lampp

Install VestaCP

Connect to your server as root via SSH
ssh root@108.61.170.75

Download installation script
curl -O http://vestacp.com/pub/vst-install.sh

Run it bash vst-install.sh

Upgrade to PHP7

sudo apt-get install python-software-properties    
sudo apt-get -f install (IF NEEDED)    
sudo add-apt-repository ppa:ondrej/php    
sudo apt-get update    
sudo apt-get update && apt-get purge php5-fpm && apt-get --purge autoremove && apt-get install php7.0-fpm php7.0-mysql php7.0 php7.0-json php7.0-curl libapache2-mod-php7.0 php7.0-opcache php7.0-xml php7.0-gd php7.0-bz2    
sudo service apache2 restart    

DISABLE PHP5 - ENABLE PHP 7

sudo a2dismod php5    
sudo a2enmod php7.0    
sudo service apache2 restart    

INSTALL GD, ZIP, mCrypt

sudo apt-get install php7.0-gd    
sudo apt-get install php7.0-zip     
sudo apt-get install mcrypt php7.0-mcrypt    
#and than restart your webserver.    
sudo service apache2 restart    

Install mbstring php extension (requierd by akeeba)

sudo apt-get install php7.0-mbstring

Increase the buffer size of mysql (for joomla)

nano /etc/mysql/my.cnf
CTRL+C to set the cursor
Change this sort_buffer_size = 64K To this
sort_buffer_size = 256K
CTRL+S to save
confirm
sudo service mysql restart

FTP not working?

nano /etc/vsftpd.conf
change
pasv_enable from YES to NO # or vise versa
hit
"ctrl+o" to save? "ctrl+x" to exit
restart ftp server
restart vsftpd

DOMAIN - NAME SERVERS

In domain registrar

  1. Create ns1.example.tld and ns2.example.tld glue records and point them both to the Digital Ocean droplet IP address. For verification check here http://ping.eu/nslookup/ if ns1.example.tld resolving name to vps ip then ok, now you can use own DNS name.
  2. Set nameservers to ns1.example.tld and ns2.example.tld.

In Vesta CP

  1. Under "Web", add example.tld. (ok)
  2. Under "DNS", edit domain and select child-ns template. In SOA write ns1.example.tld
  3. Under "Packages", edit "default" and set ns1.example.tld and ns2.example.tld as nameservers.

DOMAIN NOT WROKING?

sudo apt-get install apparmor-utils    
sudo aa-complain usr.sbin.named    
sudo /etc/init.d/apparmor stop    
sudo /etc/init.d/apparmor start    
sudo service bind9 restart