Learn about Centmin Mod LEMP Stack today
Become a Member

From apache + mysql 5.6 to centminmod

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Domenico, Jul 14, 2018.

  1. Domenico

    Domenico New Member

    8
    4
    3
    Jul 14, 2018
    Ratings:
    +4
    Local Time:
    4:18 PM
    hi all!

    I am managing an invision power board forum on a dedicated server (centos 7 64bit)

    Actually i am using apache and mysql 5.6.

    I want to know if
    -an user guide for the migration exists
    -what do i have to do on my server (eg delete mysql, convert the db to a format that can be used in Maria db, reinstall invision powerboard )
    -know if centminmod is already optimizing mariadb and nginx

    Can you help me?
    Many thx!
     
  2. eva2000

    eva2000 Administrator Staff Member

    36,841
    8,064
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,422
    Local Time:
    1:18 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Ah i see you posted here instead.

    For configuration nginx wise check out @Jimmy thread at IP.Board - IPB v4.1.x Files for setup config.

    As to migration backing up your data files + databases via mysqldump to sql files and moving them to centmin mod server and creating nginx vhost via centmin.sh menu option 2 (Install - Quick Centmin Mod Install + Nginx Vhost Site + MySQL Database Setup) - and here's overview of config file structure for centmin mod Centmin Mod Configuration Files - CentminMod.com LEMP Nginx web stack for CentOS.

    So you move your data files from Apache web root to Centmin Mod Nginx web root at /home/nginx/domains/yourdomain.com/public, edit nginx vhost if https ssl vhost at /usr/local/nginx/conf/conf.d/yourdomain.com.ssl.conf with IPB nginx rules and then import sql database backup created via mysqldump into Centmin Mod MariaDB MySQL. Edit IPB config to point to your new MariaDB MySQL database name.

    I'd keep your apache/original server online for a few weeks even after centmin mod migration just in case you missed something the first migration attempt

    Only way to migrate is to use a new server with fresh CentOS 7.5 64bit OS, install Centmin Mod 123.09beta01 (best performance) and then migrate your data over. There is no inplace switch from existing server Apache/MySQL to Centmin Mod.
     
  3. eva2000

    eva2000 Administrator Staff Member

    36,841
    8,064
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,422
    Local Time:
    1:18 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    For moving site data there's 2 general guides where the principles & steps of backing up and moving data is the same just slightly different for
    1. Moving Centmin Mod site data to another Centmin Mod server
    2. Moving cPanel/WHM site data to Centmin Mod server
    Those guides move alot more than just the site(s) in question but config files etc. You can use your own best judgement as to the config files and whether you want to move them or just use the fresh server setup Centmin Mod config files as they get auto optimised for the server Centmin Mod initially installed on. These guides particularly the cPanel/WHM might give an better overview of where the data files and mysql databases go on Centmin Mod server.
     
  4. Domenico

    Domenico New Member

    8
    4
    3
    Jul 14, 2018
    Ratings:
    +4
    Local Time:
    4:18 PM
    Many thx!
    I’ll start to study.

    I will ask for your help again, probably
     
    Last edited: Jul 15, 2018
    • Like Like x 1
  5. Domenico

    Domenico New Member

    8
    4
    3
    Jul 14, 2018
    Ratings:
    +4
    Local Time:
    4:18 PM
    Move the thread, if it's not the right section!


    P.S. actually my webserver is based on webmin, so no WHM/cpanel
     
  6. eva2000

    eva2000 Administrator Staff Member

    36,841
    8,064
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,422
    Local Time:
    1:18 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Yes the link to whm/cpanel is just an example - the migration for any server is basically same - backup files + backup mysql databases to sql files and then move to centmin mod server and place them in the right locations which is still outlined in whm/cpanel linked guide
     
  7. Domenico

    Domenico New Member

    8
    4
    3
    Jul 14, 2018
    Ratings:
    +4
    Local Time:
    4:18 PM
    So basically, due to the fact that i have only one server i have to:

    - backup data from server to my backup space (e.g. home directory and so on)
    - dump the db and save the dump
    - reinstall the Centos distribution on my server

    then proceed with the new installation.

    What about my DB dump?
    i am using mySql 5.6. Should I update it before the dump? Or the 5.6 is the "best" version ?
     
  8. eva2000

    eva2000 Administrator Staff Member

    36,841
    8,064
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,422
    Local Time:
    1:18 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    mysqldump backup databases is universal should work fine for mysql 5.6 mysqldump and import to mariadb 10.x

    but yes need to reinstall CentOS but i wouldn't do it this way as you'd want to have reference to existing server during and after migration in case you missed moving some files or need to reference previous settings. Is this a dedicated server ? VPS ? Ideally you'd want to spin up a new server/vps for centmin mod install.

    You can do a test run migration first spin up hourly billed digitalocean, vultr or linode VPS install centmin mod and do test migration of data from existing server to new vps without updating DNS.. do a few reload of hourly billed VPS and several test migrations and jot down all the steps you made until you perfect the migration process.

    A few hours of hourly billed VPS only a few cent or a few days a couple of dollars. Then once you have a plan and steps perfected. Do live migration where you reinstall OS and reimport data. You can even use test hourly VPS installed Centmin Mod install to do a centmin mod to centmin mod migration then Upgrade - Nginx - Redis - Insight Guide - Centmin Mod Site Data Migration Guide

    So you have a fool proof method of migration with practice backed process :)

    Also would allow you to play with hourly billed test VPS with centmin mod without affecting live existing server first :) Even better is this will allow you to test both live existing site versus centmin mod powered test migrated data based site. Page speed and load testing etc and compare :)
     
  9. Domenico

    Domenico New Member

    8
    4
    3
    Jul 14, 2018
    Ratings:
    +4
    Local Time:
    4:18 PM
    edit
     
  10. Domenico

    Domenico New Member

    8
    4
    3
    Jul 14, 2018
    Ratings:
    +4
    Local Time:
    4:18 PM
    Wow. It sounds cool.

    FYI, i have a dedicated server.

    Let me recap (just to be sure, i am NOT (yet?) a real sysadmin:
    1.i will use a VPS (for a few days) with the same installation that i will have in my dedicated server.
    2.i will put everything in this VPS, so i will configure it since he will work as I want
    3.when everything is fine on this test server, i will
    - reinstall the OS in my dedicated server
    - perform a live migration

    Is it right?

    If yes:
    1.where can i "buy" this test vps?
    2.the vps has to have the same configuration (ram ecc.) of my dedicated server?
     
  11. eva2000

    eva2000 Administrator Staff Member

    36,841
    8,064
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,422
    Local Time:
    1:18 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    basically

    1. spin up hourly vps with enough disk space for your data with digitalocean, vultr or linode in same region location as existing dedicated server so faster transfers

    2. install centmin mod 123.09beta01 on this hourly vps

    3. backup data on existing dedicated server and move to hourly vps with centmin mod running and put in place data so your site is able to run on centmin mod vps but DO NOT update domain DNS so live site is unaffected

    4. now you can test nginx rules/configuration on centmin mod vps and preview domain via private hosts file dns edit outlined here to make sure site data restored on test centmin mod vps is working as it should be and data is intact

    5. now if you messed up on centmin mod test hourly VPS, easy just destroy that hourly VPS and try again - spin up another hourly VPS, install centmin mod and do steps 2 to 4 again until you perfect the progress and write down all your steps/cmds used

    6. once perfected, you can do the actual real migration by backing up data to test hourly vps and then reinstall dedicated server OS and install centmin mod and then transfer backups form test hourly vps to dedicated server with centmin mod installed and re-apply the steps/cmds you perfected from practice runs :)

    Then keep those steps/cmds and knowledge safe for future migrations :)

    That's how I usually do migrations, never live migration the first time - always 1-3 test migrations to ensure all is well :)
     
  12. Domenico

    Domenico New Member

    8
    4
    3
    Jul 14, 2018
    Ratings:
    +4
    Local Time:
    4:18 PM
    great!

    many thanks for the explanation.

    I will try asap!!
     
    • Like Like x 1
..