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

How to build a php site in linux

王林
Release: 2023-02-26 16:20:02
Original
3556 people have browsed it

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
Copy after login

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:清空防火墙
Copy after login

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

chown -R apache www: 修改权限
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template