gongzijingshang的个人博客分享 http://blog.sciencenet.cn/u/gongzijingshang

博文

centos

已有 6094 次阅读 2017-1-1 17:58 |系统分类:科研笔记

初始科研设置

http://blog.csdn.net/QZC295919009/article/details/42708653

1,设计快捷键

    www.pc811.com/6/1/26096.html

Centos 7

linux.it.net.cn/CentOS/fast/2015/0330/14264.html

2,idl 安装 https://zhuanlan.zhihu.com/p/20475601?columnSlug=astronomy#!

 1)

   首先是Linux版:pan.baidu.com/s/1jG1Nku

   然后是Windows版:pan.baidu.com/s/1eQip6C

2)

  首先建立安装目录:sudo mkdir /usr/local/itt/

  将安装包移动到安装目录:sudo mv idl711linux.x86.tar.gz /usr/local/itt/

  然后从终端进入“/usr/local/itt/”:cd /usr/local/itt/

  解压idl包:sudo tar zxvf idl711linux.x86.tar.gz

 删掉压缩包:sudo rm idl711linux.x86.tar.gz

 执行安装文件:sudo ./install

 基本上就是一路y和回车,协议部分回车是向下翻页。装好以后把license.dat移动到license文件夹里          去:sudo mv license.dat /usr/local/itt/license

3,error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory 的解决  

  yum install libXp

$ yum search libXp
( Will list libXp.i686, libXp.x86_64. Both can be installed.)

# yum install libXp.<arch>

4,中文输入法

  1)su

       yun install "@Chinese Suppport"

  2)在Systen/Prreference/input Method 里设置

     在Enable input method feature 前打勾

     在input Method Perences  里选 input Method 的 Chinese-Pinyin

Centos 7

blog.csdn.net/alex_my/article/details/38223449

5,python升级到2.7  http://www.aichengxu.com/view/11060319

    1.准备工作    

   yum -y install gcc wget xz unzip zlib-devel openssl openssl-devel sqlite-devel
   2.下载源码    

   wget  https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tar.xz[/code]3.解压:

   xz -d Python-2.7.12.tar.xz         tar xf Python-2.7.12.tar         cd Python-2.7.12         ./configure --prefix=/usr/local/python         make         make install  3.替换系统自带Python    
   安装后,Python 2.7.8的可执行文件位于/usr/local/python/bin。先将系统自带的Python重命名为python2.6.6,再创建新的Python到/usr/bin目录下的符号链接。    

   mv /usr/bin/python /usr/bin/python2.6.6         ln -sv /usr/local/python/bin/python2.7 /usr/bin/python  4.修正yum    
   现在,系统默认调用Python 2.7.12,执行yum会出现错误。    
   解决方法:将/usr/bin/yum文件开头的第一行代码:    

   #!/usr/bin/python
   改为:    

   #!/usr/bin/python2.6.6    到此python2.7.12安装完成    
   接下来安装ipython


6,  Centos  安装

     blog.csdn.net/jcjc918/article/details/9412757

      分区:/200G

              swap 32G

              /boot 1000M

             /home 剩余

7,同一窗口打开文件夹设置

   

    系统默认的行为,有很多地方与ubuntu操作习惯不一样,其中一个最让我不能忍受的就是,每次双击文件 夹,都会在一个新窗口打开,而且打开的文件夹不像 windows那样,有后退/向上按钮,也没有文件夹的具体路径。如果一个文件夹的路径很深,则需要打开n多的窗口才能找到最终想要的。

后来研究了一下,发现这个问题也可以通过设置改变一下,方法如下:

    1,打开一个文件夹

    2,编辑 - 首选项 - 行为,勾选“总是在浏览器窗口打开”,点击关闭。

    这样,双击打开文件夹窗口的模样就与之前大不相同了。久违的前进/后退/向上按钮出现了,而且还可  以通过点击上方的一个按钮,切换路径的显示模式。这样看起来舒服多了,真想不明白为什么不将这个作为默认的打开方式。

另外,无意中发现,似乎,用鼠标滚轮双击文件夹,可以不弹出新窗口而打开文件夹,很奇怪的鼠标行为。


8, kate 安装

   

      Kate is my favorite editor in Linux. Because, this editor have many of feature and konsole feature. When install the Centos 6.3, I dont get this editor in my linux. I am try to use command “yum search kate“, but dont get this program. When searching over google, I get a method how Centos install kate. Kate was actually part of kdesdk in the ancient version of KDE shipped in CentOS 6. This is a command to install Kate in centos :


1
yum install kdesdk

用法:

http://bandari.fans.blog.163.com/blog/static/169418906201252910488835/

https://kate-editor.org/about-kate/

为了使用终端

 konsole is in package: kdebase

 So You have to perform:


                    yum install kdebase


    It's huge package and probably it will require a lot of others. Simply
   speaking, if You want to have 'konsole' You've got to install most of KDE


9,okular安装

  yum install kdegraphics

  okular是kdegraphics的一部分,直接yum install okular是找不到安装包的,但在其他linux下

  似乎可以直接yum install okular



10,Centos 源更新

 1,备份

 2,下载新源

 3,运行yum clean all、yum makecache生成缓存

几个源址:

教育网资源:

1 上海交大: http://ftp.sjtu.edu.cn/centos/

服务器位于北京,中国教育网网络中心,下载速度高达十M。
北方用户与教育网用户推荐,速度飞快。

需要手动创建 CentOS-Base.repo文件。

2 中国科技大学:http://centos.ustc.edu.cn

服务器位于合肥。 南方用户推荐。 同样的,CenOS版本非常丰富,适合长期使用。


非教育网资源:

1 sohu的开源镜像服务器:http://mirrors.sohu.com/

服务器位于山东省联通

2 网易的开源服务器镜像: http://mirrors.163.com/centos
速度也不错,全国用户推荐


出问题的.repo 重命名为.repoold啥的

安装remi.repo一台机子一个key

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

yum install remi-release-6.rpm



11,看.eps postscript 文件

1,yum install ghostscript  

     gs *.eps

      gs2pdf   *.eps

2,gv


3,Document viewer

   个人觉得这个系统自带的查看文件很方便,但Centos6.8 updata 过后打不开.eps文件,这是由于

   /usr/share/ghostscript/8.70/Resource/Init   下的 gs_init.ps 文件出现错误,在其他人机子上拷一个正  确的版本替换掉就可以了*^_^*

 

 http://centosfaq.org/centos/ghostscript-update-breaks-evince/  



12, Centos 的科研设置

 

   http://www.cnblogs.com/vigarbuaa/p/4340481.html


13,  添加路径到PATH中去

     1,profile

                 vi /etc/profile

                  export PATH=/bin:$PATH

                  这个对所有用户都有效

        2,bashrc

                   vi  ~/.bashrc

                   export PATH=/bin:$PATH

        3查看添加结果

                     echo  $PATH


14  Centos6 修改max user processes limits


http://www.cnblogs.com/milton/p/5035689.html



15  如何后台运行idl  

nohup idl  run.txt >  PROCESS.txt&

   run.txt:idl 中运行的命令    

   PROCESS.txt  终端输出的结果



16, pdf合并

网上软件

http://www.pdfdo.com/pdf-merge.aspx


第一步:安装依赖

yuminstallgccgcc-c++libXrandrgtk2libXtstlibart_lgpl

第二步:安装libgcj,由于用镜像找不到它只能手动下载
http://download.csdn.net/detail/u010392801/9476245

rpm -ivh --nodeps libgcj-4.4.7-16.el6.x86_64.rpm
  • 1

第三部:安装PDFtk

wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.el6.x86_64.rpm
  • 1

yum install pdftk-2.02-1.el6.x86_64.rpm
  • 1

打开terminal输入

which pdftk

就可以看到/usr/bin/pdftk证明已经安装成功了


pdftk *.pdf output  all.pdf



17,挂载硬盘

mkdir usb
fdisk -l
yum search ntfs
yum install ntfs-3g.x86_64
mount -t ntfs-3g /dev/sdb1/ /media/usb/


18,记录终端内容


script  recort.txt


20,anaconda 安装

注意:安装的时候不要用root(或者sudo权限)http://www.cnblogs.com/catmelo/p/4145035.html


http://www.cnblogs.com/wujiadong2014/p/5827601.html

在官网下载需要的版本

https://www.continuum.io/downloads#linux

进入相应的目录

运行 bash Anaconda2-4.4.0-Linux-x86_64.sh
然后一路enter或者yes

exportPATH="/home/js/soft/anaconda/bin:$PATH"   (anaconda所在的目录)


21,FoxitReader 安装

在终端运行FoxitReader报错

/opt/foxitsoftware/foxitreader/FoxitReader: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /opt/foxitsoftware/foxitreader/FoxitReader)
/opt/foxitsoftware/foxitreader/FoxitReader: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /opt/foxitsoftware/foxitreader/FoxitReader)
/opt/foxitsoftware/foxitreader/FoxitReader: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/foxitsoftware/foxitreader/FoxitReader)
/opt/foxitsoftware/foxitreader/FoxitReader: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /opt/foxitsoftware/foxitreader/FoxitReader)
/opt/foxitsoftware/foxitreader/FoxitReader: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /opt/foxitsoftware/foxitreader/lib/libQt5WebKit.so.5)
/opt/foxitsoftware/foxitreader/FoxitReader: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/foxitsoftware/foxitreader/lib/libxslt.so.1)
/opt/foxitsoftware/foxitreader/FoxitReader: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /opt/foxitsoftware/foxitreader/lib/libxslt.so.1)
/opt/foxitsoftware/foxitreader/FoxitReader: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /opt/foxitsoftware/foxitreader/lib/libxslt.so.1)
/opt/foxitsoftware/foxitreader/FoxitReader: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /opt/foxitsoftware/foxitreader/lib/libgstreamer-0.10.so.0)
/opt/foxitsoftware/foxitreader/FoxitReader: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/foxitsoftware/foxitreader/lib/libgstreamer-0.10.so.0)
/opt/foxitsoftware/foxitreader/FoxitReader: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /opt/foxitsoftware/foxitreader/lib/libgstreamer-0.10.so.0)
/opt/foxitsoftware/foxitreader/FoxitReader: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/foxitsoftware/foxitreader/lib/libgstbase-0.10.so.0)
/opt/foxitsoftware/foxitreader/FoxitReader: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/foxitsoftware/foxitreader/lib/libgstvideo-0.10.so.0)


解决:

1)

https://www.aliyun.com/zixun/content/2_6_518744.html


22,增加sudoer

http://www.2cto.com/os/201309/243204.html


23  VirtualBox 的

1,命令行运行

https://linux.cn/article-7582-1.html


2,增加虚拟机大小

VBoxManage modifyhd e178d6a8-2932-4dcb-b4c6-f3b8c3a3bff7 --resize 34000

后面的数字是byte  1024*n


3,减少虚拟机大小

把要减小的盘直接在虚拟机上删除即可


4,推出model screen,找回菜单栏

  (右面的Ctrl)+C

5,Windews 7 激活

http://jingyan.baidu.com/album/60ccbceb0d214964cab1972d.html?picindex=10

7,Windows 镜像(naoc)

ftp://info.bao.ac.cn/

7, D 盘无法删除

http://www.xitonghe.com/jiaocheng/Windows10-9224.html


24 ,Stardict 安装

www.68idc.cn/help/jiabenmake/qita/20141114128885.html


25,Gedit

http://www.2cto.com/os/201203/123476.html


26,设置修改用户和组

chgrp -R  js VirtualBox VMs/

usermod -g js VirtualBox VMs/


27,PGPLOT安装

参考:http://www.xker.com/page/e2007/0907/33728.html (~/.bashrc的设置)

         http://casuser.blog.163.com/blog/static/21733123620132114715299/(安装过程)

1,下载软件包: wget ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz

2,安装依赖软件:

                 yum install libX11-devel

                 yum install gcc-gfortran

3,安装PGPLOT软件

su (root权限)

cp pgplot5.2.tar.gz /usr/local/src/

tar zxvf /usr/local/src/pgplot5.2.tar.gz

mkdir /usr/local/pgplot

cd /usr/local/pgplot

cp /usr/local/src/pgplot/drivers.list ./

vi drivers.list

-------------------------改正drivers.list----将下列几行的叹号去掉-----------------


     GIDRIV 1 /GIF GIF-format file, landscape
  GIDRIV 2 /VGIF GIF-format file, portrait
  NUDRIV 0 /NULL Null device (no output) Std F77
  PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77
  PSDRIV 2 /VPS Postscript printers, monochrome, portrait Std F77
  PSDRIV 3 /CPS PostScript printers, color, landscape Std F77
  PSDRIV 4 /VCPS PostScript printers, color, portrait Std F77
  XWDRIV 1 /XWINDOW Workstations running X Window System C
  XWDRIV 2 /XSERVE Persistent window on X Window System C

-----------------------------------------------------------------------------------------------------

/usr/local/src/pgplot/makemake /usr/local/src/pgplot linux g77_gcc_aout

vi makefile

将makefile中的FCOMPL=g77改为FCOMPL=gfortran。

make

make cpg

make clean


exit (推出root权限)

------------------把一下行直接拷贝到.bashrc文件中--------------------

     PATH=/usr/share/pgplot/bin:$PATH
  PGPLOT_DIR=/usr/share/pgplot/;export PGPLOT_DIR
  LD_LIBRARY_PATH=/usr/share/pgplot/;export LD_LIBRARY
  PGPLOT_FONT=/usr/share/pgplot/grfont.dat ;export PGPLOT_FONT
  PGPLOT_DEV=/xwin;export PGPLOT_DEV
  PGPLOT_LIB="-L /usr/X11R6/lib -lX11 -L /usr/share/pgplot/ -lpgplot";export PGPLOT_LIB

---------------------------------------------------------------------------------------------

source ~/.bashrc

./pgdemo1  (会出现各种好看的图)


28   proas的安装(计算object在某天的最佳观测时间)

    http://proas.readthedocs.io/en/latest/installation.html

    安装和使用都能在官网找到,PGPLOT依赖的安装在27中


29 png等转eps

http://www.tlhiv.org/rast2vec/


30 eps 转 pdf

https://cn.office-converter.com/PS-to-ImagePDF


31 远程操作

linux windows通用的teamviewer很好用

网址:https://www.teamviewer.com/zhcn/

 


https://blog.sciencenet.cn/blog-2414991-1024741.html

上一篇:数据处理
下一篇:SDSS Data
收藏 IP: 159.226.171.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (1 个评论)

数据加载中...
扫一扫,分享此博文

全部作者的其他最新博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-10 10:09

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部