
VirtualBox에 대한 OS Linux Mint
이 매뉴얼처럼 PHP를 설치했는데, https://community.linuxmint.com/tutorial/view/486
PHP를 테스트하려고 할 때http://localhost/testphp.php "요청한 URL /testphp.php를 이 서버에서 찾을 수 없습니다."라는 메시지가 표시됩니다. 하지만 나는 그것을 가지고 있습니다.
danko-VirtualBox www # pwd
/var/www
danko-VirtualBox www # ls
html testphp.php
danko-VirtualBox www # cat < testphp.php
<?php phpinfo(); ?>
아파치가 작동 중입니다.
일부 이전 단계
danko-VirtualBox danko # killall nginx
danko-VirtualBox danko # netstat -punta | grep LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 597/smbd
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 1246/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1835/cupsd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 597/smbd
tcp6 0 0 :::139 :::* LISTEN 597/smbd
tcp6 0 0 ::1:631 :::* LISTEN 1835/cupsd
tcp6 0 0 :::445 :::* LISTEN 597/smbd
danko-VirtualBox danko # sudo apt-get install php5 libapache2-mod-php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php5 is already the newest version.
php5 is already the newest version.
The following packages were automatically installed and are no longer required:
kate-data katepart kde-runtime kde-runtime-data kdegames-card-data
kdelibs-bin kdelibs5-data kdelibs5-plugins kdoctools
language-selector-common libattica0.4 libdlrestrictions1 libgcrypt20
libkactivities6 libkatepartinterfaces4 libkcmutils4 libkde3support4
libkdeclarative5 libkdecore5 libkdegames6abi1 libkdesu5 libkdeui5
libkdewebkit5 libkdnssd4 libkemoticons4 libkfile4 libkhtml5 libkio5
libkjsapi4 libkjsembed4 libkmediaplayer4 libknewstuff3-4 libknotifyconfig4
libkntlm4 libkparts4 libkpty4 libkrosscore4 libktexteditor4 libkubuntu0
libkxmlrpcclient4 libntrack-qt4-1 libntrack0 libphonon4 libplasma3
libpolkit-qt-1-1 libqapt2 libqapt2-runtime libqca2 libqt4-qt3support
libqtmultimediakit1 libsolid4 libssh-4 libstreamanalyzer0 libstreams0
libthreadweaver4 libutempter0 ntrack-module-libnl-0 oxygen-icon-theme phonon
phonon-backend-gstreamer phonon-backend-gstreamer-common
phonon-backend-gstreamer1.0 plasma-scriptengine-javascript
qtdeclarative4-kqtquickcharts-1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 315 not upgraded.
danko-VirtualBox danko # sudo /etc/init.d/apache2 restart
Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1.
Set the 'ServerName' directive globally to suppress this message
[ OK ]
답변1
다음 명령으로 PHP를 다시 설치한 후에 작동하기 시작했습니다.
sudo apt-get install php5-cli