LAMP Server

Talking about SolydXK, another distribution or totally off-topic but within the Rules ? It's the right place!
Foggy
Posts: 12
Joined: 08 Apr 2014 02:46

LAMP Server

Postby Foggy » 06 Feb 2018 20:59

An odd one you may be able to help me with.

On my Acer laptop I have dual boot set up, with SolydK as my main platform, and solydx as the other option. I work in the "K" area all the time and can install a LAMP server no problems.

When I switch to "X" Apache2 refuses to install, either via terminal (sudo apt-get install apache2) or with synaptic.
Turning off the firewall makes no difference.

I switched to another laptop (HP) with a clean install of SolydK and the same problem appears.

Any suggestions on where the problem may lie?

Foggy
Posts: 12
Joined: 08 Apr 2014 02:46

Re: LAMP Server

Postby Foggy » 07 Feb 2018 04:11

Good news. I reinstalled solydk on the HP machine and the LAMP server installed without difficulty. I don't know what caused my problem, maybe my faulty technique.

User avatar
ilu
Posts: 2045
Joined: 09 Oct 2013 12:45

Re: LAMP Server

Postby ilu » 07 Feb 2018 15:40

If you want to run servers on SolydXK you have to make sure that the corresponding /tmp directories are physically present on your harddisk. Some of the older ISOs moved vast parts of /tmp into RAM which is convenient for desktop use and good for older SSDs but I've heard before that apache doesn't like it. Since SSDs got better I think the newest ISO doesn't do that anymore but I haven't checked.

User avatar
Arjen Balfoort
Site Admin
Posts: 8844
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: LAMP Server

Postby Arjen Balfoort » 07 Feb 2018 17:18

solydxk-system creates /var/log/apache2, /var/log/mysql and some other log directories on every boot if they do not exist.


SolydXK needs you!
Development | Testing | Translations

User avatar
petsam
Posts: 18
Joined: 16 Sep 2014 12:14
Location: Thessaloniki/Greece

Re: LAMP Server

Postby petsam » 05 Mar 2018 23:57

ilu wrote:Some of the older ISOs moved vast parts of /tmp into RAM which is convenient for desktop use and good for older SSDs but I've heard before that apache doesn't like it. Since SSDs got better I think the newest ISO doesn't do that anymore but I haven't checked.
This is my fstab part on tmp on a fresh installation on an SSD

Code: Select all

# RAM disks
tmpfs   /tmp                    tmpfs   defaults,noatime,mode=1777              0       0
#tmpfs   /var/cache/apt/archives tmpfs   defaults,noexec,nosuid,nodev,mode=0755  0       0
tmpfs   /var/tmp                tmpfs   defaults,noatime                        0       0
tmpfs   /var/backups            tmpfs   defaults,noatime                        0       0
# Disable /var/log/* tmpfs dirs when enabling tmpfs on /var/log
#tmpfs   /var/log                tmpfs   defaults,noatime                        0       0
#tmpfs   /var/log/apt            tmpfs   defaults,noatime                        0       0
#tmpfs   /var/log/lightdm        tmpfs   defaults,noatime                        0       0
#tmpfs   /var/log/samba          tmpfs   defaults,noatime                        0       0
tmpfs   /var/log/cups           tmpfs   defaults,noatime                        0       0
tmpfs   /var/log/ConsoleKit     tmpfs   defaults,noatime                        0       0
tmpfs   /var/log/clamav         tmpfs   defaults,noatime                        0       0
Though, I have setup apache, mysql and they work fine (until now?)
What is the reasoning of this and the different entries?

User avatar
ilu
Posts: 2045
Joined: 09 Oct 2013 12:45

Re: LAMP Server

Postby ilu » 06 Mar 2018 13:16

No, that 's ok. I have to correct my previous post, the problem was not with "/tmp" but with "/var/log".

As you can see from the commented lines it used to be different, the whole /var/log directory was set to tmpfs to improve speed and reduce SSD wear. That was generally fine but some software (among them apache) doesn't like having its log files on tmpfs (and thus removed with reboot).

User avatar
petsam
Posts: 18
Joined: 16 Sep 2014 12:14
Location: Thessaloniki/Greece

Re: LAMP Server

Postby petsam » 06 Mar 2018 13:55

ilu wrote: it used to be different, the whole /var/log directory was set to tmpfs to improve speed and reduce SSD wear. That was generally fine but some software (among them apache) doesn't like having its log files on tmpfs (and thus removed with reboot).
I think this is/was a bad practice. Logs are essential to troubleshoot problems, so why loose them on reboot?
Of course there might have been a reason for that, but the benefits are questionable.
I would prefer to have a way to check if the logs are getting too much space than not have them at all. IMHO at least.

kurotsugi
Posts: 2103
Joined: 09 Jan 2014 00:17

Re: LAMP Server

Postby kurotsugi » 06 Mar 2018 18:20

Some of the older ISOs moved vast parts of /tmp into RAM which is convenient for desktop use and good for older SSDs but I've heard before that apache doesn't like it. Since SSDs got better I think the newest ISO doesn't do that anymore but I haven't checked.
AFAIK solydxk still doing that (i.e moving some logs to tmpfs if it detect SSD). CMIIW. the problem with some softwares is that it will gives complain when the directory gone. as a solution, as schoelje explained above, solydxk-system will create all the necessary folders at boot so that these software could work properly.
I think this is/was a bad practice. Logs are essential to troubleshoot problems, so why loose them on reboot?
Of course there might have been a reason for that, but the benefits are questionable.
I would prefer to have a way to check if the logs are getting too much space than not have them at all. IMHO at least.
the benefit is clear. it will prolonged the life of your SSD. as for the logs, solydxk is mainly targeted for desktop user so the logs isn't really important. someone who could read those logs should be able to change fstab entry as he wish anyway. the decision to move the logs to tmpfs is actually comes from soldyxk user's suggestion.

User avatar
petsam
Posts: 18
Joined: 16 Sep 2014 12:14
Location: Thessaloniki/Greece

Re: LAMP Server

Postby petsam » 08 Mar 2018 01:09

kurotsugi wrote:
solydxk is mainly targeted for desktop user so the logs isn't really important.
I suspected that was the reason. It is clear for me now, thanks a lot.


Return to “Open Chat / General Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests