Editing
NetHere
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Migrating to LAMP Host Servers = Below are outlines of the steps to migrate website & email hosting from nethere to lamphost configured servers. This is almost certainly incomplete at this stage. The exact steps to follow can vary depending on specifics of the client, so use this as a guide only. Be ready to adjust commands or add steps as needed. == Edit Nethere DNS == ssh user@admin-1.nethere.net sudo -i ssh ns1.nethere.net cd /named/master co -l example.com vi example.com ci -u example.com rndc reload example.com Make sure to increment serial number by 1 each time a change is made. == Migrate Website to nh5.jcihosting.net == Set TTL to 300 on ns1.nethere.net Open up these web admins to get current account/site info: http://toolbox.nethere.net/ -> Provisioning Tool (search for domain name) https://secure.johncompanies.com/mgmt/index.html (search for col#####) 1. Create the lamphost user. https://www.lamphost.com/admin/user/user/create username: col##### email: same as listed for col##### account password: random, secure, won't be shared with client defaults on rest of page 2. Create the customer account https://nh5.jcihosting.net:8443/ LAMP Host Users -> Add User -> col##### Virtual Hosts -> Add Virtual Host Username: Select same username as above from pulldown Domain: example.com Hosting Plan: select plan that matches what's listed in https://secure.johncompanies.com/mgmt/view.html?cid=col##### Add default DNS: No 3. Virtual Hosts -> Site Manager (next to domain added) Site Manager Users -> Add User Username: can be anything - I typically use Optigold Login from nethere admin Password: make up something secure and record - this one will go to the user 4. Email & FTP -> Add Account Email Account: ftp Password: make up something secure and record - this one will go to the user Enable FTP Access: Yes 5. Optional: Add MySQL database if site needs it (WordPress etc) ssh to nh5.jcihosting.net and run 'add_mysql.php <example.com>' MySQL database info will be emailed to webmaster@lamphost.com (and output on command line - ignore instructions to run additional commands) https://mail.lamphost.com Sm77DdnQ 6. Copy over website Login via ssh nh5 ssh YOURLOGIN@nat.johncompanies.com ssh root@nh5.jcihosting.net cd /var/www/example.com/ rsync -v --archive --one-file-system --delete --delete-during --rsh=/usr/bin/ssh dsmith@unixweb-10.nethere.net:/www/www.example.com/htdocs ./ Change 'matt' to your username. Note that I had to add my username to groups httpd & webuser to allow me to copy website files without being root. chown -R col#####:col##### htdocs 7. If site has MySQL data find the connection info. For example, WP sites will have the info in htdocs/wp-config.php mysqldump -h mysqldb-1.webhost.nethere.net -u username --password=password databasename > databse.sql mysql exampledotcom < database.sql rm database.sql 8. If site is ready to be made live on nh5.lamphost.net then update DNS on ns1.nethere.com Send email to client with details. Search support@jcihosting.com Sent folder for emails with Subject "updated hosting for" for example emails. You will have to adjust as needed (username/passwords, different info based on specific client). 9. After you finish, update the johncompanies.com backend for the col0# CID and change the nethere hosting server to nh3.jcihosting.net. 10. To add a SSL certificate letsencrypt-create.php <domain.com> To remove a SSL certificate del-letsencrypt-certificate.php <domain.com> == Migrate Email to nh5.jcihosting.net == If migrating website & emails both follow the above steps to transfer the website first. If migrating emails only the follow the first steps 1-3 of the above steps to set up the virtualhost on nh3. 1. Set TTL for MX record to 300. 2. Generate email report: Log in to http://toolbox.nethere.net/ Select Provisioning Tool and search for the domain Navigate to the Email section and then Generate Report. Select these fields for the report: Mail address Alias Forwarding address Mail storage path Copy the result of the report and save it as a text file in /tmp/ on nh5.jcihosting.net named example.com.txt (replace domain name) 3. Create the e-mail accounts Make sure the virtualhost has enough email accounts allocated before proceeding. Edit the virtualhosts.virtualhost_settings table directly if need be to increase allocation. Log in here: https://nh5.jcihosting.net:8443/ Select "MySQL.LH" Go to the "virtualhosts" database Search the "virtualhost_settings" settings for 'example.com' and adjust the 'email_accounts' setting. Run this script once and only once: <pre> /usr/local/bin/migrate_mail_accounts_from_nethere.php example.com </pre> That will create all email accounts and aliases. A file containing the list of email accounts and their new passwords will be created as /tmp/example.com-passwords.txt. Grab a copy of that for sending to the client. 4. Sync the emails Another file will be created that contains the bash commands to sync emails from the old server. This will be named /tmp/example.com-sync.sh Copy the file somewhere like the /root/ home dir and add "#!/bin/bash" as the first line and change perms to 750. Now you can run this script to sync all mails from nethere to nh3. Run it immediately to get an initial sync of emails. When ready to switch email hosting over run the sync script one more time, then update DNS on nh3.nethere.net. If you'd like to sync again after the move (if there was a delay or you think there may have been incoming emails during the transtion) remove the '--del' option from the sync script and then re-run. 5. Send email to customer Search support@jcihosting.com Sent folder for messages with Subject "new email hosting for" for examples of emails to use for communicating with the client. 6. Update DNS and put NetHere mail on hold Once DNS has been pointed to the new server, go into the NetHere Toolbox http://toolbox.nethere.net/ and go to Domain -> General and then set Status to 'On Hold'. 7. Update host in JohnCompanies database. == Moving between Host Servers on Lamphost == You should delete the old virtual host before creating the new virtual host. It may take up to an hour to delete the old virtual host. To speed up the delete: <pre> /opt/lamphost/cron-bin/del_virtualhosts.php </pre> If you create the new virtual host before, you will need to update the mylampsite.com: <pre> /opt/lamphost/bin/update_mylampsite_subdomain.php databaseproviders.com </pre> == Upgrade a Lamphost server to increase database limit == I've increased the database limit for this customer to 2. Now they can add a second db via the Site Manager admin. <pre> Here is how I made the adjustment (we don't have a friendly admin for this function): Log in to Server Manager: https://nh3.jcihosting.net:8443/ Select the "MySQL.LH" phpMyAdmin Select 'virtualhosts' db. Adjust the 'databases' setting for the argee.com domain in the 'virtualhost_settings' table. </pre> == looking in the mail log files == exigrep
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information