偷瓜的贼 发表于 2019-2-18 12:44:55

ubuntu 安装phpstorm+xdebug 动态调试环境

ubuntu 安装phpstorm+xdebug 动态调试环境
  安装vmware虚拟机和ubuntu18.04


[*]安装ifconfig   apt install net-tools
[*]升级更新系统apt-get update    apt-get upgrade
  安装 php+apche+mysql


[*]安装apache2   apt-get install apache2
[*]安装php    add-apt-repository ppa:ondrej/php
  apt-get install php5.6apt-get install libapache2-mod-php5.6


[*]  安装mysql apt-get install mysql-server mysql-client

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');    安装phpstorm+xdebug
[*]  安装phpstorm+jdk

安装jdk: apt install default-jre      安装phpstorm         
下载安装包:https://download-cf.jetbrains.com/webide/PhpStorm-2018.2.3.tar.gz            复制到虚拟机解压,执行 ./bin/phpstorm.sh 安装
[*]  安装xdebug   apt-get install php-xdebug

php -v 查看xdebug是否安装成功
http://i2.运维网.com/images/blog/201809/14/81d1147af457cd3d1a50c35880c1914c.png
在php.ini中配置:
zend_extension = /usr/lib/php/20170718/xdebug.so
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.trace_output_dir="/tmp/xdebug"
xdebug.profiler_enable=on
xdebug.profiler_output_dir="/tmp/xdebug"
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
  配置phpstorm:
  File-setting-php
http://i2.运维网.com/images/blog/201809/14/f8564b35721ccf6a20775628563b2c4f.png
http://i2.运维网.com/images/blog/201809/14/8225c6dd7611b25d0a39d963d9dad25f.pnghttp://i2.运维网.com/images/blog/201809/14/8225c6dd7611b25d0a39d963d9dad25f.png
http://i2.运维网.com/images/blog/201809/14/f70ad07afafa6cd48737c98a966defa0.png
http://i2.运维网.com/images/blog/201809/14/0ed79e769c41741c58c6dc7a23bb09fb.png
http://i2.运维网.com/images/blog/201809/14/f8e1699e502ae543e535bfb936ba1139.png
http://i2.运维网.com/images/blog/201809/14/80d32526a822f2388acd587da78ff753.png
调试demo
http://i2.运维网.com/images/blog/201809/14/50be187506d8a88e2ac2429d10512e39.png

注意:phpstorm启动不要用root权限启动



页: [1]
查看完整版本: ubuntu 安装phpstorm+xdebug 动态调试环境