Home >Operation and Maintenance >Linux Operation and Maintenance >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
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!