Home  >  Article  >  Backend Development  >  用yum安装Apache,PHP

用yum安装Apache,PHP

WBOY
WBOYOriginal
2016-06-23 13:40:46908browse

1安装Apache 

yum install httpd httpd-devel 


安装完成后,用/etc/init.d/httpd start 启动apache 


设为开机启动:chkconfig httpd on 


2. 安装php 

yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml 


/etc/init.d/httpd start 


3. 测试一下 
4在/var/www/html/新建个test.php文件,将以下内容写入,然后保存。 
 
phpinfo(); 
?> 
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn