Linux环境

本章是Linux环境下的配置和使用说明

软件安装在/data/nodejs表示nodejs不同的版本号,以下不再单独说明)。

首页对应目录:/data/nodejs*/apache2/htdocs,该目录包含首页index等文件。

版本:Apache 2.4.20 、Node.js 6.2.2、Python 2.7、Redis 3.2.1

服务随操作系统自动启动,如果修改配置参数后,需要手工启停服务。

[root@iZ94bojtvkpZ nodejs-6.2.2]# cd /data/nodejs-6.2.2 [root@iZ94bojtvkpZ nodejs-6.2.2]# ./ctlscript.sh -h usage: ./ctlscript.sh help ./ctlscript.sh (start|stop|restart|status) ./ctlscript.sh (start|stop|restart|status) apache ./ctlscript.sh (start|stop|restart|status) redis

help – this screen start – start the service(s) stop – stop the service(s) restart – restart or start the service(s) status – show the status of the service(s)

举例:

[root@iZ94bojtvkpZ nodejs-6.2.2]# ./ctlscript.sh restart Syntax OK /data/nodejs-6.2.2/apache2/scripts/ctl.sh : httpd stopped /data/nodejs-6.2.2/redis/scripts/ctl.sh : redis stopped /data/nodejs-6.2.2/redis/scripts/ctl.sh : redis started Syntax OK /data/nodejs-6.2.2/apache2/scripts/ctl.sh : httpd started at port 80

If you find any problem starting Redis, the first place you should check is
the Apache error log file:

/data/nodejs*/redis/var/log/redis-server.log.

Most errors are related to not being able to listen to the default port.
Make sure there are no other server programs listening at the same port
before trying to start Redis. For issues not covered in this Quick Start guide, please refer to
the Redis documentation, which is located at http://redis.io/documentation

Last updated