host config file edit

Joined
Dec 18, 2011
Messages
5
Reaction score
0
Points
1
Hi all,
I hope somebody can help me with this issue.
I have 1 day Mac experience so please be gentle
I have a bought a second hand iBook G3 PowerPC dual boot OSX 10.4 and OS 9 I have been trying to set up a LAMP, Apache PHP MYsql on it with not to much success (I could see all with a phpinfo() page but I didnt managed to start mysql server) into 10.4 Tiger until I managed to not be able to startup at all.
Startup will end with a black screen and a localhost/root prompt.
Searching the internet i found out that is caused by the file /private/etc/hostconfig - missing or corrupted
I booted in 9 and using an application called Sherlock I found the files hostconfig~ and hostconfig.system-default (i think) at the specified location.
I dont know how to make hidden files visible and rename one to hostconfig with no other characters following. Also which one I should try first? the default one or the ~?
Thank you in advance for any advice

Julian
 
Joined
Jul 2, 2007
Messages
3,494
Reaction score
204
Points
63
Location
Going Galt...
Your Mac's Specs
MacBookAir5,2:10.13.6-iMac18,3:10.13.6-iPhone9,3:11.4.1
From the Terminal window, you can use the copy, remove and move commands to manipulate files.

Try:
cd /private/etc

Then:
cp -p hostconfig~ hostconfig~.original

Then:
cp -p hostconfig~ hostconfig

This will leave you a copy of the original file hostconfig~ called hostconfig~.original, and a copy of that file named just hostconfig. Since you apparently need a hostconfig file without the "~" this might just work (assuming the contents of hostconfig~ are usable).

If you find issues with the "new" hostconfig file, just remove it:

rm hostconfig

This will leave only the hostconfig~ and hostconfig~.original files.

You may be told you don't have permission to do any of this. If so, you can use the sudo command and your admin password to do these things:

Example:

MacGyver:etc username$ cp -p hostconfig hostconfig.original
cp: hostconfig.original: Permission denied
MacGyver:etc username$ sudo cp -p hostconfig hostconfig.original
Password:
MacGyver:etc username$ ls | grep hostconfig
hostconfig
hostconfig.original

If you want to be quick about the whole thing, just make a .original copy of hostsconfig~ and then move the original to the new name:

cp -p hostconfig~ hostconfig~.original

mv hostconfig~ hostconfig
 
OP
J
Joined
Dec 18, 2011
Messages
5
Reaction score
0
Points
1
Thank you

Hi
Following your instructions I was able to copy a renamed file and all went fine so now I can keep batling MySql with no fear......
I do appreciate the time you took for this reply.
Merry Christmas,
Julian
 
Joined
Jul 2, 2007
Messages
3,494
Reaction score
204
Points
63
Location
Going Galt...
Your Mac's Specs
MacBookAir5,2:10.13.6-iMac18,3:10.13.6-iPhone9,3:11.4.1
Merry Christmas Julian, and welcome to Mac-Forums. Drop by anytime!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top