# linux 1. 在`/install/swoole-loader`目录找到对应 php 版本的 swoole-loader ![](https://img.kancloud.cn/9a/01/9a0157f40fc1caa898f5da73359c3ed0_1236x398.png) 2. 查看 `php`扩展目录位置 ```sh php -i | grep extension_dir ``` ![](https://img.kancloud.cn/3e/e6/3ee63f8cdd7d34e24b4c1b0f75b8ac24_1124x160.png) 3. 复制对应版本的扩展到 `php`扩展目录 ```sh > cd install/swoole-loader > cp swoole_loader72.so /usr/local/lib/php/pecl/20170718 ``` 4. 查看 `php.ini` 文件位置 ```sh php -i|grep '\.ini' ```checkooy ![](https://img.kancloud.cn/f5/b3/f5b30d11747b1017a545993e174cee86_1110x310.png) 5. 在 `php.ini`文件尾部追加`swoole-loader`扩展 ![](https://img.kancloud.cn/dc/e4/dce4c18b3dd100d8b184f4490c020410_1148x56.png) 6. 重启服务 ```sh php think swoole restart ```