lamp again (groan!) <Abandoned>
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
lamp again (groan!) <Abandoned>
I need to do some fairly undemanding web development. I need a local lamp setup to install the CMS and various plugins.
This isn't the first time I have done this (about the 6th) and it is always a problem. I a not very comfortable with using my main mint OS as the basis for the lamp server because I worry about messing it up or opening up security breaches when I carelessly chmod about the place. xampp always creates a right muddle of php errors around folder permissions when I use a CMS and despite years of self taught trial and error I still am not competent to sort them out. I had some success with vagrant and virtualbox which worked well for a year or two but unnaccountably conked out and I think repeated attempts at reinstalling broke my whole OS 6 months ago making it unbootable.
Luckily I have always been a keen maker of backups and a failed hard drive last month means that I have a new clean install of mint 18.3 on a new HDD and I need to take the lamp bull by the horns and make it do what I need. I am reading that docker might be the preferred option in 2018. does anyone have any experience or opinions? Are there any really good, recent guides to doing this job?
This isn't the first time I have done this (about the 6th) and it is always a problem. I a not very comfortable with using my main mint OS as the basis for the lamp server because I worry about messing it up or opening up security breaches when I carelessly chmod about the place. xampp always creates a right muddle of php errors around folder permissions when I use a CMS and despite years of self taught trial and error I still am not competent to sort them out. I had some success with vagrant and virtualbox which worked well for a year or two but unnaccountably conked out and I think repeated attempts at reinstalling broke my whole OS 6 months ago making it unbootable.
Luckily I have always been a keen maker of backups and a failed hard drive last month means that I have a new clean install of mint 18.3 on a new HDD and I need to take the lamp bull by the horns and make it do what I need. I am reading that docker might be the preferred option in 2018. does anyone have any experience or opinions? Are there any really good, recent guides to doing this job?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 20
- Posts: 12341
- Joined: Sun Aug 09, 2015 10:00 am
Re: lamp again (groan!)
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak
Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
Regards,
Deepak
Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
Re: lamp again (groan!)
Are your test Web sites visible on a network or the Internet? If not, you can install a basic configuration without a security risk.
Your exposure increases when you use things like Composer and loading of Javascript from other domains. You have to connect to the Internet. The software could connect anywhere and download unknown versions of anything. Javascript downloads can be spyware, trackware, and every other form of junkware. For my dev work, I usually download a known file from a known source, switch off the network connection, then install.
Running without Wifi is a way to save battery power when sitting on the beach with my feet in the water. As a side effect, the lack of a network connection highlights all the fake "light" frameworks that claim to be small but are really just loaders for Symfony.
You can also leave all the application files outside the system directories. Set up Apache or Nginx to run the Web sites with your user id and place all the code in your home directory. That removes permission problems. The code cannot access your system files.
Your exposure increases when you use things like Composer and loading of Javascript from other domains. You have to connect to the Internet. The software could connect anywhere and download unknown versions of anything. Javascript downloads can be spyware, trackware, and every other form of junkware. For my dev work, I usually download a known file from a known source, switch off the network connection, then install.
Running without Wifi is a way to save battery power when sitting on the beach with my feet in the water. As a side effect, the lack of a network connection highlights all the fake "light" frameworks that claim to be small but are really just loaders for Symfony.
You can also leave all the application files outside the system directories. Set up Apache or Nginx to run the Web sites with your user id and place all the code in your home directory. That removes permission problems. The code cannot access your system files.
Re: lamp again (groan!)
Okay, I will take the advice from you both and this time install the apache server directly onto mint. I'll just make a quick system backup first... and report back later.
I don't think I really understand the difference between the Home folder and any other folder. I'll do some reading while the backup is underway.
I don't think I really understand the difference between the Home folder and any other folder. I'll do some reading while the backup is underway.
Re: lamp again (groan!)
deepakdeshp that link is badly out of date. So far I have apache and php installed but I am unable to test the php. I can't save the phpinfo file in var/www/html.
We will go on
We will go on
Re: lamp again (groan!)
Hi timbow,
I just read your post and the good replies to it. Here are my thoughts on this as well.
It would help to know more about your system setup. If you run "inxi -Fxzd" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.
Apache, PHP on 18.1 - Linux Mint Forums
viewtopic.php?f=47&t=239187&hilit=lamp
Hope this helps ...
I just read your post and the good replies to it. Here are my thoughts on this as well.
It would help to know more about your system setup. If you run "inxi -Fxzd" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.
Apache, PHP on 18.1 - Linux Mint Forums
viewtopic.php?f=47&t=239187&hilit=lamp
Hope this helps ...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
Re: lamp again (groan!)
thanks phd21 I have to be elsewhere today but will be picking this up again soon in the mean time you asked for this:
Code: Select all
System: Host: timbo-HP-Pro-3135-Microtower-PC Kernel: 4.13.0-43-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3)
Distro: Linux Mint 18.3 Sylvia
Machine: System: Hewlett-Packard product: HP Pro 3135 Microtower PC
Mobo: FOXCONN model: 2AB1h v: 1.00
Bios: American Megatrends v: 6.08 date: 06/29/2011
CPU: Triple core AMD Athlon II X3 445 (-MCP-) cache: 1536 KB
flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 18553
clock speeds: max: 3100 MHz 1: 800 MHz 2: 1900 MHz 3: 800 MHz
Graphics: Card: Advanced Micro Devices [AMD/ATI] RS880 [Radeon HD 4200]
bus-ID: 01:05.0
Display Server: X.Org 1.18.4 drivers: ati,radeon (unloaded: fbdev,vesa)
Resolution: 1920x1080@60.00hz
GLX Renderer: AMD RS880 (DRM 2.50.0 / 4.13.0-43-generic, LLVM 5.0.0)
GLX Version: 3.0 Mesa 17.2.8 Direct Rendering: Yes
Audio: Card-1 Advanced Micro Devices [AMD/ATI] RS880 HDMI Audio [Radeon HD 4200 Series]
driver: snd_hda_intel bus-ID: 01:05.1
Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA)
driver: snd_hda_intel bus-ID: 00:14.2
Sound: Advanced Linux Sound Architecture v: k4.13.0-43-generic
Network: Card: Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
driver: r8169 v: 2.3LK-NAPI port: e800 bus-ID: 02:00.0
IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives: HDD Total Size: 1000.2GB (19.8% used)
ID-1: /dev/sda model: TOSHIBA_DT01ACA0 size: 500.1GB
ID-2: /dev/sdb model: Name n/a size: 500.1GB
Optical-1: /dev/sr0 model: TSST DVD-ROM TS-H353A
rev: BA08 dev-links: cdrom,dvd
Features: speed: 48x multisession: yes
audio: yes dvd: yes rw: none state: running
Optical-2: /dev/sr1 model: hp DVD-RAM GH60L
rev: RD05 dev-links: cdrw,dvdrw
Features: speed: 40x multisession: yes
audio: yes dvd: yes rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition: ID-1: / size: 453G used: 38G (9%) fs: ext4 dev: /dev/sda1
ID-2: swap-1 size: 6.17GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 41.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 193 Uptime: 23 min Memory: 1361.7/5709.1MB
Init: systemd runlevel: 5 Gcc sys: 5.4.0
Client: Shell (bash 4.3.481) inxi: 2.2.35
Last edited by Anonymous on Mon Jun 11, 2018 3:26 pm, edited 1 time in total.
Reason: Added code tag
Reason: Added code tag
Re: lamp again (groan!)
So far then
- i have apache2 successfully installed
- PHP7 also success and tested with phpinfo
- mysql - I just don't know if the install worked or not. For the moment I don't need it, I am using a flat file CMS, no database required
- php myadmin, same eg I did the things in the terminal but I can't see it anywhere or start it up
- I am short of php modules I need for the CMS I am using. I will google how to install them. The only essential module (simplexml) is shown when I do php -m but not listed on the phpinfo() page except to credit the authors.
- The first try at installing the CMS failed with this result in the browser create_pagesxml: Unable to open /var/www/html/testsite/data/pages/
Re: lamp again (groan!)
I need to chmod var/www/html/testsite/data to 755.
don't seem to be able to do that:
And the method for changing permissions through Nemo is... not good. In any case I think I have to move my working www folder somehow into the Home folder otherwise nothing is going to work. How do I do that?
I can see this is going to be really painful to do everything through the terminal
currently still doing some web work on a windows laptop but I ought to be able to do it under mint on my main desktop PC, oughtn't I?
don't seem to be able to do that:
Code: Select all
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $ /var/www/html/testsite $ sudo chmod -r 755 data
bash: /var/www/html/testsite: Is a directory
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $ chmod -r 755 data
chmod: cannot access '755': No such file or directory
chmod: changing permissions of 'data': Operation not permitted
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $ chmod 755 -r data
chmod: cannot access '755': No such file or directory
chmod: changing permissions of 'data': Operation not permitted
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $ chmod -r 755 data/
chmod: cannot access '755': No such file or directory
chmod: changing permissions of 'data/': Operation not permitted
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $ sudo chmod -r 755 data/
chmod: cannot access '755': No such file or directory
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $
I can see this is going to be really painful to do everything through the terminal
currently still doing some web work on a windows laptop but I ought to be able to do it under mint on my main desktop PC, oughtn't I?
Re: lamp again (groan!)
I got it - it's chmod -R not chmod -r and when you get no response at all that means success?
eventually:which I think means 755 although it doesn't actually say so
But it makes no difference to the original error.
I think I might look at xampp again
eventually:
Code: Select all
timbo@timbo-HP-Pro-3135-Microtower-PC ~ $ cd/var/www/html/testsite
bash: cd/var/www/html/testsite: No such file or directory
timbo@timbo-HP-Pro-3135-Microtower-PC ~ $ cd /var/www/html/testsite
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $ ls -lg /data
ls: cannot access '/data': No such file or directory
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $ ls -lg /data/
ls: cannot access '/data/': No such file or directory
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $ sudo ls -lg /data[sudo] password for timbo:
ls: cannot access '/data': No such file or directory
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $ sudo ls -lg data/total 8
drwxr-xr-x 2 root 4096 May 27 16:43 thumbs
drwxr-xr-x 2 root 4096 May 27 16:43 uploads
timbo@timbo-HP-Pro-3135-Microtower-PC /var/www/html/testsite $
But it makes no difference to the original error.
I think I might look at xampp again
Re: lamp again (groan!)
Re PHP modules. Open Software Manager. Search for PHP7. I assume you are using PHP 7.0. If you need the GD module, you will see Php7.0-gd. Install. Restart Apache to reload PHP.
Re: lamp again (groan!)
thanks Petermint. I didn't know you could install the modules with Software Manager. I had done it with the terminal.
This morning I am trying to get wordpress running. I have phpmyadmin installed but I can't see it, access it or start it so I can't enter the database info into the Wordpress install page. I have wasted too much time with this - I had hoped to find a foolproof tutorial I could follow and just get it working. I am going to take another look at xampp or ampps. last time I tried ampps it didn't work out of the box so I moved on but maybe I should look again.
This morning I am trying to get wordpress running. I have phpmyadmin installed but I can't see it, access it or start it so I can't enter the database info into the Wordpress install page. I have wasted too much time with this - I had hoped to find a foolproof tutorial I could follow and just get it working. I am going to take another look at xampp or ampps. last time I tried ampps it didn't work out of the box so I moved on but maybe I should look again.
Re: lamp again (groan!) <Abandoned>
Just a 3 cents worth, have a look at this site https://freedombox.org. I used it to host a similar project while I was developing and debugging it, worked a treat.