Ubuntu PHP 7.2 install

Pinterest LinkedIn Tumblr

apt-get update
apt-get upgrade

Step 2: Install a Web Server

To install the Apache web server, run the following command on your server:

sudo apt-get install apache2

After the installation is complete, you should start Apache:

systemctl start apache2

Also, you can enable Apache to start automatically on server boot:

systemctl enable apache2

To check the status of the Apache web server and make sure it is up and running, you can use the following command:

systemctl status apache2

To verify that Apache is running, you can also open your web browser and enter your server IP address, (e.g. http://your_server_ip_address). If Apache is successfully installed, you should see the Apache default welcome page.

Step 3: Install

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update

Step 4: Install PHP 7.2
Install PHP 7.2 using the following command:

sudo apt-get install php7.2 php7.2-cli php7.2-common

Step 5: Search and install specific PHP 7.2 extensions

If you want to install a specific PHP 7.2 extension, you can search if it is available using the following command:

sudo apt search php7.2

Step 7: Install most commonly used PHP extensions
To install the most commonly used PHP extensions you can use the following command:

sudo apt-get install php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-intl php7.2-mysql php7.2-xml php7.2-zip

Step 8: Check the PHP installation
Use the following command to check the PHP version installed on your server:

php -v

1.1 Install MySQL 5.7
To install MySQL 5.7, execute this command:

sudo apt-get -y install mysql-server mysql-client
sudo mysql_secure_installation
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf

sudo a2enconf phpmyadmin

sudo service apache2 reload

sudo apt update

sudo apt install phpmyadmin php-mbstring php-gettext

sudo phpenmod mbstring

sudo systemctl restart apache2

sudo mysql -u root -p;

CREATE USER 'siddharth'@'localhost' IDENTIFIED BY 'admin1818';



sudo nano /usr/share/phpmyadmin/libraries/sql.lib.php

|| (count($analyzed_sql_results[‘select_expr’] == 1)

that’s missing close bracket ‘)’ before operation with 1. So i changed it to

|| (count($analyzed_sql_results[‘select_expr’]) == 1

Write A Comment