ダウンロードしたファイルを実行マシン(今回はFreeBSD)に持っていき、展開。 展開したファイルをconfig、make をします。 自分の環境下でphpの実行まで確認できるので、確認してからサーバへの設定をしたほうがいいです。 php7はfastcgiはすでに含まれているのでビルドする時に追加するとかしなくてもいいみたいです。 % tar jxvf php-7.1.3.tar.bz2 <ー展開 x php-7.1.3/ x php-7.1.3/generated_lists : x php-7.1.3/win32/ftok.c x php-7.1.3/win32/select.c % ls php-7.1.3.tar.bz2 php-7.1.3 % cd php-7.1.3 <ー 移動 % ./configure --help | less    <ー helpしてみて確認してみるのもいい % ./configure   <ー ビルドしてみる checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking build system type... i386-unknown-freebsd10.3 : config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands % make                               <ー makeしてみる /bin/sh /export/home/***/php-7.1.3/libtool --silent --preserve-dup-deps --mode=compile cc -D・・・・・ : Build complete. Don't forget to run 'make test'. % make test   <ー レグレッションテスト。phpが動作するか確認 : FAILED TEST SUMMARY             <ーなにか失敗したリストがでる。問題なければ放置 : Do you want to send this report now? [Yns]: n   <ーエラーリストレポートがいらないなら[n] 自分環境で動作できるようになったはずなのでコマンドラインで確認します。 (実行phpがわからないときはgrepで探す) % find . | grep php ./php.gif ./pear/fetch.php : ./sapi/cgi/php-cgi     <ー発見 : % ./sapi/cgi/php-cgi    <ー実行して確認           <ー入力待ちモードになるのでphpスクリプトをいれてファイル打ち終わったよで CTRL-d をすると結果が出て来る X-Powered-By: PHP/7.1.3 Content-type: text/html; charset=UTF-8 : : あとは、本体サーバに sapi/cgi/php-cgi を適応させれば動きます。 おまけ