This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
#11
RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
Hi,

I revert the server.

I was anylizing the log and have some questions:

Why this?
Code:
old_hostname=$(cat /etc/hostname)
# In file hostname
echo "$PANEL_FQDN" > /etc/hostname
 
None of my servers has a /etc/hostname file.....? So thats not gone work for me.

Next:
Code:
#--- Resolv.conf protect
chattr +i /etc/resolv.conf

#--- Prepare hostname
old_hostname=$(cat /etc/hostname)
# In file hostname
echo "$PANEL_FQDN" > /etc/hostname

# In file hosts
sed -i "/127.0.1.1[\t ]*$old_hostname/d" /etc/hosts
sed -i "s|$old_hostname|$PANEL_FQDN|" /etc/hosts

# For current session
hostname "$PANEL_FQDN"

# In network file
if [[ "$OS" = "CentOs" && "$VER" = "6" ]]; then
   sed -i "s|^\(HOSTNAME=\).*\$|HOSTNAME=$PANEL_FQDN|" /etc/sysconfig/network
   /etc/init.d/network restart
fi
Why all this trouble? Why not leave al as it is? After all your are updating a working Zpanel server. No need for changing al this, everyone howm has custom edits to these files will get trouble.

Something wnt worng for me here:?
Code:
mysqlpassword=$(cat /etc/sentora/panel/cnf/db.php | grep "pass" | cut -d \' -f 2);
so this:
Code:
if [ -z "$mysqlpassword" ]; then
   mysqlpassword=$(passwordgen);
   mysqladmin -u root password "$mysqlpassword"
fi
screwed the rest of the update for me up. Somehow it did nog get the ZPanel Root Mysql password right.
[Image: logo2.png]

My being on this forum is all personal and all is done here by me has nothing to with the company Web Improved I work for Smile
Reply
Thanks given by:
#12
RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
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?
Reply
Thanks given by: bbspike
#13
RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
(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 questionsSmile.

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.
[Image: logo2.png]

My being on this forum is all personal and all is done here by me has nothing to with the company Web Improved I work for Smile
Reply
Thanks given by:
#14
RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
These lines are conflicting somehow:

Code:
INSERT INTO `zpanel_core`.`x_modules` (`mo_id_pk`, `mo_category_fk`, `mo_name_vc`, `mo_version_in`, `mo_folder_vc`, `mo_type_en`, `mo_desc_tx`, `mo_installed_ts`, `mo_enabled_en`, `mo_updatever_vc`, `mo_updateurl_tx`) VALUES('48', '3', 'Protected Directories', '200', 'protected_directories', 'user', 'Password protect your web applications and directories.', NULL, 'true', '', '');

INSERT INTO `zpanel_core`.`x_permissions` (`pe_id_pk`, `pe_group_fk`, `pe_module_fk`) VALUES('94', '3', '48');
INSERT INTO `zpanel_core`.`x_permissions` (`pe_id_pk`, `pe_group_fk`, `pe_module_fk`) VALUES('93', '2', '48');
INSERT INTO `zpanel_core`.`x_permissions` (`pe_id_pk`, `pe_group_fk`, `pe_module_fk`) VALUES('92', '1', '48');

The insert already exists in my zpanel database. With these erro's the sql script is not making any changes. Using the -f option will bypass it but is not clean to do.
[Image: logo2.png]

My being on this forum is all personal and all is done here by me has nothing to with the company Web Improved I work for Smile
Reply
Thanks given by:
#15
RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
Interesting might have to change to on duplicate key update statements, thanks for all your testing, really helpful Smile
Reply
Thanks given by:
#16
RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
(09-23-2015, 07:12 PM)kandrews Wrote: Interesting might have to change to on duplicate key update statements, thanks for all your testing, really helpful Smile

No thanks, glad i can help to make this happen. iTs about time the zpanel users coming to Sentora.

I will give it antoher run tonight with the -f option to check out the rest of the script.
[Image: logo2.png]

My being on this forum is all personal and all is done here by me has nothing to with the company Web Improved I work for Smile
Reply
Thanks given by:
#17
RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
I really agree we've all been very busy recently but i'm making sure to spend some time each day on the project Smile

If you manage to get this working please do raise a pull request or post the changes you would like made Smile

I think we should avoid -f .. never the right solution long term Tongue
Reply
Thanks given by:
#18
RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
Gave it another run with the -f. Works great so far. Zpanel was correctly updated to sentora and as i could see this quickly every client was intact. even roundcube mail and so on works fine. Ftp works fine.

Keep you posted.
[Image: logo2.png]

My being on this forum is all personal and all is done here by me has nothing to with the company Web Improved I work for Smile
Reply
Thanks given by:
#19
RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
(09-23-2015, 07:26 PM)kandrews Wrote: I really agree we've all been very busy recently but i'm making sure to spend some time each day on the project Smile

If you manage to get this working please do raise a pull request or post the changes you would like made Smile

I think we should avoid -f .. never the right solution long term Tongue

Maybe you can disbale the mysql strict mode within the installer master script for only during the script itself?
[Image: logo2.png]

My being on this forum is all personal and all is done here by me has nothing to with the company Web Improved I work for Smile
Reply
Thanks given by:
#20
RE: Upgrading ZPanel 10.1.* to Sentora - Alpha/Beta
That could work, thank-you again for helping with testing!!

I'll be spending more time on this tomorrow hopefully Smile I'll have a look at fixing the SQL updates ...
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
sentora 1.0.3 & critical patch for sentora 1.0.x Me.B 24 33,026 10-11-2015, 10:20 PM
Last Post: Finallf
From ZPanel upto Sentora 5050 41 54,491 09-18-2015, 08:21 PM
Last Post: kandrews
Sentora 1.0.0 patch (Centos 6.x Only) Me.B 9 20,072 04-01-2015, 12:04 PM
Last Post: akong

Forum Jump:


Users browsing this thread: 1 Guest(s)