apache+phpインストール
apache+phpインストール †
[root@localhost ~]# yum install httpd php Loading "installonlyn" plugin Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies
- > Populating transaction set with selected packages. Please wait.
- > Package php.i386 0:5.1.6-20.el5_2.1 set to be updated
- > Package httpd.i386 0:2.2.3-11.el5_2.centos.4 set to be updated
- > Running transaction check
- > Processing Dependency: php-cli = 5.1.6-20.el5_2.1 for package: php
- > Processing Dependency: php-common = 5.1.6-20.el5_2.1 for package: php
- > Restarting Dependency Resolution with new changes.
- > Populating transaction set with selected packages. Please wait.
- > Package php-cli.i386 0:5.1.6-20.el5_2.1 set to be updated
- > Package php-common.i386 0:5.1.6-20.el5_2.1 set to be updated
- > Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
============================================================================= Installing:
php i386 5.1.6-20.el5_2.1 updates 1.1 M
Updating:
httpd i386 2.2.3-11.el5_2.centos.4 updates 1.1 M
Installing for dependencies:
php-cli i386 5.1.6-20.el5_2.1 updates 2.1 M php-common i386 5.1.6-20.el5_2.1 updates 154 k
Transaction Summary ============================================================================= Install 3 Package(s) Update 1 Package(s) Remove 0 Package(s)
Total download size: 4.5 M Is this ok [y/N]: y Downloading Packages: (1/4): php-cli-5.1.6-20.e 100% |=========================| 2.1 MB 00:02 (2/4): php-common-5.1.6-2 100% |=========================| 154 kB 00:00 (3/4): php-5.1.6-20.el5_2 100% |=========================| 1.1 MB 00:01 (4/4): httpd-2.2.3-11.el5 100% |=========================| 1.1 MB 00:01 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction
Installing: php-common ######################### [1/5] Installing: php-cli ######################### [2/5] Updating : httpd ######################### [3/5] Installing: php ######################### [4/5] Cleanup : httpd ######################### [5/5]
Installed: php.i386 0:5.1.6-20.el5_2.1 Dependency Installed: php-cli.i386 0:5.1.6-20.el5_2.1 php-common.i386 0:5.1.6-20.el5_2.1 Updated: httpd.i386 0:2.2.3-11.el5_2.centos.4 Complete! [root@localhost ~]# [root@localhost ~]# [root@localhost ~]# service httpd status httpd は停止しています [root@localhost ~]# [root@localhost ~]# [root@localhost ~]# chkconfig --list httpd httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@localhost ~]# [root@localhost ~]# [root@localhost ~]# chkconfig httpd on [root@localhost ~]# [root@localhost ~]# [root@localhost ~]# chkconfig --list httpd httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@localhost ~]# [root@localhost ~]# [root@localhost ~]# service httpd start httpd を起動中: [ OK ] [root@localhost ~]# pwd /root [root@localhost ~]# [root@localhost ~]# [root@localhost ~]# cd /var/www/html/ [root@localhost html]# ls [root@localhost html]# vi test.php