Linux基本操作01

来源:互联网 发布:免费的电子书软件 编辑:程序博客网 时间:2024/05/29 13:05

注明:本人系统为centos7

解压tar.gz/tar/rar/zip/tgz.bin文件到指定位置

[root@localhost Software]# tar -zxvf rarlinux-x64-5.3.0.tar.gz --directory=/usr/local
[root@localhost Software]# rar x Tunet2015_linux.rar
[liuyao@localhost Libraries]$ unzip jpegsr6.zip 
[root@localhost opt]# chmod +x anylogic-professional-7.3.4.linux.x86_64.tgz.bin [root@localhost opt]# ./anylogic-professional-7.3.4.linux.x86_64.tgz.bin AnyLogic North America, LLC……

file1.tgz.bin 文件是可以自动解压的(self-extracting),先改变其权限,然后直接运行,即可产生 file1_extracted.tgz,然后解压成 file1,最后自动删除 file1_extracted.tgz,只剩下 file1 文件夹。


到指定位置处执行编译和安装操作

[root@localhost ~]# cd /usr/local/rar[root@localhost rar]# make && make installmkdir -p /usr/local/binmkdir -p /usr/local/libcp rar unrar /usr/local/bincp rarfiles.lst /etccp default.sfx /usr/local/libmkdir -p /usr/local/binmkdir -p /usr/local/libcp rar unrar /usr/local/bincp rarfiles.lst /etccp default.sfx /usr/local/lib[root@localhost rar]# rarRAR 5.30   Copyright (c) 1993-2015 Alexander Roshal   18 Nov 2015Trial version             Type RAR -? for help

设置Terminal快捷键

这里写图片描述


安装五笔输入法

[root@localhost Software]# yum install ibus-table-chinese-wubi-jidian

安装anaconda(spyder)

[root@localhost Software]# lsAnaconda3-4.0.0-Linux-x86_64.sh[root@localhost Software]# bash Anaconda3-4.0.0-Linux-x86_64.sh 
Please answer 'yes' or 'no':>>> yesAnaconda3 will now be installed into this location: /root/anaconda3  - Press ENTER to confirm the location  - Press CTRL-C to abort the installation  - Or specify a different location below[/root/anaconda3] >>> /usr/local/anaconda3PREFIX=/usr/local/anaconda3installing: _cache-0.0-py35_x0 …installing: python-3.5.1-0 ………
installation finished.Do you wish the installer to prepend the Anaconda3 install location to PATH in your /root/.bashrc ? [yes|no][no] >>> yesPrepending PATH=/usr/local/anaconda3/bin to PATH in /root/.bashrcA backup will be made to: /root/.bashrc-anaconda3.bak

安装完成后,就可以通过spyder直接打开spyder了

[root@localhost liuyao]# spyder

注意此时无法使用普通用户运行spyder(为什么?如何修改?)

[liuyao@localhost ~]$ spyderbash: spyder: 未找到命令...

卸载anaconda:https://docs.continuum.io/anaconda/install#uninstall-anaconda


安装iso文件,以matlab为例

1.先挂载ISO文件到/mnt/cdrom,若没有该文件夹,需要先创建

[root@localhost Software]# mount -o loop R2015b_glnxa64.iso /mnt/cdrommount: 挂载点 /mnt/cdrom 不存在[root@localhost Software]# mkdir /mnt/cdrom[root@localhost Software]# mount -o loop R2015b_glnxa64.iso /mnt/cdrommount: /dev/loop0 写保护,将以只读方式挂载

2.打开该文件夹,开始安装

[root@localhost Software]# cd /mnt/cdrom/[root@localhost cdrom]# ls……  install  installer_input.txt install_guider.pdf  ……[root@localhost cdrom]# ./installPreparing installation files …Installing

3.安装完成后记得取消挂载

[root@localhost Software]# umount /mnt/cdrom/

4.直接输入matlab就可以打开matlab

[liuyao@localhost ~]$ matlab

安装R和RStudio

注意:不要通过在R官网上下载R源代码然后编译安装的方式去安装,这样在安装后RStudio并打开时,会提示”R shared library(/usr/local/lib64/R/lib/libR.so) not found”! 既然卸载R后按照提示的’./configure –enable-R-shlib’也没用。。。而是在添加好yum repository后,通过yum install R来安装!

  1. 添加好yum repository后,直接yum install R

  2. 去RStudio官网下载RStudio,然后正常安装即可rpm -ivh rstudio-0.99.896-x86_64.rpm

添加用户进sudoer

  1. 切换成root用户后,输入visudo:[root@master liuyao]# visudo

  2. 在打开的配置文件中,找到root ALL=(ALL) ALL并在下面添加一行xxx ALL=(ALL) ALL,其中XXX为要添加的用户

0 0