Php Dev How To Linux Tutorials Ubuntu Web Hosting

This tutorial provides the steps required to lớn install multiple versions of on Ubuntu 20.04 LTS. It shows how khổng lồ install 7 and 8 on Ubuntu 20.04 LTS.

Bạn đang xem: Php dev how to linux tutorials ubuntu web hosting

This tutorial provides all the steps required to lớn install multiple versions of including 7 & 8 on Ubuntu 20.04 LTS using PPA. The steps should be similar lớn the other versions of Ubuntu và Linux-based systems. In case you are planning to lớn use with the Apache HTTP Server and MySQL database server, you can install Apache 2 và MySQL 8 before starting the installation of 8. It can be done by following the guides - How to lớn Install Apache 2 On Ubuntu 20.04 LTS và How khổng lồ Install MySQL 8 on Ubuntu 20.04 LTS. Also, can be used with NGINX Web vps instead of the Apache HTTP Server. NGINX is widely used as a load balancer and reverse proxy for the Apache website Server và other servers. You can follow How lớn Install & Configure Nginx on Ubuntu 20.04 LTS & Configure Virtual Host Or vps Block On Nginx.

Notes: The default version of available from default distribution for Ubuntu 20.04 LTS is 7.4. You can also follow How to lớn Install 7 On Ubuntu 20.04 LTS from Ubuntu official repositories.

Install 7 from PPA

In this step, we will install 7 using the PPA from Ondrej for Ubuntu 20.04 LTS release. Now, enable the repository from Ondřej Surý using the commands as shown below.

# Refresh indexessudo apt updatesudo apt install software-properties-common# showroom Repositorysudo add-apt-repository ppa:ondrej/ Press ENTER to enable the repository

We can install 7 on Ubuntu 20.04 LTS using the commands shown below.

The important paths and files of the installation are /usr/lib/, /usr/bin/obatambeienwasirherbal.com7.0, /etc/, and /etc/ for NGINX

We can install FPM and configure it for Nginx. This will eliminate the need for the Apache website Server & Nginx can handle the requests.

Xem thêm: Bí Quyết Bán Bảo Hiểm Xe Ô Tô Không Thể Bỏ Qua, Bảo Hiểm Ôtô, Bán Bảo Hiểm Ô Tô

You can also follow How to Install For Nginx On Ubuntu 20.04 LTS for further details.

Install Additional Extension

You can also install the additional extensions in order lớn fully support a website application. Some of these packages might not be required in your scenario, hence it"s totally optional to lớn install these extensions.

# Install MySQL Extensionsudo apt install obatambeienwasirherbal.com7.0-mysql# Enable PDO modulesudo obatambeienwasirherbal.comenmod pdo_mysql# Install MySQL Extension - Required for Wordpress Installationsudo apt install Install CGI and CLI if not installed by defaultsudo apt install obatambeienwasirherbal.com7.0-common obatambeienwasirherbal.com7.0-cli obatambeienwasirherbal.com7.0-cgi # Install CURL extensionssudo apt install obatambeienwasirherbal.com7.0-curl# Install GD & Imagicksudo apt install obatambeienwasirherbal.com7.0-gd Multibyte String, Internationalization và Spell Checksudo apt install obatambeienwasirherbal.com7.0-mbstring obatambeienwasirherbal.com7.0-intl obatambeienwasirherbal.com7.0-pspell# Multibyte String, Internationalization và Spell check - Required for Wordpress Installationsudo apt install Emailssudo apt install obatambeienwasirherbal.com7.0-imap# SQLite Databasesudo apt install obatambeienwasirherbal.com7.0-sqlite3 # Tidy và XML RPCsudo apt install obatambeienwasirherbal.com7.0-tidy obatambeienwasirherbal.com7.0-xmlrpc# Excelsudo apt install obatambeienwasirherbal.com7.0-xsl

Install OPcache to lớn enable caching at the bytecode level.

# Install OPcache extensionsudo apt install obatambeienwasirherbal.com7.0-opcache

Install the extensions to handle compressed files.

# Install Zipsudo apt install obatambeienwasirherbal.com7.0-zip

These are the steps required khổng lồ install 7 on Ubuntu 20.04 LTS using the PPA from Ondřej Surý. We have also installed the additional packages that are mostly required for the website development.

Verify using obatambeienwasirherbal.cominfo()

We can also verify the and the installed packages by checking the output đầu ra of the obatambeienwasirherbal.cominfo method. Now, showroom the file at the root of your web server & execute it using your preferred browser. It should show the output đầu ra similar lớn Fig 1.