您的位置:首页 > 运维架构 > Linux

Linux部署web项目

2015-08-25 00:00 579 查看
一、软件
1、putty
2、WinSCP

二、调试
1、linux 下 apache启动、停止、重启命令
基本的操作方法:
本文假设你的apahce安装目录为/usr/local/apache2,这些方法适合任何情况
apahce启动命令:
推荐/usr/local/apache2/bin/apachectl start apaceh启动
apache停止命令
/usr/local/apache2/bin/apachectl stop 停止
apache重新启动命令:
/usr/local/apache2/bin/apachectl restart 重启
要在重启 Apache 服务器时不中断当前的连接,则应运行:
/usr/local/sbin/apachectl graceful
如果apache安装成为linux的服务的话,可以用以下命令操作:
service httpd start 启动
service httpd restart 重新启动
service httpd stop 停止服务

Linux系统为Ubuntu
一、Start Apache 2 Server /启动apache服务
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start
二、 Restart Apache 2 Server /重启apache服务
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
三、Stop Apache 2 Server /停止apache服务
# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop

2、linux下,php网站的网页内容显示不出来
一般来说空白的内容的php页面应该是php错误。默认的lamp配置都是比较严格的,没有显示错误。
你可以这样配置:
1、修改php.ini(如:/etc/php5/apache2/php.ini)文件中的:
error_reporting = E_ALL
display_errors = On
2、在php页面中添加
error_reporting(E_ALL);
ini_set("display_errors","On");

这两个都是开始错误提示。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: