How do I install php and phpmydmin version 5.6?
When I use apt install php5.6-cli it shows me no package found.
2 Replies
watrick
Linode Staff
If you're just getting set up and are interested, we have a Marketplace app for installing phpMyAdmin on a new Linode. Marketplace apps are scripts for installing services and packages at the time the Linode is created.
Because these don't work on existing Linodes, to install you'll need to run a couple of commands. Here's what we currently have in our Marketplace app:
#<UDF name="db_user" Label="phpMyAdmin/MySQL Admin User" example="admin" />
#<UDF name="dbuser_password" Label="phpMyAdmin/MySQL Admin Password" />
#<UDF name="dbroot_password" Label="MySQL root Password" />
source <ssinclude StackScriptID="401712">
exec > /var/log/stackscript.log 2>&1
# Set hostname
set_hostname
# Update system
apt_setup_update
# Install/configure MySQL, Add Admin User
apt-get install -y mysql-server
systemctl enable mariadb --now
run_mysql_secure_installation
mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DBUSER_PASSWORD'"
mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'localhost' WITH GRANT OPTION"
mysql -u root -e "FLUSH PRIVILEGES"
# Install PHP
echo 'phpmyadmin phpmyadmin/dbconfig-install boolean true' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/mysql/admin-pass password $DBROOT_PASSWORD' | debconf-set-selections
echo 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | debconf-set-selections
apt-get install -y phpmyadmin
php* 5.6 has been end-of-life since 2017. You probably shouldn't be using it.
You can build it yourself from source that you can get here:
https://prototype.php.net/versions/5.6/install/
-- sw