Home >Operation and Maintenance >Linux Operation and Maintenance >How to build a php website in linux system

How to build a php website in linux system

王林
王林Original
2019-10-16 16:11:265931browse

How to build a php website in linux system

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 website in linux system

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: Linux video tutorial

The above is the detailed content of How to build a php website in linux system. 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