- Как установить PHP 7.3 / PHP 7.3-FPM на Linux Mint 19
- Как мне установить PHP 7.3 на Linux Mint 19 ?
- Шаг 1: Обновите Linux Mint 19
- Шаг 2: Добавьте репозиторий PHP 7.3 в Linux Mint 19
- Шаг 3: Установите PHP 7.3 на Linux Mint 19
- Шаг 4: Установка расширений PHP 7.3
- Установка PHP7.3 FPM на Linux Mint
- Как установить/обновить PHP 8.0 (Debian/Ubuntu/Mint)
- Изменения расширений и зависимостей в PHP 8.0
- Изменения в файле INI PHP 8.0
- Установка PHP 8
- Установка PHP8 fpm
- Смена установленной версий PHP по умолчанию.
- Linux Mint Forums
- [Solved] Best way to upgrade PHP on Mint 17.3?
- [Solved] Best way to upgrade PHP on Mint 17.3?
- Re: Best way to upgrade PHP on Mint 17.3?
- Re: Best way to upgrade PHP on Mint 17.3?
- Re: Best way to upgrade PHP on Mint 17.3?
- Linux Mint How to Update System
- Upgrading Linux Mint
- Software update
- Distro upgrade
- There are 2 ways you can follow.
- Reinstall the OS
- Mint upgrade
- Preparing the system
- Install upgrade tools
- Begin upgrading the system
- Completing the installation
- About the author
- Sidratul Muntaha
- RELATED LINUX HINT POSTS
Как установить PHP 7.3 / PHP 7.3-FPM на Linux Mint 19
Как мне установить PHP 7.3 на Linux Mint 19 ?
В декабре 2018 года команда PHP выпустила PHP 7.3 для общей доступности (GA), и все подробности о выпуске находятся на странице PHP ChangeLog.
Версия PHP по умолчанию, доступная в репозиториях Linux Mint 19, – это PHP 7.2.
Это руководство проведет вас через шаги по установке PHP 7.3 на Linux Mint 19.
Для пользователей веб-сервера Apache вы установите libapache2-mod-php в качестве зависимости.
Но для пользователей Nginx вместо этого вы установите PHP 7.3-FPM.
Шаг 1: Обновите Linux Mint 19
Убедитесь, что вы используете обновленную версию Linux Mint. Если у вас запущены важные программы и вы не хотите их обновлять, вы можете просто обновить список пакетов.
Рекомендуется перезагрузить компьютер после обновления, если у вас установлена более новая версия ядра.
Шаг 2: Добавьте репозиторий PHP 7.3 в Linux Mint 19
Поскольку Linux Mint 19 основан на Ubuntu 18.04, добавляемый репозиторий предназначен для Ubuntu 18.04.
Добавьте ondrej / php PPA-репозиторий с пакетами PHP 7.3 и другими необходимыми расширениями PHP.
Шаг 3: Установите PHP 7.3 на Linux Mint 19
После добавления репозитория установите PHP, выполнив следующие команды на своем терминале.
Версию можно проверить с помощью команды php.
Шаг 4: Установка расширений PHP 7.3
Установите расширения PHP 7.3, используя синтаксис
Смотрите пример ниже
Вы можете подтвердить установленную версию расширения php с помощью команды apt policy:
Конфигурационный файл PHP для настройки среды: /etc/php/7.3/cli/php.ini и /etc/php/7.3/apache2/php.ini.
Установка PHP7.3 FPM на Linux Mint
Если вы используете Nginx Web Server, вам нужно установить php7.3-fpm для страниц PHP.
Файлы конфигурации PHP-FPM доступны в папке /etc/php/7.3/fpm/
Вам может потребоваться перезагрузить ваш веб-сервер после установки PHP.
Счастливой PHP-разработки и хостинга приложений.
Источник
Как установить/обновить PHP 8.0 (Debian/Ubuntu/Mint)
Как установить PHP 8 на Linux
Релиз PHP 8 состоялся 26 ноября 2020 года, и в этом посте мы установим новую версию или обновим вашу старую версию PHP до 8
PHP 8.0 содержит много новых функций и улучшений производительности, синтаксиса, безопасности и стабильности. Установка PHP 8.0 практически на любой сервер упрощается благодаря предварительно скомпилированным пакетам, доступным во всех поддерживаемых в настоящее время версиях Debian и Ubuntu.
Изменения расширений и зависимостей в PHP 8.0
Несмотря на огромное количество изменений в PHP 8.0, в принципе было произведено не так много изменений в его зависимостях и структуре расширений.
Расширение JSON теперь всегда доступно , и нет флага компиляции для его исключения. Это означает, что больше нет необходимости явно устанавливать пакет php-json.
Расширение xmlrpc перемещено в PECL по уважительным причинам. Репозитории программного обеспечения, упомянутые в этом посте, не включают xmlrpc расширения для PHP 8.0.
Кроме того, в Windows название расширения GD было изменено с php_gd2.dll на php_gd.dll.
Изменения в файле INI PHP 8.0
Также есть несколько изменений в файле INI.
- По умолчанию утверждения вызывают исключения — ( assert.exception=1)
- Отображение ошибок по умолчанию установлено на E_ALL — ( error_reporting=-1)
- При запуске теперь по умолчанию ошибки включены — ( display_startup_errors=1)
- Новая функция JIT в PHP 8.0 добавляет несколько новых директив INI.
- Параметр zend.exception_string_param_max_len для настраиваемой длины строки трассировки стека исключений
Установка PHP 8
1. Необходимо добавить репозиторий ondrej/phpPPA
Приведенные выше шаги добавят PPA в качестве источника пакетов, который содержит все пакеты PHP и их зависимости, такие как argon2 и libzip.
2. Установите PHP 8.0 и нужные расширения
Все пакеты PHP 8.0 следуют шаблону php8.0-имя_расширения , и пакет php8.0-common включает необходимый набор расширений по умолчанию.
Установите PHP 8.0 CLI для работы в консоли
Вы можете установить дополнительные расширения по тому же шаблону php8.0-имя_расширения. Обратите внимание, что вам не нужно устанавливать, так php8.0-json, так как теперь он включен по умолчанию.
Пример установки еще нескольких полезных расширений:
Для разработки также могут быть установлены инструменты покрытия кода или отладчик Xdebug.
Установка PHP8 fpm
В зависимости от используемого веб-сервера вам необходимо будет установить дополнительные пакеты для интеграции с веб-сервером.
Для использования Apache mpm_event, Nginx, Litespeed и т. д. нужно будет установить php8.0-fpm
Для использования Apache mod_php установите libapache2-mod-php8.0
Чтобы проверить установку PHP и расширений, выполните следующие команды:
Если вам потребуется удалить старые пакеты PHP, можно воспользоваться командой
Это предполагает, что вы используете PHP 7.4 в качестве предыдущей версии. Но будьте осторожны, сначала сто раз проверьте что вы больше не используете старые версии в своих проектах.
Смена установленной версий PHP по умолчанию.
Если вдруг вас не устраивает новая установленная версия PHP, вы можете сменить другую версию по умолчанию, командой:
И введя номер нужной вам предыдущей версии PHP.
Веб-разработчик со стажем программирования более 9 лет, всегда в процессе учебы и созидания.
Источник
Linux Mint Forums
Welcome to the Linux Mint forums!
[Solved] Best way to upgrade PHP on Mint 17.3?
[Solved] Best way to upgrade PHP on Mint 17.3?
Post by fpeelo » Thu Nov 03, 2016 10:31 am
What is the best way to upgrade PHP on Mint 17.3?
I just upgraded to 17.3 from 17.1 because I had PHP 5.5.9. I want to use the hash_equals() function, it’s supposed to protect against attacks on my website. But the function is only available from PHP 5.6. The live server that I rent has 5.6.26, so it’s ok, but of course the scripts won’t run on my local LM 17 machine where I’m trying to debug them because I have 5.5.9.
Unfortunately 17.3 still has 5.5.9.
So what is the best way to upgrade PHP? Should I download the source and compile from scratch? Or nuke my hard drive and install LM 18? A bit of web searching (what’s the equivalent term for «googling» when you’re using DuckDuckGo?) tells me that an upgrade from 17 to 18 would not be a good idea, I should go for a clean install.
(btw apologies if this is a FAQ, I tried searching to see if anyone else had upgraded php, but the forum won’t accept php as a search term. Have to have 4 letters to be a word.)
Re: Best way to upgrade PHP on Mint 17.3?
Post by AscLinux » Thu Nov 03, 2016 10:35 am
Anyhow, I’d upgrade to 18. I have a test installation of Mint in VM to support my friends, I upgraded it and everything went well.
Re: Best way to upgrade PHP on Mint 17.3?
Post by lmuserx4849 » Thu Nov 03, 2016 11:20 pm
For searches of small words a site search has to be done via google, duckduckgo, etc., site search.
I’m conflicted about PPA’s. On the one hand they are presented in reviews and such as a way of staying relatively current, but on the other hand they exist in a wild wild west structure. and many are obsolete. A search could return 200 entries in the list, with 1 current and maintained, and the user has to sift through 200 to find the 1. But I have also found some that are very well maintained. but it takes a lot of work and sometimes maybe compiling oneself is the only option.
I find a lot of good info at askubuntu. You might find this one helpful.
I’m going to follow this thread. I’d be interested in you solution.
Update
I talked to a friend on Linux Mint Debian (LMDE) and they are at PHP 5.6.27. They said it was updated within the last week or so. This is the current/security update from PHP. As Linux Mint users, we need to be aware of what Ubuntu is doing. Where do we find out what Ubuntu is doing with PHP 5.5, 5.6 on Trusty (Linux Mint 17.3)? Aren’t we suppose to be getting at least security updates in 17.3?
Re: Best way to upgrade PHP on Mint 17.3?
Post by fpeelo » Fri Nov 04, 2016 10:28 am
Thank you, both of you.
I tried AscLinux’s link for searching for php. It was the same as lmuserx4849’s suggestion but as a link — search for site:forums.linuxmint.com «php» on duckduckgo. The «site:» thing is worth learning, thanks.
It found some pages about php, and some with links like viewtopic.php including one about installing software in general using PPAs. So that brings me to lmuserx4849’s PPA suggestion. The askubuntu link is what I eventually used. A bit of duckduckgoing of ppa for php showed me what Ondřej Surý is doing. The recommended procedure seems to be (as root):
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
apt-get update
Then I was able to go into the Synaptic package manager. I tried marking the php5 stuff for removal, but when I went to mark php5-common it wanted to install php7 instead. So I looked for php5.6 and installed that, then uninstalled the php5 stuff. It still wanted to install some php7 stuff, but not php7 itself so I thought that would be ok.
When I started php in a command shell, the version was now
PHP 5.6.27-1+deb.sury.org
trusty+1 Development Server started at Fri Nov 4 14:19:48 2016
My scripts are not working, but now that’s because mysqli has gone missing, it must have been in the list of things that uninstalling php5 also got rid of, so I guess I have to install some more stuff. But at least my PHP is now upgraded.
The question of why LM17 is still using 5.5.9 is interesting. According to
http://php.net/downloads.php
the «old stable» version is 5.5.38, not 5.5.9, so maybe security patches have been brought from newer streams into 5.5?
The other open question is what happens if/when LM update php — how will I know to remove the PPA version? I suppose I’ll have to wait until a new version comes through, to find out.
Источник
Linux Mint How to Update System
Today, we’ll be focusing on upgrading the software of our beloved Linux Mint system. In the case of Linux, software updates are pretty simple. In the case of Linux Mint, updating your system along with all the software is EXTREMELY simple. Believe it or not, it’s so simple that you can always run the tasks within a couple of minutes.
Upgrading Linux Mint
Software update
To keep all the software up-to-date, this is the simplest way. Fire up a terminal and run the following command.
This command tells APT to update the cache and upgrade all the necessary components of the system at one fell swoop.
If you’re looking for a GUI, then check out the “Update Manager”. It’s a great GUI tool with self-explanatory options.
Hit “Refresh” to update the APT cache and find out if there’s any new update available for the installed software.
If there’s any an update available, you’ll the option of selecting which updates to install. Then, click “Install Updates” to complete the procedure.
Distro upgrade
This is another major part of the lifecycle of Linux. All the major distros release a system upgrade on a regular basis with lots of patches, bug fixes, and improvements. It’s really necessary to upgrade to the latest version. This way, you’ll always stay on the top of the support and enjoy the latest features.
In the case of Linux Mint, this process is a little bit rough. Linux Mint devs like to release such major system upgrades only when it’s necessary. Because of this strategy, Linux Mint system upgrades are more important than you can imagine.
For example, I have this old Linux Mint 17.3 Rosa with MATE desktop. Currently, the latest version is Linux Mint 19, Tessa. How do you upgrade to the latest version?
There are 2 ways you can follow.
Reinstall the OS
When a new Linux Mint version is out, you can’t upgrade your old, existing Linux Mint to the latest one right away. Devs have to work on preparing for the “mintupgrade” process.
For the time being, the best way to enjoy the latest features and improvements is by reinstalling the entire OS. I know that it sounds tedious and of course, it is. It depends on yourself whether you can afford the tedious process of reinstalling the entire OS.
If you’re so obsessed with the latest features, you should grab the latest Linux Mint ISO and update your system right away! Learn how to install Linux Mint.
Mint upgrade
This is the most hassle-free way of enjoying the latest Linux Mint system. This process is the least troublesome but devs also need time to prepare this method. So, if you can afford to wait for a few days to weeks, this is the best way to go.
For example, let’s upgrade my old Linux Mint 17.3 to the latest Linux Mint 19.
Preparing the system
At first, fire up the terminal and refresh the APT cache.
Make sure that your system is using LightDM as the display manager. LightDM is the default one for Linux Mint. However, if you’ve changed it to something else, you have to revert back to LightDM.
Run the following command.
If the result would be
Then there’s nothing to do. Unfortunately, my old system is using MDM. If your system is also using anything other than LightDM, then follow the following procedures.
When prompted, select “lightdm”.
Now, run the following commands for completing the configuration.
Install upgrade tools
Run the following command for installing the “mintupgrade” tool.
Begin upgrading the system
Before this step, make sure that you’ve configured Timeshift properly. It’s not necessary to create a backup with Timeshift. All you need is just open the tool and configure it.
Let “mintupgrade” check for any existing upgrades.
“mintupgrade” will continue all the procedures all by itself. This step will check all the packages necessary for the upgrade.
The next command will download all the necessary packages and tools to perform the upgrade.
The process is automatic and will require time (depending on your internet connection).
Download complete? Good. Now, tell “mintupgrade” to complete the upgrade. This is another lengthy process, so be patient.
Completing the installation
Finally, the system upgrade is complete. Reboot the system to complete.
Voila! Upgrade successful!
About the author
Sidratul Muntaha
Student of CSE. I love Linux and playing with tech and gadgets. I use both Ubuntu and Linux Mint.
RELATED LINUX HINT POSTS
Linux Hint LLC, [email protected]
1210 Kelly Park Cir, Morgan Hill, CA 95037
Источник