rethat / CentOS环境配置

rethat安装 --- (1)更改编码zh_CN.US --> zh_CN.UTF-8 vi ~/.bashrc --- export LC_ALL=zh_CN.UTF-8 (开机启动加载) #source ~/.bashrc (网上说/etc/sysconfig/i18n文件修改LANG的设置为 LANG="zh_CN.GBK" LANGUAGE="zh_CN.GBK:zh_CN.GB18030:zh_CN.GB2312:zh_CN" SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16" 然后在/etc/profile文件增加export LC_ALL=zh_CN.GBK内容。使得全部的LC*都统一了。 ) vi ~/.vimrc ---- set encoding=utf-8 set fileencodings=gbk,utf8,gb2312 SecureCRT ---- 会话选项 --- 字符编码 utf-8 ### 总之三者要统一即可 (2)vi ~/.vimrc 更改 ---> 从其它地方迁移过来的 scp -r 10.134.72.227:/search/yapeng/_dev/wx_JK/Query/LoadTagDocList_* ./ vi ~/.vimrc 没有 该文件认是没有的。。。 gbdt安装python版本------ **pip源码安装;***yum install python-devel.x86_64 yum install python27-python-devel.x86_64 ---> pip install numpy >= 0.6 && pip install SciPy >= 0.9 ; (numpy.distutils.system_info.NotFoundError: no lapack/blas resources found) ---> yum install blas* && yum install lapack* ---> pip install SciPy ( python -c "import scipy; print scipy.__version__") & pip install sklearn (3)yum 安装以及更改yum的源 --- cd etc/yum.repos.d 文件夹下面的东西从 scp -r 10.134.72.227:/search/yapeng/_dev/wx_JK/Query/LoadTagDocList_* ./ (4)wx_JK依赖安装 yum list; yum list installed; yum list | grep "mongo"; yum install ssplatform2-devel xerces-c-devel ace-devel qdb-devel json-c-devel MysqL-devel sohumisc-devel libcurl-devel sohudb2a-devel libxml2-devel memcached-devel libmemcached-devel protobuf-devel thrift-lib-cpp-devel libmongodb-devel sasn1b-devel fb303-devel crypto-utils mongodb-devel jemalloc-devel(来及海龙的邮件) (5)svn co http://svn.sogou-inc.com/svn/websearch4/web/web_nlp/Recommendation/branches/weixin_headlines_independent/branch/yapeng web_base = http://svn.sogou-inc.com/svn/websearch4/web/web_base/tags/web.web_base.20120919.a web_tpage = http://svn.sogou-inc.com/svn/websearch4/web/web_tpage/tags/web.xpage.20120531.a ssplatform-encoding = http://svn.sogou-inc.com/svn/rd_modules/encoding/tags/web.ssplatform-encoding.20120405.a FROM : scp -r 10.134.72.227:/search/yapeng/_dev/wx_JK/Query/LoadTagDocList_* ./ (6)autoreconf -isv; make clean; ./configure --prefix=/search/yapeng/_dev/wx_jk; make -j vim 插件安装与使用 (6-1)http://blog.csdn.net/daniel_ustc/article/details/8299096 -- ctags 与 tagslist安装与使用 配置 $cd taglist/ $cp doc/taglist.txt /usr/share/vim/vim72/doc/ $cp plugin/taglist.vim /usr/share/vim/vim72/plugin/ 基本上配置完成 启动vim,用 “:helptags .”来配置好帮助文件 重启vim,用“:TlistToggle”来打开和关闭taglist窗口。 可以用“:help taglist”来获得更多帮助信 若要认打开taglist,_vimrc中加入 (6-2) http://yaronspace.cn/blog/archives/682 -- vim中两个实用插件doxygen和projects的安装与使用 DoxygenToolkit:它会根据配置自动生成注释,主要是license注释、文件注释、函数及类注释 --- http://yaronspace.cn/blog/archives/682 1,下载地址:http://www.vim.org/scripts/script.PHP?script_id=987 并将其解压到$home/.vim/目录下 2,修改.vimrc的配置,加入自己对Doxygen的配置“doxygen setting Project(暂时未实现) 该插件可以把文件组织成一棵树的形式,以便于查找和管理。使用命令“:Project”即可打开一个用户的“项目文件” (~/.vimprojects)。项目文件采用普通的文本文件的形式,非常易于浏览和修改 (6-3) https://github.com/vim-scripts/AutoComplPop--- VIM认情况下不支持自动代码提示功能Ctrl+X 与 Ctrl+P 可以进行代码提示 安装Autocomplpop插件 --- L9 library must be installed! ---- http://www.vim.org/scripts/script.PHP?script_id=3252 unzip ns9tks-vim-autocomplpop-13fe3d806464.zip -d autocomplpop ll | grep -E 'auto.*|doc|plugin' --color 其中grep -E 相当于egrep,可以使用egrep进行多个关键字的匹配 (7)hostname -i 未知的主机 --- 需要首先hostname IP设置一下 127.0.0.1 localhost.localdomain localhost hosts文件格式是一行一条记录,分别是IP地址 hostname aliases,三者用空白字符分隔,aliases可选。 127.0.0.1到localhost这一条建议不要修改,因为很多应用程序会用到这个,比如sendmail,修改之后这些程序可能就无法正常运行。 修改hostname后,如果想要在本机上用newhostname来访问,就必须在/etc/hosts文件添加一条newhostname的记录。比如我的eth0的IP是192.168.1.61,我将hosts文件修改如下: #hostname www.cthome.com 1,下载地址 http://www.vim.org/scripts/script.PHP?script_id=69 并将其解压到$HOME/.vim/ 2,暂不用修改.vimrc配置 3,Project 的测试和初始化 1 打开vim后敲入命令 : Project,可以看到project的列表,不过因为没有初始化暂时是空的 2 输入\C (shift+c),会出现下面这些信息 Enter the Name of the Entry: ProjectSrouce (项目名称) Enter the Absolute Directory to Load: /home/Project/src (项目根目录) Enter the CD parameter: . (“.”为当前目录)或者和项目根目录一致 Enter the File Filter: (符合条件的源文件) 来自yaronspace.cn 本文链接:http://yaronspace.cn/blog/archives/682 (6-3) https://github.com/vim-scripts/AutoComplPop--- VIM认情况下不支持自动代码提示功能Ctrl+X 与 Ctrl+P 可以进行代码提示 安装Autocomplpop插件 --- L9 library must be installed! ---- http://www.vim.org/scripts/script.PHP?script_id=3252 unzip ns9tks-vim-autocomplpop-13fe3d806464.zip -d autocomplpop ll | grep -E 'auto.*|doc|plugin' --color 其中grep -E 相当于egrep,可以使用egrep进行多个关键字的匹配 (7)hostname -i 未知的主机 --- 需要首先hostname IP设置一下 127.0.0.1 localhost.localdomain localhost hosts文件格式是一行一条记录,分别是IP地址 hostname aliases,三者用空白字符分隔,aliases可选。 127.0.0.1到localhost这一条建议不要修改,因为很多应用程序会用到这个,比如sendmail,修改之后这些程序可能就无法正常运行。 修改hostname后,如果想要在本机上用newhostname来访问,就必须在/etc/hosts文件添加一条newhostname的记录。比如我的eth0的IP是192.168.1.61,我将hosts文件修改如下: #hostname www.cthome.com # cat /etc/hosts 127.0.0.1 localhost.localdomain localhost 192.168.1.61 www.cthome.com blog 这样,我就可以通过blog或者www.cthome.com来访问本机。 (8)memcached ----- [cmongo:LM_INFO] [20160407 11:22:49] [fc95e860] open mongo db succ! 195 memcached server test Failed 196 [CMongoDBClient:LM_ERROR] [20160407 11:22:49] [fc95e860] [Initialize] can't open memcache 127.0.0.1:7012 error 197 [Initialize]CWXDataMiddleware Initial DBClient error] 198 [remind_daemon:LM_ERROR] [20160407 11:22:49] [fc95e860] [Initialize]read CWXDataMiddleware config error 199 [remind_daemon:LM_ERROR] [20160407 11:22:49] [fc95e860] CLoadPageTask Initialize falied! [@10.134.105.160 Client]# memcached -d -m 4096mb -c 1024 -t 16 -p 7012 -u root ---- 这将会启动一个占用4G内存的进程,并打开7012端口用于接收请求,由于32位系统只能处理4G内存的寻址,所以在大于4G内存使用PAE的32位服务器上可以运行2-3个进程,并在不同端口进行监听。 Memcached 是一个性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载。它通过在内存中缓存数据和对象来减少读取数据库次数,从而提高动态、数据库驱动网站的速度。Memcached基于一个存储键/值对的hashmap。其守护进程(daemon )是用C写的,但是客户端可以用任何语言来编写,并通过memcached协议与守护进程通信。 ### ps aux | grep mem root 13987 0.0 0.0 1251800 13188 ? Ssl Apr13 0:12 memcached -d -m 4096mb -c 1024 -t 16 -p 7012 -u root root 20440 0.0 0.0 105416 888 pts/2 S+ 17:08 0:00 grep mem [@10.134.105.160 Client]# netstat -apt | grep "mem" tcp 0 0 *:talon-engine *:* LISTEN 16142/memcached [@10.134.105.160 Client]# netstat -apt | grep "7012" [@10.134.105.160 Client]#   yum -y install memcached 设置为开机启动   chkconfig --level 2345 memcached on 启动和停止   /etc/init.d/memcached start|stop or service MysqL restart 补充:如果安装缺少其他支持,可以: yum groupinstall "Development Tools" (8-2)使用 crontab -e 添加定时任务时,遇到如下错误“ Error detected while processing /root/.vimrc: ”: [root@~]# crontab -e Error detected while processing /root/.vimrc: line 30: E518: UnkNown option: fdm=Syntax line 34: E518: UnkNown option: autochdir 第一种方法: 直观地,根据提示,应该是不支持fdm和autochdir指令,只需要判断下是否支持指令,如下: [root@~]# vim ~/.vimrc "" not in vi 指令列表配置 if has("fdm") "" 代码折叠 set fdm=Syntax "" catgs配置解决E257问题 http://blog.csdn.net/billfeller/article/details/40316501 set tags=tags; set autochdir endif 此时即可使用crontab -e编辑定时任务。 第二种方法修改认编辑器: [root@~]# vim ~/.bashrc export EDITOR=/usr/bin/vim [root@~]# source ~/.bashrc 此时即可使用crontab -e编辑定时任务。

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native