Moxa W325A-LX [38/74] Installing php for apache web server

Moxa W406-T-CE [38/74] Installing php for apache web server
W315A/325A Linux User's Manual Managing Communications
4-4
NOTE The CGI function is enabled by default. If you want to disable the function, modify the file
/etc/apache/conf/httpd.conf. When you develop your own CGI application, make sure your CGI file is
executable.
192.168.3.127 – PuTTY
root@Moxa:/home/httpd/cgi-bin# ls –al
drwxr—xr-x 2 root root 0 Aug 24 1999
drwxr—xr-x 5 root root 0 Nov 5 16:16
-rwxr—xr-x 1 root root 757 Aug 24 1999 test-cgi
root@Moxa:/home/httpd/cgi-bin#
Installing PHP for Apache Web Server
The W315A/325A embedded computer supports the PHP option. However, since the PHP file is 3 MB, it is not
installed by default. To install it yourself, first make sure there is enough free space (at least 3 MB) on your
embedded flash ROM).
Step 1: Check that you have enough free space The following figure illustrates how to check that the
/dev/mtdblock3 has more than 3 MB of free space.
192.168.3.127 – PuTTY
root@Moxa:/bin# df -h
Filesystem Size Used Available Use% Mounted on
/dev/mtdblock2 8.0M 6.0M 2.0M 75% /
/dev/ram0 499.0k 17.0k 457.0k 4% /var
/dev/mtdblock3 6.0M 488.0k 5.5M 8% /tmp
/dev/mtdblock3 6.0M 488.0k 5.5M 8% /home
/dev/mtdblock3 6.0M 488.0k 5.5M 8% /etc
tmpfs 30.4M 0 30.4M 0% /dev/shm
root@Moxa:/bin#
Step 2: Type upramdisk to get the free space ram disk to save the package.
192.168.3.127 – PuTTY
root@Moxa:/bin# upramdisk
root@Moxa:/bin# df -h
Filesystem Size Used Available Use% Mounted on
/dev/mtdblock2 8.0M 6.0M 2.0M 75% /
/dev/ram0 499.0k 18.0k 456.0k 4% /var
/dev/mtdblock3 6.0M 488.0k 5.5M 8% /tmp
/dev/mtdblock3 6.0M 488.0k 5.5M 8% /home
/dev/mtdblock3 6.0M 488.0k 5.5M 8% /etc
tmpfs 14.7M 0 14.7M 0% /dev/shm
/dev/ram1 16.0M 1.0k 15.1M 0% /var/ramdisk
root@Moxa:/bin#
Step 3: Download the PHP package from the CD-ROM. You can find the package in
CD-ROM/target/php/php.tgz.
192.168.3.127 – PuTTY
root@Moxa:/bin# cd /mnt/ramdisk
root@Moxa:/mnt/ramdisk# ftp 192.168.27.130
Connected to 192.168.27.130.
220 (vsFTPd 2.0.1)
Name (192.168.27.130:root): root

Содержание

Похожие устройства

Скачать