Join the community today
Register Now

From oblivion to zen - moving from old server to new one

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Sunka, Nov 1, 2015.

  1. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:57 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    i'd put non-root user


    If you want to preview newdomain.com on new centminmod server without updating DNS, on Windows PC edit your windows HOSTS file at c:\Windows\System32\Drivers\etc\hosts (see guide at Modify your hosts file | Knowledge Center | Rackspace Hosting or install Hostman app HostsMan - abelhadigital.com which can manage the file too and allows easy dns flushing when you make changes to the hosts file.

    c:\Windows\System32\Drivers\etc\hosts contents to preview without DNS update
    Code:
    centminmodserver-ip-address newdomain.com
    to disable preview comment it out and flush dns for your system
    Code:
    #centminmodserver-ip-address newdomain.com
    Hostsman app to flush dns and edit the c:\Windows\System32\Drivers\etc\hosts file
     
  2. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    12:57 PM
    Mainline
    10.2
    Just don't use root user.
    Create a user specific for your database.
     
  3. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    6:57 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    I need to change my hostname, cause I choosed stupid one. My forum is installed and working good.
    Is this all steps and in right order?
    Current hostname is "hostname"
    uname -n show:
    Code:
    hostname.pijanitvor.com
    I need to change that hostname to tvor-ocean

    Steps:
    command
    Code:
    hostnamectl set-hostname tvor-ocean.pijanitvor.com
    then edit /etc/hosts to be like that
    Code:
    127.0.0.1 localhost.localdomain localhost
    127.0.0.1 localhost4.localdomain4 localhost4
    46.101.130.248 tvor-ocean.pijanitvor.com hostname
    then restart network service
    Code:
    service network restart
    And last step after restarting network service is editing server's default hostname's Nginx vhost configuration file, and change old server_name hostname.pijanitvor.com to new one tvor-ocean.pijanitvor.com.

    Should it be from this:
    Code:
    server {
    #         listen   80;
                listen   80 default_server backlog=2048 reuseport;
                server_name hostname.pijanitvor.com;
                root   html;
    to this:
    Code:
    server {
    #         listen   80;
                listen   80 default_server backlog=2048 reuseport;
                server_name tvor-ocean.pijanitvor.com;
                root   html;
    Anything else before this steps or after this steps I should do?
    Stop some services before do that? Restart nginx or something else?
    Close forum?
     
  4. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:57 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    that's the exact correct steps for CentOS 7.. :D

    no need to close forums as hostname is separate from your forum domain name
     
  5. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    6:57 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    @eva2000 - done it hour ago, thanks for donate button ;)
     
  6. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:57 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    thanks for the donation :D
     
  7. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    12:57 PM
    Mainline
    10.2
    You know Tagalog? :D
    By the way did you succeed on ftp mount?
     
  8. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    6:57 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Google knows (y)

    Nop, I ended up with this:
     
  9. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    12:57 PM
    Mainline
    10.2
    How to establish pure ftp remote server to remote server?
     
  10. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    6:57 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    With FlashFXP 5.
    But it is limited with your connection speed upload/download