Home  >  Article  >  Backend Development  >  cenos 安装php环境

cenos 安装php环境

WBOY
WBOYOriginal
2016-06-23 13:15:44900browse

yum -y install httpd mysql mysql-server php php-mysql postgresql postgresql-server php-postgresql php-pgsql php-devel


启动apache服务并查看时候启动成功

命令如下:(切记用root用户启动服务)

           启动:/etc/rc.d/init.d/httpd start

           检测启动结果:ps aux | grep httpd

查看服务器的ip并进入网站根目录新建一个phpinfo.php的程序,用于查看php相关配置信息。

cd /var/www/html


如果上述进展顺利,那我们接下来进行mysql数据库的配置

命令如下:

             启动:  /etc/rc.d/init.d/mysqld start

             检查启动结果:  netstat -tulnp | grep :3306

              修改root密码: mysqladmin -u root password ‘你想设置的密码’




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