RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
09-23-2015, 04:54 AM
(This post was last modified: 09-23-2015, 05:21 AM by bbspike.)
(09-23-2015, 04:13 AM)kandrews Wrote: Basically there are many many many configuration and code and database changes between ZPanel and Sentora. The quickest way to make an upgrade was to take the ZPanel databases over to Sentora fresh install and rerun the daemon.
All of my servers, pcs and even my PI has /etc/hostname ... little bit strange yours doesn't, who is your server provider?
can you run:
Code:cat /etc/sentora/panel/cnf/db.php | grep "pass" | cut -d \' -f 2
and see if it returns the current zpanel root password correctly?
Also is your shell set /bin/bash?
I understand. i mainly had some questions.
We have our own servers. Don't know why there's no hostname file. I don;t think thats the biggest problem.
Try'd you code and the sql password was giving back correctly.
Shell is:
Code:
[root@192 ~]# ps -p $$ | tail -1 | awk '{print $NF}'
bash
[root@192 ~]#
Did some manual sql entry's from the script:
Code:
[root@192 /]# mysql -u root -pLmmFO7D6gR9PJmtA -e "DELETE FROM mysql.user WHERE User='root' AND Host != 'localhost'"
[root@192 /]# mysql -u root -pLmmFO7D6gR9PJmtA-e "DELETE FROM mysql.user WHERE User=''";
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@192 /]# mysql -u root -pLmmFO7D6gR9PJmtA -e "DELETE FROM mysql.user WHERE User=''";
[root@192 /]# mysql -u root -pLmmFO7D6gR9PJmtA -e "DELETE FROM mysql.user WHERE User='root' AND Host != 'localhost'"
[root@192 /]# mysql -u root -pLmmFO7D6gR9PJmtA -e "DELETE FROM mysql.user WHERE User=''";
[root@192 /]# mysql -u root -pLmmFO7D6gR9PJmtA -e "FLUSH PRIVILEGES";
[root@192 /]# mysql -u root -pLmmFO7D6gR9PJmtA -e "DROP DATABASE IF EXISTS test";
[root@192 /]# mysql -u root -pLmmFO7D6gR9PJmtA < /etc/sentora/configs/sentora-update/zpanel/sql/update-structure.sql
ERROR 1091 (42000) at line 50: Can't DROP 'pk_enablecgi_in'; check that column/key exists
[root@192 /]# mysql -u root -pLmmFO7D6gR9PJmtA < /etc/sentora/configs/sentora-update/zpanel/sql/update-data.sql
ERROR 1062 (23000) at line 17: Duplicate entry '48' for key 'PRIMARY'
[root@192 /]#
After this the new sentora tables is still not visible in phpmyadmin...
So now i did a force with sql:
Code:
[root@192 /]# mysql -f -u root -pLmmFO7D6gR9PJmtA < /etc/sentora/configs/sentora-update/zpanel/sql/update-structure.sql
ERROR 1091 (42000) at line 50: Can't DROP 'pk_enablecgi_in'; check that column/key exists
ERROR 1060 (42S21) at line 68: Duplicate column name 'vh_soaserial_vc'
[root@192 /]# mysql -f -u root -pLmmFO7D6gR9PJmtA < /etc/sentora/configs/sentora-update/zpanel/sql/update-data.sql
ERROR 1062 (23000) at line 17: Duplicate entry '48' for key 'PRIMARY'
ERROR 1062 (23000) at line 19: Duplicate entry '94' for key 'PRIMARY'
ERROR 1062 (23000) at line 20: Duplicate entry '93' for key 'PRIMARY'
ERROR 1062 (23000) at line 21: Duplicate entry '92' for key 'PRIMARY'
ERROR 1091 (42000) at line 166: Can't DROP 'pk_enablecgi_in'; check that column/key exists
[root@192 /]# mysqldump -u root -pLmmFO7D6gR9PJmtA zpanel_core | mysql -u root -pLmmFO7D6gR9PJmtA -D sentora_core
Now i can see the tables in phpmyadmin and the rest of the scripts contiunes better.
There is something wrong with the update sql files.