- さてcentosとやらなんだけど、yumってコマンドで簡単にアプリがインストール出来るらしいのでこれでサクッとphpをインストールしちゃいましょ♪
[root@dti-vps-srv02 ~]# yum install php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: rsync.atworks.co.jp
* base: rsync.atworks.co.jp
* extras: rsync.atworks.co.jp
* updates: rsync.atworks.co.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.i386 0:5.1.6-27.el5_5.3 set to be updated
--> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php
--> Processing Dependency: php-cli = 5.1.6-27.el5_5.3 for package: php
--> Running transaction check
---> Package php-cli.i386 0:5.1.6-27.el5_5.3 set to be updated
---> Package php-common.i386 0:5.1.6-27.el5_5.3 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php i386 5.1.6-27.el5_5.3 updates 2.3 M
Installing for dependencies:
php-cli i386 5.1.6-27.el5_5.3 updates 2.1 M
php-common i386 5.1.6-27.el5_5.3 updates 153 k
Transaction Summary
================================================================================
Install 3 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 4.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): php-common-5.1.6-27.el5_5.3.i386.rpm | 153 kB 00:00
(2/3): php-cli-5.1.6-27.el5_5.3.i386.rpm | 2.1 MB 00:00
(3/3): php-5.1.6-27.el (94%) 89% [==========- ] 0.0 B/s | 2.1 MB --:-- ETA (3/3): php-5.1.6-27.el5_5.3.i386.rpm | 2.3 MB 00:00
--------------------------------------------------------------------------------
Total 5.0 MB/s | 4.6 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common [ ] 1/3
Installing : php-cli [ ] 2/3
Installing : php [ ] 3/3
Installed:
php.i386 0:5.1.6-27.el5_5.3
Dependency Installed:
php-cli.i386 0:5.1.6-27.el5_5.3 php-common.i386 0:5.1.6-27.el5_5.3
Complete!
ふむぅ、yumって楽ちんなものなんですね
ではphpがinstall出来てるか確認のため
cd /var/www/html
vi test.php
<? phpinfo(); ?>
と入力して保存しましょう
※yumの使い方
※viの使い方
http://***.****.****.****/test.php へアクセスして下図のようなページが表示されればOK