1. ip设置(simple)
2. 中文输入法配置:
sudo apt-get install ibus ibus-clutter ibus-gtkibus-gtk3 ibus-qt4(ibus框架配置)
sudo apt-get install ibus-googlepinyin
(一般重启电脑才能生效,然后设置一下)
3. ssh安装
sudoapt-get install ssh openssh-server
4. 安装python基本工具
python-pip python-dev build-essential python-setuptools的安装
5. Xapain_weibo安装
a. 配置分词http://www.ftphp.com/scws/docs.php#instscws
需要注意的是修改文件权限:
sudo wget http://www.x
sudo tar xvjf scws-dict-cht-utf8.tar.bz2
sudo chmod 664 dict_cht.utf8.xdb
sudo chmod 664 dict.utf8.xdb
b. 安装pyscws:python setup.py install
c. 路径设置(保证import scws不报错):进入home自己的目录下(~)
ls –a找到.bashrc打开(gedit方法)第一行添加export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/scws/lib;然后source一下保存
但是这个只能保证当前用户使用而不是全局修改,另一种方法在/etc/ld.so.conf中添加一行/usr/local/scws/lib/,然后sudo ldconfig
d. 进入xapian_weibo安装(包括相关依赖包filelock,zmq,opencc等)
其中opencc安装如下:
sudo apt-get install opencc
pip install opencc-python
可能报错,则wget http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py(这个方法有问题,解决方法是把distribute_setup.py放到opencc安装包下import)
gensim的安装:
sudo apt-get install python-numpy python-scipy
pip install gensim
额外配置内容:
ssh公钥直接登录怎么配置?
以下是配置过程mirage@mirage:~/.ssh$ ssh-keygen -t rsa -C "lijunli2598@gmail.com "Generating public/private rsa key pair.Enter file in which to save the key (/home/mirage/.ssh/id_rsa): /home/mirage/.ssh/id_rsa_arthasEnter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/mirage/.ssh/id_rsa_arthas.Your public key has been saved in /home/mirage/.ssh/id_rsa_arthas.pub.The key fingerprint is:e6:5f:c1:54:42:d4:46:ad:01:e4:2d:ce:3c:b9:17:77 lijunli2598@gmail.com The key's randomart image is:+--[ RSA 2048]----+| +*+o. || . ++ .|| +..o || * o. || S O . E|| o + o.|| . o . || . . . || . |+-----------------+mirage@mirage:~/.ssh$ ssh arthas@219.224.135.61 'mkdir -p .ssh && cat >> .ssh/authorized_keys' < ~/.ssh/id_rsa_arthas.pubarthas@219.224.135.61's password:mirage@mirage:~/.ssh$ ssh arthas@219.224.135.61arthas@219.224.135.61's password:Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-37-generic x86_64)* Documentation: https://help.ubuntu.com/ *** System restart required ***Last login: Mon Oct 21 10:19:53 2013 from mirage至此,已经完成一半了,已经可以免密码登录了,但没有省略ipmirage@mirage:~/.ssh$ vi config在文件中写入以下内容:Host arthasHostName 219.224.135.61User arthasIdentityFile ~/.ssh/id_rsa_arthas以下为配置标注:Host arthas 这个是需要最终配置的{host},登录用ssh {host}HostName 219.224.135.61 这个是目标机器的ip 即为ssh arthas@219.224.135.61的后半部分User arthas 这个是目标机器的host,即为ssh arthas@219.224.135.61的前半部分IdentityFile ~/.ssh/id_rsa_arthas 这个是上面生成ssh key的私钥的路径,而传到目标服务器上的是公钥~/.ssh/id_rsa_arthas.pub即可用arthas直接登录mirage@mirage:~/.ssh$ ssh arthasWelcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-37-generic x86_64)* Documentation: https://help.ubuntu.com/ *** System restart required ***Last login: Mon Oct 21 10:31:01 2013 from mirage