VMware Workstation Pro
CentOS-7-x86_64-Minimal-1708.iso
教程地址php
一、安裝lnmp 二、安裝memcache、redis 三、安裝opcache 四、安裝swoole 五、添加虛擬主機 六、上傳項目
pecl install swoole
java
cd到項目下執行: php index.php
redis
1.查找進程pid編號:netstat -apn | grep 9503
(9503爲啓動swoole時監聽的端口號)spring
執行後會出現: "tcp 0 0 0.0.0.0:9501 0.0.0.0:* LISTEN 73731/php" 73731爲pid
2.幹掉進程:kill -9 73731
shell
3.幹掉全部php進程:killall php
apache
安裝php redis擴展:pecl install redis
reids啓動:cd /root/lnmp1.5/src/redis-4.0.6/src
./redis-server ../redis.conf
win啓動: redis-server redis.windows.conf
windows
1.首先安裝和你php版本對應的xdebugcentos
使用wget下載bash
wget https://xdebug.org/files/xdebug-2.8.0alpha1.tgz zxvf xdebug-2.8.0alpha1.tgz cdxdebug-2.8.0alpha1
2.對下載下來的文件進行編譯(依次執行下面的命令)
安裝成功會出現以下所示:
+----------------------------------------------------------------------+ | | | INSTALLATION INSTRUCTIONS | | ========================= | | | | See https://xdebug.org/install.php#configure-php for instructions | | on how to enable Xdebug for PHP. | | | | Documentation is available online as well: | | - A list of all settings: https://xdebug.org/docs-settings.php | | - A list of all functions: https://xdebug.org/docs-functions.php | | - Profiling instructions: https://xdebug.org/docs-profiling2.php | | - Remote debugging: https://xdebug.org/docs-debugger.php | | | | | | NOTE: Please disregard the message | | You should add "extension=xdebug.so" to php.ini | | that is emitted by the PECL installer. This does not work for | | Xdebug. | | | +----------------------------------------------------------------------+
3.修改php.ini配置文件 (remote_host爲ssh主機地址ip)
zend_extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so xdebug.remote_enable = on xdebug.remote_autostart = 1 xdebug.remote_port = 9000 ;xdebug.remote_connect_back = 1 xdebug.remote_host = 192.168.20.12 xdebug.auto_trace = 1 xdebug.collect_includes = 1 xdebug.collect_params = 1 xdebug.remote_log = /tmp/xdebug.log
1. vscode鏈接ssh成功,安裝對應的插件 * PHP Debug * PHP Intelephense 2. 修改settings(注意不是修改本地的,是鏈接ssh後會出現一個ssh遠程的配置文件) ```"php.validate.executablePath": "/usr/bin/php",``` 3.f5開啓debug訪問你的網站就能夠了
1.centos安裝wget
yum -y install wget yum -y install setup yum -y install perl
2.重啓fpm
/etc/init.d/php-fpm restart
1.rocketMq單機環境安裝
2.安裝Maven
3.安裝jdk1.8
4.搭建rocketMq控制檯
nohup sh bin/mqnamesrv > /dev/null 2>&1 &
vi /opt/apache-rocketmq/conf/broker.conf brokerIP1=192.168.20.12
輸入終端執行
export NAMESRV_ADDR=192.168.20.12:9876
nohup sh bin/mqbroker -n 192.168.20.12:9876 > autoCreateTopicEnable=true -c /opt/rocketmq-all-4.5.2-bin-release/conf/broker.conf /dev/null 2>&1 &
nohup java -jar target/rocketmq-console-ng-1.0.1.jar --rocketmq.config.namesrvAddr=192.168.20.12:9876 > /dev/null 2>&1 &