actually had that problem and took me allot of time to figure out the solution: (if any previous php versions where installed, make sure to first get completely rid of them. if necessary purge and reinstall apache2 and php7)
first:
> sudo apt-get install php-xdebug
then edit the php.ini file of php 7 :
> sudo gedit /etc/php/7.0/apache2/php.ini
and just on the bottom add:
xdebug.remote_enable = On
save and of course then:
> sudo service apache2 restart
Download stable release of xdebug 2.4.0
wget -c "http://xdebug.org/files/xdebug-2.4.0.tgz"
Extract archive
tar -xf xdebug-2.4.0.tgz
cd xdebug-2.4.0/
Build extension
phpize
./configure
make && make install
Enable the extension
echo "zend_extension=xdebug.so" > /etc/apache2/mods-available/xdebug.ini
ln -sf /etc/apache2/mods-available/xdebug.ini /etc/apache2/mods-enabled/20-xdebug.ini
ln -sf /etc/apache2/mods-available/xdebug.ini /etc/apache2/mods-enabled/20-xdebug.ini
service php7.0-fpm restart
Check it
php -m | grep -i xdebug
It should print:
xdebug
Xdebug
Related
I am using Ubuntu 18.04 I have installed ngrok using below command:
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok
It is installed fine and is also working fine. I am now creating a systemd service for it. For that I need to know the installation path of ngrok. I did which ngrok, it shows me the path /usr/local/bin/ngrok. Where is its config file stored?
When running the command sudo do-release upgrade I'm facing the following errors:
Checking package manager
Can not upgrade
An upgrade from 'cosmic' to 'eoan' is not supported with this tool.
Since 18.10 no longer supported you can upgrade manually to 19.04
mkdir /tmp/upgrade
cd /tmp/upgrade
wget http://old-releases.ubuntu.com/ubuntu/dists/disco-updates/main/dist-upgrader-all/current/disco.tar.gz
tar -xvf disco.tar.gz
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
/etc/apt/sources.list change all links prefix to -> http://old-releases.ubuntu.com/
sudo python3 dist-upgrade.py
Then upgrade to 19.10
sudo cp /etc/apt/sources.list.bak /etc/apt/sources.list
sudo sed -i -e 's|cosmic|eoan|g' /etc/apt/sources.list
sudo apt update
sudo apt upgrade
I just experienced the whole process of upgrading from 18.10 to 20.04LTS. Key steps are first upgrading from 18.10(cosmic) to 19.04(disco), then 19.10(eoan), finally 20.04LTS(focal).
Upgrade from 18.10 to 19.04. First, we have to manually download disco updates:
mkdir /tmp/upgrade
cd /tmp/upgrade
wget http://old-releases.ubuntu.com/ubuntu/dists/disco-updates/main/dist-upgrader-all/current/disco.tar.gz
tar -xf disco.tar.gz
Now, modify /etc/apt/sources.list(Tip: you'd better save the original sources.list as a backup). This file in Ubuntu 18.10 is like this:
However, "archive.ubuntu.com" has been dead, so we have to replace these links by "old-releases.ubuntu.com", then run dist-upgrade.py in current directory, which is extracted from disco.tar.gz:
sudo sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo sed -i 's/cosmic/disco/g' /etc/apt/sources.list # some answers may forget this
sudo python3 dist-upgrade.py
Note that if you forget to replace "cosmic" with "disco", when running this script, it may throw this dialogue box:
Don't worry, choose "Yes", just like it said, it will update all "cosmic" to "disco" entries.
When this script succeeds, reboot your system and now you have Ubuntu 19.04(disco). Your /etc/apt/sources.list should be like this:
Upgrade from 19.04 to 19.10. Again, replace "disco" to "eoan" in /etc/apt/sources.list. Now you can run apt for updating:
sudo sed -i 's/cosmic/eoan/g' /etc/apt/sources.list
sudo apt update
sudo apt upgrade
If everything goes well, reboot your system and you got 19.10(eoan)! If you just want 19.10, feel free to skip step 3, it's for users who want 20.04 LTS.
Upgrade from 19.10 to 20.04 LTS. This is quite easy, just use Ubuntu Software Updater, it will do everything for you. It took me about 2-3 hours to download and install all updates.
I'm trying to install Adminer from Ubuntu repository using:
sudo apt install adminer
Installation works fine but can't find the file /etc/adminer/apache.conf to use with Apache server. The folder /etc/adminer/ is empty and can't find it anywhere with find command.
Any help?
Thanks in advance.
In the next few steps, I'll show you how I installed adminer for Ubuntu 18.04.1 LTS .
After installation with apt package manager change into the adminer directory.
cd /usr/share/adminer
There you will find a file called compile.php.
Run the following command and the adminer-X.X.X.php (X.X.X for your version) file will be created.
sudo php compile.php
Create the apache adminer configuration file.
sudo echo "Alias /adminer.php /usr/share/adminer/adminer-X.X.X.php" | sudo tee /etc/apache2/conf-available/adminer.conf
Now you'll need to activate the configuration.
cd /etc/apache2/conf-available/
sudo a2enconf adminer.conf
Reload your apache webserver.
sudo systemctl reload apache2.
Test in your browser of choice (localhost/adminer.php)
This source was really helpful:
https://www.linuxhelp.com/how-to-install-adminer-on-ubuntu-16-04/
Install Apache:
sudo apt-get install apache2
Install PHP:
sudo apt-get install php libapache2-mod-php php-mysql
Install Adminer:
sudo wget "http://www.adminer.org/latest.php" -O /var/www/html/adminer.php
Once the installation completes, restart Apache.
sudo service apache2 restart
At this point, the setup is complete. You can access Adminer at the following address.
http://[SERVER_IP]/adminer.php
I am using the Netbeans IDE, PHP version 7.0 and I have already installed Apache version 2.4.18 and Linux Mint 18.
I have also tried to install the debug files with
sudo apt-get install php7.0-xdebug
How can I proceed further?
Download last stable release of xdebug 2.6.0 :
wget -c "http://xdebug.org/files/xdebug-2.6.0.tgz"
Extract file :
tar -xf xdebug-2.6.0.tgz
cd xdebug-2.6.0/
Build extension
phpize
./configure
make && make install
after finshed compiling i found the binary on path;
/usr/lib/php/20151012/xdebug.so
for find xdebug.so use this comand :
pwd -L xdebug
it print out : /etc/php/7.0/mods-available
then go in directory /etc/php/7.0/mods-available and edit file as superuser nano xdebug.ini file add follows lines:
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.show_error_trace = 1
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.profiler_enable=1
sudo systemctl restart apache2.service or sudo /etc/init.d/apache2 restart
http://wiki.netbeans.org/HowToConfigureXDebug
I am using Check_MK with Nagios. I found somewhere that nagios comes with mk-livestatus but I found on my server but I couldn't found it.
Can we add this(mk-livestatus) feature explicitely? If Yes, How could I install it?
Thanks
OMD automatically configures this option correctly in etc/mk-livestatus/nagios.cfg.
If your nagios is not configured with OMD you can use following steps to install mk-livestatus:
- Installing mk livestatus:
1.- Install dependencies:
# yum install make gcc-c++ wget
2.- Download mk livestatus:
# cd /tmp && wget http://mathias-kettner.de/download/mk-livestatus-1.1.12p7.tar.gz
3.- Extract package:
# tar -xzvf mk-livestatus-1.1.12p7.tar.gz
4.- Install:
# cd mk-livestatus-1.1.12p7/ && ./configure
# make && make install
5.- Create new directory with correct permissions:
# mkdir /usr/lib/nagios/mk-livestatus && chown nagios:apache /usr/lib/nagios/mk-livestatus
6.- Edit /etc/nagios/nagios.cfg :
broker_module=/usr/local/lib/mk-livestatus/livestatus.o /usr/lib/nagios/mk-livestatus/live
7.- Restart Nagios:
# service nagios restart
8.- Try command line:
# echo 'GET hosts' | unixcat /usr/lib/nagios/mk-livestatus/live
For more information of query syntax:
http://mathias-kettner.de/checkmk_livestatus.html
There is a website specially for mk_livestatus made by mathias kettner who's the creator of mk_livestatus
here the installation documentation for the agent on linux ( dpkg or rpm )
http://mathias-kettner.com/checkmk_linuxagent.html