change home domain

wijszman
Posts: 8
Joined: Mon Jan 17, 2011 8:43 am

Re: change home domain

Postby wijszman » Wed Jan 19, 2011 4:06 am

Thanks for the info, I'll try changing some stuff over the weekend. Will report back here with results ;)

wijszman
Posts: 8
Joined: Mon Jan 17, 2011 8:43 am

Re: change home domain

Postby wijszman » Fri Jan 21, 2011 7:28 am

I just finished changing the domain name, and it actually works :)

Here's what I did:

/etc/dhcp
dhcpd.conf
change domain entries to new domain (3 entries)

in Mysql (use phpmyadmin):
database hda_production , table settings
change domain to new domain

/etc/httpd/conf.d
change domain entries to new domain
You can do this automated, go to the conf.d directory, create this script, give it execute rights and run it. It wil create backup files automatically.

for fl in *.conf; do
mv $fl $fl.bak
sed 's/old_domain/new_domain/g' $fl.bak > $fl
done


Also change the domain in the following files

./openvpn/amahi-dup-cn.conf.off
./openvpn/amahi.conf
./samba/lmhosts
./samba/lmhosts
./samba/smb.conf

After this restart the server, reboot oher pc's too, so they get the fresh domain binding.
Possibly you'd have to refresh the DNS of your PC's for it to take effect, I had to wait a
couple of minutes before the amahi subdomains were working.

Mind you, I only have a few apps running (see earlier this thread). So your results may vary.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: change home domain

Postby bigfoot65 » Fri Jan 21, 2011 8:40 am

Would it be possible to add this to the wiki? It would be nice to have detailed documentation there.

There also needs to be a disclaimer that this could break the HDA if not done correctly. This is obviously not the optimal way to change things.

Might consider submitting a suggestion for this to be scripted for future Amahi release.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

wijszman
Posts: 8
Joined: Mon Jan 17, 2011 8:43 am

Re: change home domain

Postby wijszman » Fri Jan 21, 2011 8:50 am

I definetely consider this a homebrew solution. I think the Amahi development team can say more about this being the right way to do things.
Automating the steps won't be a problem, feel free to use my info for wiki/doc purposes.

User avatar
rgmhtt
Posts: 421
Joined: Sun Jan 11, 2009 9:26 am

Re: change home domain

Postby rgmhtt » Fri Jan 21, 2011 9:18 am

I will also have to work through some of this myself next week while home.
/etc/dhcp
dhcpd.conf
change domain entries to new domain (3 entries)
The dhcpd.conf is generated by hdactl from the database, you did not need to change this.
in Mysql (use phpmyadmin):
database hda_production , table settings
change domain to new domain
This is the main change.
/etc/httpd/conf.d
change domain entries to new domain
You can do this automated, go to the conf.d directory, create this script, give it execute rights and run it. It wil create backup files automatically.

Code: Select all

for fl in *.conf; do mv $fl $fl.bak sed 's/old_domain/new_domain/g' $fl.bak > $fl done
Thanks. Add the cd /etc/httpd/conf.d so it can be a supplied script.
Also change the domain in the following files

./openvpn/amahi-dup-cn.conf.off
./openvpn/amahi.conf
./samba/lmhosts
./samba/lmhosts
./samba/smb.conf
smb.conf is built by hdactl from the database. You listed lmhosts twice above, should it be something else?

You left off /etc/hosts and /etc/sysconfig/network; /etc/resolv.conf is built by hdactl.
After this restart the server, reboot oher pc's too, so they get the fresh domain binding.
Possibly you'd have to refresh the DNS of your PC's for it to take effect, I had to wait a
couple of minutes before the amahi subdomains were working.

Mind you, I only have a few apps running (see earlier this thread). So your results may vary.
Thanks!

wijszman
Posts: 8
Joined: Mon Jan 17, 2011 8:43 am

Re: change home domain

Postby wijszman » Fri Jan 21, 2011 10:28 am

The double SMB file is my typo.
Basically what I did is this:

Code: Select all

egrep 'myolddomain' ./* -R
in the /etc folder. That's how i got those files that needed to be changed.
If you run the above you'll get a whole load of apache logs too, so it's handy to first clear the /var/log/httpd directory before doing the egrep ;)

I didn't list hosts and network because in my case they don't contain the domain name, but it could be for others.

Who is online

Users browsing this forum: No registered users and 11 guests