lamp again (groan!) <Abandoned>

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

lamp again (groan!) <Abandoned>

Post by timbow » Tue May 29, 2018 5:38 pm

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?
Last edited by timbow on Tue Jun 05, 2018 6:17 am, edited 1 time in total.

deepakdeshp
Level 15
Level 15
Posts: 5838
Joined: Sun Aug 09, 2015 10:00 am

Re: lamp again (groan!)

Post by deepakdeshp » Wed May 30, 2018 2:57 pm

If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 19.2 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

Petermint
Level 5
Level 5
Posts: 676
Joined: Tue Feb 16, 2016 3:12 am

Re: lamp again (groan!)

Post by Petermint » Wed May 30, 2018 9:38 pm

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.

timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

Re: lamp again (groan!)

Post by timbow » Thu May 31, 2018 4:52 am

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.

timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

Re: lamp again (groan!)

Post by timbow » Thu May 31, 2018 7:54 pm

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

User avatar
phd21
Level 19
Level 19
Posts: 9298
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: lamp again (groan!)

Post by phd21 » Thu May 31, 2018 9:37 pm

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 ...
Phd21: Mint KDE 18.3 & 19, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

Re: lamp again (groan!)

Post by timbow » Fri Jun 01, 2018 6:07 am

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 WharfRat on Mon Jun 11, 2018 3:26 pm, edited 1 time in total.
Reason: Added code tag

timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

Re: lamp again (groan!)

Post by timbow » Fri Jun 01, 2018 8:36 am

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/

timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

Re: lamp again (groan!)

Post by timbow » Mon Jun 04, 2018 5:55 am

I need to chmod var/www/html/testsite/data to 755.
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 $ 
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?

timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

Re: lamp again (groan!)

Post by timbow » Mon Jun 04, 2018 6:21 am

I got it - it's chmod -R not chmod -r and when you get no response at all that means success?

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 $ 
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

Petermint
Level 5
Level 5
Posts: 676
Joined: Tue Feb 16, 2016 3:12 am

Re: lamp again (groan!)

Post by Petermint » Mon Jun 04, 2018 6:14 pm

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.

timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

Re: lamp again (groan!)

Post by timbow » Tue Jun 05, 2018 5:53 am

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.

Cafinux
Level 1
Level 1
Posts: 3
Joined: Mon Jun 11, 2018 2:36 pm

Re: lamp again (groan!) <Abandoned>

Post by Cafinux » Mon Jun 11, 2018 2:58 pm

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.

Post Reply

Return to “Software & Applications”