スキップしてメイン コンテンツに移動

投稿

ラベル(FreeBSD)が付いた投稿を表示しています

nginx にて fcgiwrapを導入し CGI 実行環境 構築 on FreeBSD13

FreeBSD13 にて CGI が動作するWebサーバを構築する。 nginx は CGI の実行ができないので fcgiwrapを導入する。 nginxとfcgiwrapの通信は UNIXドメインソケットを利用する。 FreeBSDのバージョンは 13.0p8 % freebsd-version 13.0-RELEASE-p8 インストール ここに nginx と fcgiwrap をインストールする。 % doas pkg install nginx fcgiwrap New packages to be INSTALLED: fcgi-devkit: 2.4.0_5 fcgiwrap: 1.1.0_11 nginx: 1.20.2_3,2 pcre: 8.45 ===> Creating groups. Using existing group 'www'. ===> Creating users Using existing user 'www'. ===== Message from nginx-1.20.2_3,2: -- Recent version of the NGINX introduces dynamic modules support. In FreeBSD ports tree this feature was enabled by default with the DSO knob. Several vendor's and third-party modules have been converted to dynamic modules. Unset the DSO knob builds an NGINX without dynamic modules support. To load a module at runtime, include the new `load_module' directive in the main context, specifying the path to the shared object file for the module, ...

FreeBSD の 初期設定

ネットワークの設定 コマンド # dhclient fxp0 を実行するとDHCPにてIPアドレスを自動的に割り振られる 起動時にDHCPでIPアドレスを割り振られるようにするためには、 /etc/rc.conf を作り、 ifconfig_fxp0="DHCP" を書き込む ただし、「fxp0」は環境に応じてネットワークデバイス名をあてる 第21章 高度なネットワーク 21.10. DHCP https://www.freebsd.org/doc/ja_JP.eucJP/books/handbook/network-dhcp.html Ports Collection の利用開始 次のコマンドで Ports Collection のダウンロードと展開を行う。 # portsnap fetch # portsnap extract Ports を使ったプログラムのインストールを行う前にアップデートを行う。 # portsnap fetch update アプリケーションは /usr/ports/以下のインストールするプログラムのディレクトリ内で # make install としインストールする インストール後、一時データは # make clean で削除される アプリケーションのインストール - packages と ports 4.5. Ports Collection の利用 https://www.freebsd.org/doc/ja_JP.eucJP/books/handbook/ports-using.html X Window System の利用 次のコマンドでインストールする # pkg install xorg X Window System 5.3. Xorg のインストール https://www.freebsd.org/doc/ja_JP.eucJP/books/handbook/x-install.html 5.3. Xorg の設定 https://www.freebsd.org/doc/ja_JP.eucJP/books/handbook/x-config.html