首页 > 代码库 > Centos6.5下安装php
Centos6.5下安装php
安装php:
yum -y install php
重启httpd服务激活php:
/etc/init.d/httpd restart
测试php是否安装完成
vim /var/www/html/info.php
<?php
phpinfo();
?>
安装php的组件:
搜索php组件:
yum search php
安装常用组件:
yum -y install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xmlphp-xmlrpc php-bcmath php-mbstring
记得安装完要重启httpd服务激活组件:
/etc/init.d/httpd restart
php配置文件:
vi/etc/php.ini
memory_limit=128M
post_max_size=8M
upload_max_filesize=2M
一条命令安装:
yum-y install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-develzlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-develfreetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel mysql-devel net-snmp-develcurl-devel perl-DBI mysql mysql-server httpdphp php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-bcmath php-mbstring
Centos6.5下安装php