Home >Backend Development >PHP Problem >How to build a php site in linux

How to build a php site in linux

王林
王林Original
2019-10-14 17:56:533561browse

How to build a php site in linux

1. Install related software php apache mysql mysql-server php-mysql

yum -y install php httpd mysql mysql-server php-mysql

How to build a php site in linux

2. Start the service

service httpd start :启动apache服务
service mysqld start :启动mysql服务
mysqladmin -uroot password 123456 :设置mysql的登录密码
mysql -uroot -p123456 :登录mysql数据库
iptables -F:清空防火墙

3. Download the source code of a PHP website online and copy it to the /var/www/html directory

chown -R apache www: 修改权限

Recommended tutorial: PHP video tutorial

The above is the detailed content of How to build a php site in linux. For more information, please follow other related articles on the PHP Chinese website!

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