首页 > 代码库 > Linux搭建PHP环境(LAMP)

Linux搭建PHP环境(LAMP)

//安装Apache的命令

# yum install httpd

//启动Apache的命令

# service httpd start


//安装MySQL的命令

# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

# rpm -ivh mysql-community-release-el7-5.noarch.rpm

# yum install mysql-community-server

//启动MySQL的命令

# service mysqld start

//设置MySQL管理员密码的命令(注:root为管理员密码)

# SET PASSWORD=PASSWORD(‘root‘);

//安装PHP的命令

# rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm

# yum -y install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc

# yum -y install php


Linux搭建PHP环境(LAMP)