Upgrading fog 1.5.4 to 1.5.9 stable version using github
-
I know this is probably a very simple thing if you are Linux Guru, unfortunately although I love fog, I am no Linux Guru, how do you do the above? we are also using ubuntu 16.04 which is probably older than time now. So can it be done and if so how?
-
@trev-lchs First backup your fog server 16.04 is really old. The FOG installer should support it, but the risk is that the 16.04 repos may not have the needed packages any more. If the upgrade fails you will have a botched upgrade and will need to start over. SO current backups are important. If you have the fog server as a VM take a snapshot so you can roll things back quickly.
When using the git method of installing, you should have a fogproject folder. Typically you would find that in /root/fogproject directory. Other instructions say to use /opt so it might be in /opt/fogproject.
Upgrading is pretty simple.
The first thing you will need to do is switch to the root user. Update the local repository and then reinstall FOG.
su - cd /root/fogproject # Get the current released code git pull # Reinstall FOG cd bin ./installfog.sh
The fog installer should remember your previous settings and then just upgrade fog.
Half way through it will ask you to load up the web site and then update the database. Once the database has been updated come back to the fog server cli and complete the upgrade.
That’s it.
-
@george1421 Thanks again George, I will get right onto it.
-
@george1421 HI George I keep getting this error when running the install, it asked me at the start if i wanted to upgrade the following
*** Detected a potential need to reinstall apache and php files.
*** This will remove the /etc/php* and /etc/apache2* directories
*** and remove/purge the apache and php files from this system.
*** If you’re okay with this please type Y, anything else will
*** continue the installation, but may mean you will need to
*** remove the files later and make proper changes as
*** necessary. (Y/N):
ySo i agreed to this, then further down it asks for a new password for the database which i entered but it was not secure enough i guess and it gave me one it decided to use, once i took a note and pressed ok, I got this error below any advice? I have restored the server back to before i started the install so its all still working.
!!!
!! The installer was not able to run all the way to the end as !!
!! something has caused it to fail. The following few lines are !!
!! from the error log file which might help us figure out what’s !!
!! wrong. Please add this information when reporting an error. !!
!! As well you might want to take a look at the full error log !!
!! in /root/fogproject/bin/error_logs/fog_error_1.5.9.log !!
!!!Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
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.
mysql: [Warning] Using a password on the command line interface can be insecure.
Failed to stop php7.1-fpm.service: Unit php7.1-fpm.service not loaded.
root@fog2:/root/fogproject/bin# -
@george1421 HI George I keep getting this error when running the install, it asked me at the start if i wanted to upgrade the following
*** Detected a potential need to reinstall apache and php files.
*** This will remove the /etc/php* and /etc/apache2* directories
*** and remove/purge the apache and php files from this system.
*** If you’re okay with this please type Y, anything else will
*** continue the installation, but may mean you will need to
*** remove the files later and make proper changes as
*** necessary. (Y/N):
ySo i agreed to this, then further down it asks for a new password for the database which i entered but it was not secure enough i guess and it gave me one it decided to use, once i took a note and pressed ok, I got this error below any advice? I have restored the server back to before i started the install so its all still working.
!!!
!! The installer was not able to run all the way to the end as !!
!! something has caused it to fail. The following few lines are !!
!! from the error log file which might help us figure out what’s !!
!! wrong. Please add this information when reporting an error. !!
!! As well you might want to take a look at the full error log !!
!! in /root/fogproject/bin/error_logs/fog_error_1.5.9.log !!
!!!Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
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.
mysql: [Warning] Using a password on the command line interface can be insecure.
Failed to stop php7.1-fpm.service: Unit php7.1-fpm.service not loaded.
root@fog2:/root/fogproject/bin#I have just reposted this as i was replying to myself last time, which probably wont register on your notification?
-
@trev-lchs This is an interesting one. Lets try at the first question answering No to that. The error in the install log was saying that php-fpm could not be stopped, that is possible that the installer removed it. Lets try No there and see if it will run through to the end.
-
@george1421 OK will do.
-
@george1421 HI George, yep that got me pasted that issue, still wanted to create a new password for Fogstorage because it had a blank password. It stated that this is common on versions prior to 1.5.8, but it liked the one it created and carried on with the install.
-
@trev-lchs What changed between 1.5.4 and 1.5.8 is that FOG switched from use a blank mysql
root
password to requiring the fog installer to set a password for the mysqlroot
user because of security concerns. So when you transition from a version earlier than 1.5.8 it asks you to give the mysql root user a password, then it creates a new user ID and grants that user ID full access to the sql server database only. From then on the fog installer uses the fogstorage admin account for db access as well as upgrades leaving the root user and new secure password alone.You can see the password set for fogstorage in the fog configuration -> fog settings page under STORAGENODE MYSQLUSER I’m going to recommend that you don’t change this password, leave it to the fog installer to do so. This password should match the password set in the .fogsettings file.
If one wanted to update this password. I would start by updating the password in the fog ui (understand this should break FOG right after saving the value), next using the mysql commands to update the fogstorage password in mysql. Then test to make sure you can log into the mysql cli using the new fogstorage password. Then update the .fogsettings file and then finally reboot. If the web ui fails then run the fog installer once more and reboot. If it still fails then we will need to manually update the web ui config file with the proper password. Understand while its possible to update the fogstorage account, there are also some risks in doing so.
-
@george1421 Thanks George, i will leave well alone, I am a great believer in “if it isn’t broke don’t fix it”. Thanks for all your help with this.