centos start apache

282 阅读1分钟

1.开启apache

systemctl start httpd 或者 service httpd restart

2.启动mysql

systemctl start mysql

3.service php-fpm start

如果报错,怎么解决

php-fpm配置文件:/etc/php-fpm.d/www.conf php-fpm error.log 位置:/var/log/php-fpm/error.log

4.查看php-fpm服务的状态

systemctl status php-fpm.service

5.访问phpinfo信息可以,但是访问wordpress的其他php文件报错:系统内部错误。

日志找不到,可以看phpinfo中的error_log,如果没有设置,则去/etc/php.ini中设置,重启apache:service httpd restart,然后就有error日志了

6.安装ftp

yum install -y vsftpd 开启ftp服务:systemctl start vsftpd.service 查看ftp服务状态:systemctl status vsftpd.service 设置ftp服务开机自启动:systemctl enable vsftpd.service 设置防火墙:systemctl restart firewalld firewall-cmd --permanent --zone=public --add-service=ftp firewall-cmd --reload

ftp配置文件路径:/etc/vsftpd/vsftpd.conf

7.防火墙

解锁防火墙:systemctl unmask firewalld 加锁防火墙:systemctl mask firewalld 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld 开机启用 : systemctl enable firewalld

8.查看是否安装telnet

rpm -qa | grep telnet 安装telnet:yum install telnet-server

9.ftp账号

新建一个ftp账号