WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Apache2 and persistence  (Read 6583 times)

Offline littleknowledge

  • Newbie
  • *
  • Posts: 11
Apache2 and persistence
« on: August 30, 2012, 04:05:25 PM »
Good day, I have frugally installed tiny core linux on a hard drive using boot options tce=sda1 home=sda1 opt=sda1  which works, changes I make to the bootlocal.sh file are persistent documents in my home directory are persistent.
The issue I am having comes when I edit the apache2 conf file it resets itself at reboot also when i place things in the /usr/local/apache2/htdocs folder they get deleted at reboot.

What am I doing wrong?

thanks for your time

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Re: Apache2 and persistence
« Reply #1 on: August 30, 2012, 04:10:00 PM »
Just as a quick clarification, you have added:
Code: [Select]
usr/local/apache2/htdocs/
usr/local/apache2/conf/httpd.conf
to your
Code: [Select]
/opt/.filetool.lst
?

Offline littleknowledge

  • Newbie
  • *
  • Posts: 11
Re: Apache2 and persistence
« Reply #2 on: August 30, 2012, 04:18:52 PM »
umm.... no i have not added those files into the .filetool.lst...  i thought when you do a hard disk install things were persistent by default....  One more thing to add, i have the 'norestore' option also as a boot option.

I was going to copy a httpd.conf file from /home/tc to /usr/local/apache2/conf at boot but i was sure there was a more practical way of doing it.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: Apache2 and persistence
« Reply #3 on: August 30, 2012, 04:28:37 PM »
Hi littleknowledge
To expand on what KHarvey said, you also need to remove all references to  home  and  opt  from  /opt/.filetool.lst.
Add any files you modify to  /opt/.filetool.lst , full pathname, no leading slash. You may also want to spend some
time reading:
http://wiki.tinycorelinux.net/wiki:persistence_for_dummies


Offline littleknowledge

  • Newbie
  • *
  • Posts: 11
Re: Apache2 and persistence
« Reply #4 on: August 30, 2012, 04:48:41 PM »
Thanks for your help Kharvey and Rich, I have read persistence for dummies several times, but i still cant seem to get my head around this 'philosophy' of linux.

Going through the notes on executive summary: To make everything persistent, use the Set button in Appbrowser to set a location for /tce. If using the built-in installer, this is taken care of.

I am installing via the console using the 'ab' command and (i)nstall, is this equivalent to the 'set' button?

If adding the conf files to the .filetool.lst is the only way to do it, i will use that method, but if there is another method more old school where you just alter the .conf files or add files anywhere under the root directory and you expect it to stay there after reboot i would prefer to use that method.

Thanks again for all your help.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Apache2 and persistence
« Reply #5 on: August 30, 2012, 05:00:39 PM »
If you want a persistent /, you chose the wrong system.
This is not a Mom and Pop Linux distro. It is a toolkit for small and embeded systems.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: Apache2 and persistence
« Reply #6 on: August 30, 2012, 05:11:47 PM »
Hi littleknowledge
Quote
but i still cant seem to get my head around this 'philosophy' of linux.
It's not the Linux philosophy you are having trouble with, it's the Tinycore philosophy you don't understand.
With your current boot options, your  tce  directory is already set, and your  home  and  opt  directories are
persistent. The rest of the file system gets rebuilt from scratch every time you reboot. The only other items
that require persistence are config files that you change, and that is done using  /opt/.filetool.lst. While
there are other ways of saving and restoring files, I recommend you use this method until you have a
better understanding of the operating system.


Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Apache2 and persistence
« Reply #7 on: August 30, 2012, 07:07:03 PM »
It appears you have totally ignored the whole content of this reply
http://forum.tinycorelinux.net/index.php/topic,13762.msg77172.html#msg77175
which was given 24 days back from now to another thread you started...

"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline littleknowledge

  • Newbie
  • *
  • Posts: 11
Re: Apache2 and persistence
« Reply #8 on: September 05, 2012, 12:36:27 PM »
Thanks again Rich, Your explanation has been most helpful!

and just to clarify to tinypoodle, i did not ignore the reply given on the other thread, as I mentioned I had read the wiki several times and I was able to get a persistent install. But, things like the htdocs folder and mysql databases were not persistent after a reboot, which made no sense to me because this would mean if ever i had an improper shutdown nothing would be have gotten saved.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: Apache2 and persistence
« Reply #9 on: September 05, 2012, 02:11:14 PM »
Hi littleknowledge
Quote
One more thing to add, i have the 'norestore' option also as a boot option.
That option tells the system "Don't restore the files I backed up". Remove that boot option and the files you
backed up will be restored the next time you boot.