是否可以在 Debian 8.10 上运行 Php 5.6 和 Mysql 5.6.x?
答案1
PHP-5.6 在 debian jessie 上可用,可以通过以下方式安装:
apt-get install php5
MySQL-5.6可以通过安装MySQL APT 存储库:
wget https://repo.mysql.com//mysql-apt-config_0.8.9-1_all.deb
dpkg -i mysql-apt-config_0.8.9-1_all.deb
选择 Debian jessie 然后通过软件包更新并安装5.6
版本:mysql
mysql-community-server
apt-get install mysql-community-server
mysql_secure_installation
mysql_install_db
systemctl start mysql
检查MySQL版本:
mysqladmin -p -u root version
示例输出:
mysqladmin Ver 8.42 Distrib 5.6.39, for Linux on x86_64
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Server version 5.6.39
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 1 min 32 sec
或者mysql --version
:
mysql Ver 14.14 Distrib 5.6.39, for Linux (x86_64) using EditLine wrapper
答案2
是的,可以在 Debian 8 中运行 PHP 5.6 和 MySQL 5.6,而且它们实际上是 Debian 8 的默认设置。
只需安装它们即可,作为非常基本的操作:
apt-get install mysql-server php5
不过,为了获得更好的体验,我建议:
apt-get install mysql-server php5 php-pear php5-mysql apache2