skip to Main Content

Linux newbie here and just installed Linux Mint version 20.
To install Apache, PHP, and MySQl on the system I chose the following instructions I found on the web…

1 – sudo apt install apache2
2 – sudo apt install mysql-server
3 – sudo apt install php7.4
4 – sudo apt install libapache2-mod-php7.4
5 – sudo apt install php7.4-mysql
6 – sudo service apache2 restart

I have already executed the first two lines of the above am ready to do the remaining steps and install php but first… to double check…

My Questions:
a – Are the steps listed above correct?
b – Line two in the above instructions installs mysql-server so why is mysql listed again in line five?
c – What about php7.4-mysqli ?
c1 – Should I remove mysql-server and install mysqli-server?
c2 – Should I install php7.4-mysqli instead of php7.4-mysql?

Thanks for any help. I don’t want to mess up on this install.

— Note: I’ll be using Apache, PHP, and MySQL only on the local machine for developing and testing code before it goes live on the net.

— Note: There are many different and confusing steps on the web so I chose the above steps.

— Note: The instructions used php7.0 but I used php7.4 because…
sudo apt search php7
seems to tell me php version php7.4 is the latest in the repository

2

Answers


  1. a – Are the steps listed above correct?

    they are great

    b – Line two in the above instructions installs mysql-server so why is mysql listed again in
    line five?

    in line 5 is not mysql the server, it is a mysql library for php

    c – What about php7.4-mysqli ?

    see answer above

    mysql-server and install mysqli-server?

    I am not sure but I think there is no such package called mysqli-server, at least in debian we do not have it. mysqli is not a server

    you can check it out :

    apt search <package>
    

    php7.4-mysqli instead of php7.4-mysql?

    mysqli is a extension of php but there is no such package.

    c1 – Should I remove…

    c2 – Should I install …

    you can not because there are no such packages ..

    Login or Signup to reply.
  2. This worked for me on Linux Mint.

    COMMANDS

    sudo apt-get update
    sudo apt-get install php7.2
    sudo apt-get install php7.2-sqlite3
    sudo apt-get install php7.2-curl
    

    THESE MODULES WERE ALREADY INCLUDED WITH PHP:

    sudo apt-get install libapache2-mod-php7.2
    sudo apt-get install php7.2-common
    sudo apt-get install php7.2-cli
    sudo apt-get install php7.2-json
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search