Moving from ubuntu to centos 6.3
I’m currently using Ubuntu and having issues when it tries to update to 12 so am looking to move to centos as I prefer it. It there a walkthrough about moving a the databases and such like.
[quote=“Mark Playford, post: 10120, member: 498”]
Change “TFTP_FTP_PASSWORD” and “TFTP_FTP_PASSWORD” to be the same as the fog user
Mark, that is the same variable… I believe what you meant was:
Change “TFTP_FTP_PASSWORD” and “STORAGE_FTP_PASSWORD” to be the same as the fog user
can you not build a new install with 0.25 import old database and then upgrade that to 0.32?
Well current install running on old Fedora 10 and I dont have balls for messing with that old thing. In case that something went wrong I will end up without any imaging solution… no way
Can you upgrade your current install to upgrade the database then move it? Don’t forget to backup the database first.
ye thats the point… it should but that didnt happen… viz message…
install fog first then import the database, this should overwrite the database.
its possible to import sql from fog version 0.25(fedora) to 0.32(centos)? I did that and fog installation wizard force me to upgrade my sql db and when I do it I get message “
Database error: (ID# 0-0)
Can’t create database ‘fog’; database exists
Install Centos 6.3, whichever style you like.
When I installed CentOS, I removed the default partitions and used 1 large partition so I could have the image files on the same disk as well
I’ve taken some bits from here, many thanks to Kirk, but there are a couple of errors that I have changed below:
Once installed run the updates by using:
[FONT=Courier New]yum -y update && reboot[/FONT]
If you are using the minimal you will need to get wget by typing:
yum -y install wget
Not sure if you need it but I installed yum-priorities
[FONT=Courier New]$ yum install yum-priorities[/FONT]
You now need RPM Forge depending on you version:
[FONT=Courier New]$ wget [url]http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm[/url][/FONT]
[FONT=Courier New]$ wget [url]http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm[/url][/FONT]
Then import the Dag Key:
rpm --import [url]http://apt.sw.be/RPM-GPG-KEY.dag.txt[/url]
[FONT=Calibri]Then install the repo:[/FONT]
rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
Then to install the EPEL repo:
$ su -c 'rpm -ivh [url]http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm[/url] '
$ rpm --import [url]https://fedoraproject.org/static/217521F6.txt[/url]
We now have access to the required packages for FOG via the RPMforge and EPEL repositories. We will now want to disable SELinux and the firewall. If you are running this server in production I would highly recommend that after having tested your FOG deployment you take the proper measures to secure the box before running it in a production environment.
$ vi /etc/sysconfig/selinux
change the line that reads SELINUX=enforcing or SELINUX=enforcing permissive to SELINUX=disabled and reboot one final time.
$ reboot now
When restarted disable the firewall. I can disable the firewall as I have a hardware firewall in place.
$ service iptables save
$ service iptables stop
$ chkconfig iptables off
Nearly ready to install fog:
$ wget [url]http://downloads.sourceforge.net/project/freeghost/FOG/fog_0.32/fog_0.32.tar.gz[/url]
$ tar -xzf fog_.tar.gz
$ cd fog_
$ vi lib/redhat/config.sh
Edit line 22 and remove ‘php-gettext’ then change ‘clamav-update’ to ‘clamav’
Edit line 63 to read: “freshDB=/var/clamav/”;
Edit line 66 to read: “freshcron=/usr/bin/freshclam”
Then install Fog
$ cd bin
Follow steps on screen to complete install then browse to URL displayed in terminal to run database schema install and click on ‘Install/Upgrade Now’
Next change the password for the fog CentOS user by typing in Terminal:
$ passwd fog
And set your password, I left it as standard. Then edit:
Change “TFTP_FTP_PASSWORD” and “TFTP_FTP_PASSWORD” to be the same as the fog user, then log on to the website and click the i icon and then fog settings and go down to the TFTP Server section and change the password to the same as before. Then click on Storage Management, All Storage Nodes then the default member and change the password there.
I think that is all I did but try and if not reply to this thread and I can help you through it.
There is talk of needing PHP53 for the install but I already had it installed.
Hope this helps
We have Fog 0.30 running on Centos but would like to move to a newer release so I’m anxious to see your work. Thanks for taking a bullet for us.
I’ve finally got fog working on CentOS 6.3 and Fog 0.32.
I got it working using about 5 websites, so I’m going collate all the information together and repost it hopefully tomorrow.
[quote=“Mark Playford, post: 9495, member: 498”]Thanks for that. That is a great help. I’ll update on the results[/quote]
how did it go??
Aside from 12 problems, is CentOS better for any other reason? I’m considering the move, too. Thx
Thanks for that. That is a great help. I’ll update on the results
If you have plug-ins, it’s more difficult. If you just have hosts and images defined and image files stored, it’s not that difficult, if you can follow instructions easily.
You basically need to backup the SQL server database and the /images directory. Use mysqldump to export the “fog” database to a file. Copy the file and the /images folder to a backup device.
Install new OS, update, install FOG. MAKE SURE FOG WORKS at this point. If you don’t make sure FOG works at this point, you’re compounding your issues when troubleshooting.
If FOG worked, then import the sql file to overwrite the empty FOG database with the data you exported earlier. Copy the /images files from the backup device into the /images folder on the new OS.
Close FOG web UI and reopen. See if it works.