Linode Ubuntu 16 for PHP 5? - linode

I was trying to install PHP 5.x on Linode, but I got error:
E: Package 'php5-fpm' has no installation candidate
The command line is
sudo apt-get install php5-fpm

This issue has nothing to do with Linode. If you're running Ubuntu 16.04 (not 16) on Linode or anywhere else, PHP 5 no longer is available as they have moved on to PHP 7. If you can, I'd suggest using PHP 7. If not, this answer as details on how you can install PHP 5 from a PPA for use on Ubuntu 16.04: https://askubuntu.com/a/756901/51244

Ubuntu 16.04 has php 7 installed as default.
Change php version in your command. Here is updated command
sudo apt-get install php7.0-fpm
Note php7.0 in command.

Related

Mariadb installation on Amazon linux 2

Can someone provide steps to install mariadb on amazon linux 2?
I am pretty new in linux, so a little detail will be greatly appreciated. I have seen few links to install maria db on centOs but not sure if the same works for Amazon linux 2
If you use sudo yum install mariadb You'll get MariaDB version 5.5 which is an older version of MariaDB to get the latest version you will need to do the following.
sudo amazon-linux-extras enable lamp-mariadb10.2-php7.2=latest
sudo yum install mariadb mariadb-server
Note This will not work if you have php >= 7.3. If this is the case you must uninstall php before doing the steps above, using sudo yum erase php-common
sudo amazon-linux-extras disable lamp-mariadb10.2-php7.2=latest
Now mariadb is installed. I first tried to add centos 7 repo, but wasn't successful in getting it to install correctly.
Here you go:
Install and Start MariaDB
sudo yum update -y
sudo yum install -y mariadb-server
sudo systemctl start mariadb
sudo systemctl enable mariadb
Secure DB server. Select the relevant option's during command run.
sudo mysql_secure_installation
But I recommend you to install MariaDB from official repo for latest version by following instructions in this link.

For root access composer not found in centos 7

I installed composer in centos 7.
When I logged in with centos user, if I hit composer -v, it shows that composer is installed.
But after I switch to root access with sudo su, if I hit composer -v, it displays not found.
Can anyone help me? What should I do now?
What you describe are the symptoms of non-packaged install.
If something is available from packages, you should strive to install it using packages where available.
sudo yum install epel-release
sudo yum install composer
# have no problems, have a cup of coffee

How can I install laravel on ubuntu 18.04

I am trying to install laravel 5.6 via composer on ubuntu 18.04
but i have this error:
Any help ?
This is not an error, these are just some suggestions to install other packages, for example if you need console logger, you may have to install psr/log-implementation package. don't worry, your laravel installation is completed without any errors.

How to setup XDebug for PHP7 on Mac?

I've installed PHP 7 on my mac using Homebrew i.e.
$ brew install php70
Also I want to have the the XDebug setup on my machine.
Ideally I would love to have an easy solution like using brew again, but unfortunately it seems there is no such formula exist (at least yet), and the latest package is homebrew/php/php56-xdebug.
I thought before start the manual installation, check here to see if there are any other workaround.
Any advice will be greatly appreciated.
First, make sure you're on the version of PHP for which you want Xdebug installed. It needs to be installed separately for each major version (7.0 vs 7.1 vs 7.2). You can check your version using php -v.
Then, run pecl install xdebug.
Once it's finished installing, you'll see a message like this:
Installing '/usr/local/Cellar/php/7.2.8/pecl/20170718/xdebug.so'
Then go to your php.ini (which you can find by running php --ini, and add these two lines to it:
zend_extension="/usr/local/Cellar/php/7.2.8/pecl/20170718/xdebug.so"
xdebug.remote_enable=on
Obviously, change the path to whatever was printed by the pecl xdebug installation.
It is available in Homebrew now as homebrew/php/php71-xdebug.
Try:
brew install php71-xdebug
and if that doesn't work:
brew install --build-from-source php71-xdebug
Source: xdebug install on php70
As stated by Homebrew, Homebrew/php tag was deprecated.
So it's not possible to install xdebug through Homebrew anymore. Please use PECL instead: https://xdebug.org/docs/install#pecl
Since Brew is no longer working, you can use pecl to install the debugger.
It's not as good as brew, you may run into dependency problems but it works. Install php with brew, whatever version you want, then use pecl.
brew install php
pecl install xdebug
Xdebug 2.4.0beta1 already supports PHP 7. Unfortunately the only way for installation for now is to compile it from the source code.
If brew install php71-xdebug is not working, and it returns this error:
Error: No available formula with the name "php71-xdebug"
Try run this command first: brew tap homebrew/php .

How to install and configure LAMP on ubuntu 12.04

Could somebody please tell me how to install and configure LAMP on ubuntu 12.04 ? Is there a package similar to WAMP Server that is all-in-one ? I have tried to install from command line ,PHP,MySQL work but apache gives me this after sudo service apache2 restart
* Restarting web server apache2
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
And I think probably I did something wrong when installing !
Thank you !
From this tutorial,
Run this commands in Ubuntu Terminal-
sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
For Checking-
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'
If u get-
Your PHP installation is working fine.
Then you are done.
You can follow tutorial from below link to setup LAMP on your Ubuntu 12,
http://technarco.com/ubuntu-linux/how-install-lamp-ubuntu-12
Enjoy, :)
To resolve this error, you need to stop other process using this port.
In some of cases it is nginx. you can stop it
sudo /etc/init.d/nginx stop
you can install lamp server using Tasksel (Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated “task” onto your system. This program is used during the installation process, but users can also use tasksel at any time)
check this post http://wiki.workassis.com/ubuntu-install-lamp-using-tasksel/

Resources