Page 9 of 9

Re: Ubuntu 18.04 Support ETA

Posted: Thu Oct 10, 2019 7:31 pm
by saiy2k
Hi,

I am also having issues with installing VestaCP with Ubuntu 18.04.3 in my DigitalOcean server. I did install both gnupg and gnupg2 packages in different ubuntu instances and tried installing VestaCP. But in both cases, I am getting errors.

My VestaCP installation command:

Code: Select all

bash vst-install.sh --nginx yes --apache yes --phpfpm no --named no --remi no --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim no --dovecot no --spamassassin no --clamav no --softaculous no --mysql yes --postgresql no
Listing the errors that I get after installing gnupg2:

1. Error A: vesta.service fail

Code: Select all

[....] Restarting vesta (via systemctl): vesta.serviceJob for vesta.service failed because the control process exited with error code.
See "systemctl status vesta.service" and "journalctl -xe" for details.
 failed!
2. Error B: Can't connect to local MySQL server

Code: Select all

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
unable to connect to mysql server.
error encountered creating user:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
dbconfig-common: roundcube configure: noninteractive fail.
dbconfig-common: roundcube configure: ignoring errors from here forwards


[b]3. Error C: Can't load /home/gg/.rnd into RNG[/b]

[code]Processing triggers for libapache2-mod-php7.2 (7.2.19-0ubuntu0.18.04.2) ...
Can't load /home/gg/.rnd into RNG
140617335595456:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/gg/.rnd
4. Error D: cannot create directory ‘/var/lib/mysql’: File exists

Code: Select all

2019-10-10 18:09:30 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2019-10-10 18:09:30 [ERROR]   The data directory needs to be specified.
mkdir: cannot create directory ‘/var/lib/mysql’: File exists
2019-10-10T18:09:30.532012Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-10-10T18:09:30.538254Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2019-10-10T18:09:30.538722Z 0 [ERROR] Aborting

Re: Ubuntu 18.04 Support ETA

Posted: Sat Nov 09, 2019 1:53 am
by Pham
Today I finally SUCCEED after I've tried to install VestaCP for the last 2 days on my Ubuntu 18.04.
I'm using nginx and php-fpm btw.
Image

Install script -> https://vestacp.com/install/
Same errors and a lot of clean Ubuntu installs and fresh VestaCP installs
  • apt install gnup2 -> install script (same errors).
Tried a lot of different methodes and read a in the forum without any results.

Error 1.

Code: Select all

[....] Restarting vesta (via systemctl): vesta.serviceJob for vesta.service failed because the control process exited with error code.
See "systemctl status vesta.service" and "journalctl -xe" for details.
failed!
Image

Error 2.

Code: Select all

Creating config file /etc/phpmyadmin/config-db.php with new version
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
unable to connect to mysql server.
error encountered creating user:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
dbconfig-common: phpmyadmin configure: noninteractive fail.
dbconfig-common: phpmyadmin configure: ignoring errors from here forwards
Image

Other errors.

Code: Select all

Can't load /home/pham/.rnd into RNG
139857352327616:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/pham/.rnd
2019-11-08 21:49:53 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2019-11-08 21:49:53 [ERROR]   The data directory needs to be specified.
mkdir: cannot create directory ‘/var/lib/mysql’: File exists
2019-11-08T21:49:53.491292Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-11-08T21:49:53.495528Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2019-11-08T21:49:53.495591Z 0 [ERROR] Aborting

mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
ERROR 1054 (42S22) at line 1: Unknown column 'password' in 'where clause'
Image

Image
After a lot of errors it finished installing (installed with errors)

NOTE: I masked and renamed it to DOMAIN my domain/hostname for privacy reasons
When I try to go the the admin I'm getting an error with SSL and can't reach for the admin from browser Chrome.
Image
I know as a developer in FireFox you can still bypass that and access the page. So I could still manage to reach the admin after install with errors.

fkc the errors and let's get it work!
So let's fix this SSL error!
  • I'm able to login. But however I can't seem to use the Let's Encrypt function from VestaCP
Here's a workaround!
Somethings you should know before you start this.
dir: /usr/local/vesta/bin (contains scripts for VestaCP)
So let's create an variable for the vesta directory with following command line

Code: Select all

export VESTA=/usr/local/vesta/
Now we can access the directory with $VESTA
The command to use let's encrypt v-add-letsencrypt-domain USER DOMAIN

Code: Select all

$VESTA/bin/v-add-letsencrypt-domain admin domain.com
This error returns:

Code: Select all

Can't load /home/pham/.rnd into RNG
139707816092096:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/pham/.rnd
Fix for the error:

Code: Select all

sudo nano /etc/ssl/openssl.cnf
comment out with # like below

Code: Select all

#RANDFILE               = $ENV::HOME/.rnd
try the command below again

Code: Select all

$VESTA/bin/v-add-letsencrypt-domain admin domain.com
restart vesta to get it work on your domain

Code: Select all

service vesta restart
Your domain is now SSL secured. BUT VestaCP is using port 8083 by default. So we aren't ready yet. Go check if your domain without :8083 is secured.
Now let's secure VestaCP admin

Option 1.
Not sure if this option is working (I did the option else follow the other one below)
Go to "server" -> "configure" -> "Vesta SSL" -> checkbox "Use Web Domain SSL Certificate"
Image
Image

Option 2.
SSL keys and Certs for websites created in VestaCP are stored in:

Code: Select all

/home/admin/conf/web/
ssl.domain.com.crt
ssl.domain.com.key
VestaCP admin has the SSL key and Cert stored in:

Code: Select all

/usr/local/vesta/ssl/
certificate.crt
certificate.key
You need 2 files -> crt and key.

You need to let the vestacp -> domain.com:8083 use the key and cert of the domain.com. Because they have the same domain.
I renamed the files first and than I created alias to my website domain key and cert for VestaCP (CHANGE domain.com TO YOUR OWN) and restart Vesta

Code: Select all

cd /usr/local/vesta/ssl
mv certificate.crt certificate.crt.bak
mv certificate.key certificate.crt.key
ln -s /home/admin/conf/web/ssl.domain.com.crt /usr/local/vesta/ssl/certificate.crt
ln -s /home/admin/conf/web/ssl.server.domain.com.crt /usr/local/vesta/ssl/certificate.crt
service vesta restart


Now your VestaCP admin domain.com:8083 is also secured.
I still need to figure out why the let'sencrypt in the admin isn't working.
But for now use:

Create VARIABLE

Code: Select all

export LETSENCRYPT=/usr/local/vesta/bin/v-add-letsencrypt-domain
Create SSL => $LETSENCRYPT USER DOMAIN.COM

Code: Select all

$LETSENCRYPT admin DOMAIN.COM
service vesta restart
If anyone knows how to solve the let's encrypt in the admin let me know.
ERROR:

Code: Select all

Let's Encrypt validation status 400