Browsing "linux"
Feb 7, 2013 - linux, node.js    No Comments

Centos6.3安装Python-2.7.3和Nodejs-0.8.18和npm

由于node.js的最新版本都要求python的版本在2.7以上,所以要先升级python。查看一下现有python的版本

python -v

可以看出,Centos5.6的python版本是2.6,ctrl+d 退出python。

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar xjf Python-2.7.3.tar.bz2

因为安装node.js需要用到bz2,所以先手动安装bz2库

sudo yum install -y bzip2*   
cd Python-2.7.3/Modules/zlib  
./configure   
make  
sudo make install

Screen Shot 2013-02-07 at 11.08.44 AM
Read more »

Dec 26, 2012 - linux    No Comments

CentOS install vsftpd

熟门熟路三部曲

$ yum -y install vsftpd
$ chkconfig vsftpd on
$ service vsftpd start

防火墙里开21端口

$ vi /etc/sysconfig/iptables

添加一行:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

重启iptables

$ service iptables restart

Read more »

Dec 11, 2012 - linux    2 Comments

Save CentOS permissions

$ chmod -R 777 /

如果你不小心输入了这条命令,并打了回车,那么请千万不要reboot你的机器。否则就认真照着下面一步一步做吧!

重启后,你会发现你的root账号不能登录了,ssh也连不上了,mysql自然也连不上了。一切工作都只能停下来了。还好,我们可以通过single模式进入root账号

1. 在系统启动时按e,选择要进入的内核

Read more »

Pages:«123»