歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> Linux基本操作01

Linux基本操作01

日期:2017/3/3 14:04:47   编辑:Linux技術
注明:本人系統為centos7

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

[code][root@localhost Software]# tar -zxvf rarlinux-x64-5.3.0.tar.gz --directory=/usr/local

[code][root@localhost Software]# rar x Tunet2015_linux.rar

[code][liuyao@localhost Libraries]$ unzip jpegsr6.zip

[code][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 文件夾。

到指定位置處執行編譯和安裝操作

[code][root@localhost ~]# cd /usr/local/rar
[root@localhost rar]# make && make install
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib
[root@localhost rar]# rar
RAR 5.30   Copyright (c) 1993-2015 Alexander Roshal   18 Nov 2015
Trial version             Type RAR -? for help

設置Terminal快捷鍵


安裝五筆輸入法

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

安裝anaconda(spyder)

[code][root@localhost Software]# ls
Anaconda3-4.0.0-Linux-x86_64.sh
[root@localhost Software]# bash Anaconda3-4.0.0-Linux-x86_64.sh

[code]Please answer 'yes' or 'no':
>>> yes
Anaconda3 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/anaconda3
PREFIX=/usr/local/anaconda3
installing: _cache-0.0-py35_x0 …
installing: python-3.5.1-0 …
……

[code]installation finished.
Do you wish the installer to prepend the Anaconda3 install location to PATH in your /root/.bashrc ? [yes|no]
[no] >>> yes

Prepending PATH=/usr/local/anaconda3/bin to PATH in /root/.bashrc
A backup will be made to: /root/.bashrc-anaconda3.bak

安裝完成後,就可以通過spyder直接打開spyder了
[code][root@localhost liuyao]# spyder

注意此時無法使用普通用戶運行spyder(為什麼?如何修改?)
[code][liuyao@localhost ~]$ spyder
bash: spyder: 未找到命令...

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

安裝iso文件,以matlab為例

1.先掛載ISO文件到/mnt/cdrom,若沒有該文件夾,需要先創建
[code][root@localhost Software]# mount -o loop R2015b_glnxa64.iso /mnt/cdrom
mount: 掛載點 /mnt/cdrom 不存在
[root@localhost Software]# mkdir /mnt/cdrom
[root@localhost Software]# mount -o loop R2015b_glnxa64.iso /mnt/cdrom
mount: /dev/loop0 寫保護,將以只讀方式掛載

2.打開該文件夾,開始安裝
[code][root@localhost Software]# cd /mnt/cdrom/
[root@localhost cdrom]# ls
……  install  installer_input.txt install_guider.pdf  ……
[root@localhost cdrom]# ./install
Preparing installation files …
Installing …

3.安裝完成後記得取消掛載
[code][root@localhost Software]# umount /mnt/cdrom/

4.直接輸入matlab就可以打開matlab
[code][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
來安裝!
添加好yum repository後,直接
yum install R

去RStudio官網下載RStudio,然後正常安裝即可
rpm -ivh rstudio-0.99.896-x86_64.rpm

添加用戶進sudoer

切換成root用戶後,輸入visudo:
[root@master liuyao]# visudo

在打開的配置文件中,找到
root ALL=(ALL) ALL
並在下面添加一行
xxx ALL=(ALL) ALL
,其中XXX為要添加的用戶
Copyright © Linux教程網 All Rights Reserved