`
刘逸君
  • 浏览: 37703 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

nodejs和redis安装

阅读更多

如果执行下面的node.js安装出现如下错误
/home/vlance/www/node-v0.6.10/wscript:374: error: Could not autodetect OpenSSL support. Make sure OpenSSL development packages are installed. Use configure --without-ssl to disable this message.
执行下面命令
sudo apt-get install libssl-dev

ubuntu下安装node.js error could not configure a cxx compiler configure

需要安装g++/c++
命令行中输入:

sudo apt-get install build-essential libssl-dev curl git-core

再输入下面的命令就可以了

./configure
make
sudo make install
node.js环境安装
https://github.com/joyent/node/wiki/Installation
1.下载
wget http://nodejs.org/dist/v0.6.10/node-v0.6.10.tar.gz
2.解压
tar zxvf node-v0.6.10.tar.gz
3.配置和安装
cd node-v0.6.10
./configure --prefix=/opt/node
make
make install
4.配置全局变量
#vi /etc/profile
export PATH=$PATH:/opt/node/bin

# source /etc/profile ##使环境变量生效



redis安装

$ wget http://redis.googlecode.com/files/redis-2.4.17.tar.gz
$ tar xzf redis-2.4.17.tar.gz
$ cd redis-2.4.17
$ make

修改配置文件
$ cd redis-2.4.17
$ vi redis.conf
修改 
       daemonize yes
       bind 172.17.187.69
       requirepass 12345
保存
$ cd redis-2.4.17
$ cd  src
$ ./redis-server  ../redis.conf

查看进程
netstat -npl|grep 6379

安装php的redis扩展
https://github.com/nicolasff/phpredis/downloads
下载扩展包
nicolasff-phpredis-2.2.2-48-g7dfac44.tar.gz
查看目录 whereis phpize
/usr/bin/phpize
./configure
make
sudo make install
如果没有phpize扩展
apt-get install php5-dev
就有了


安装nochat
$ cd nochat
修改配置文件
/home/vlance/www/NoChat/config.js
redis 端口号,地址,密码
redis: [6379, '172.17.187.37','12345'],
memcached 地址:端口号
memcached: ['172.17.187.37:12000']

安装依赖包
$ npm install
启动
$ node app
nohup node app.js > nochat.log &


php客户端
/home/vlance/www/vlance/themes/default/js/chat/webim.js
修改连接地址
var HOST = "http://172.17.187.37"



svn状态查看

netstat -npl|grep 3690

svnserve -d -r /home/vlance/svn-repos --listen-host 192.168.0.57 启动svn

关闭
killall svnserve


memcached 启动

/usr/bin/memcached -d -m 10 -u vlance -p 12000 -c 256 -P /tmp/memcached.pid

查看
netstat -npl|grep 12000
ps -ef |grep memcached

redmine启动

cd /opt/redmine-1.4
./redmine start

查看
netsat -npl|grep 3000

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics