linux环境启php项目

2023-02-20  本文已影响0人  _Irving

上文已经讲过mysql的安装

apache安装

#安装
[root@localhost ~]# yum install -y httpd
#修改配置文件
[root@localhost ~]# vim  /etc/httpd/conf/httpd.conf
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
ServerName 192.168.213.132:80     #修改此处
#启动
[root@localhost ~]# systemctl start httpd.service
查看错误日志
[root@localhost ~]# tail -f /var/log/httpd/error_log

安装php

安装php
[root@localhost ~]# yum install -y php
//安装组件,支持mysql
[root@localhost ~]#yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt

项目启动

[root@localhost html]# pwd
/var/www/html
[root@localhost html]# ll
total 12
drwxrwxr-x. 13 wanchao wanchao 8192 Feb 19 22:26 bWAPP
// Database connection settings
$db_server = "localhost";
$db_username = "root";
$db_password = "123456";
$db_name = "bwapp";
[root@localhost html]# systemctl restart httpd.service
登录页面
上一篇 下一篇

猜你喜欢

热点阅读