虚拟机环境配置

CentOS7(Desktop)操作系统配置环境备忘。

1、CLion

$ tar -xvf CLion-2022.2.1.tar.gz
$ vim /usr/bin/clion
# 编辑 :sudo bash /filepath/bin/clion.sh
$ sudo chmod +x /usr/bin/clion

2、PyCharm

$ tar -xvf pycharm-professional-2022.2.1.tar.gz
$ vim /usr/bin/pycharm
# 编辑 :sudo bash /filepath/bin/pycharm.sh
$ sudo chmod +x /usr/bin/pucharm

3、CMake Build Toolsets

$tar -xvf cmake-3.24.1.tar.gz
$ cd cmake-3.24.1
$ ./bootstrap && make && sudo make install 
# or 
$ mkdir cmake-build && cd cmake-build
$ ../cmake-source/bootstrap && make

4、GNU DevToolsets

$ yum install centos-release-scl
$ yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++
$ scl enable devtoolset-11 bash
# 配置环境变量
$ which gcc
/opt/rh/devtoolset-11/root/usr/bin/gcc
$ vim /etc/profile
 PATH=$PATH::/opt/rh/devtoolset-11/root/usr/bin
 export PATH
 source /etc/profile

5、Wireshark

CentOS使用wireshark提供依赖安装脚本对依赖进行安装:

$ git clone https://gitlab.com/wireshark/wireshark.git
$ cd wireshark/tools 
# to install additional tools and to install libraries required for all Wireshark features
$ ./rpm-setup.sh --install-optional
# to install packages required to build a .rpm file for Wireshark.
$ ./rpm-setup.sh --install-rpm-deps
# building wireshark
$ mkdir wireshark-dir
$ cd wirshark-dir
$ cmake ..

5.1 编译报错解决方法

/usr/bin/cc is not a full path to an existing compiler tool.

ln -s  <gcc-filepath> /usr/bin/cc
ln -s  <g++-filepath> /usr/bin/c++

6、Anaconda

$ wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-MacOSX-x86_64.sh
$ bash Anaconda3-2021.05-Linux-x86_64.sh
$ vim /etc/profile 
$ export PATH=<file-path-to-anacoda3>/anaconda3/bin:$PATH

6.1、Usage of Anaconda

$ conda create -n py39 python=3.9
$ conda info -e
$ conda activate <env> conda deactivate
$ conda remove -n <env> --all
$ conda list

7、Snap

$ sudo yum install epel-release
$ sudo yum install yum-plugin-copr
$ sudo yum copr enable ngompa/snapcore-el7
$ sudo systemctl enable --now snapd.socket
$ sudo ln -s /var/lib/snapd/snap /snap

7.1、Usage of Snap

$ snap list
$ snap find <software>
$ snap install <software>
$ snap refresh <software>
$ snap revert <last verson of software>
$ snap refresh all
$ snap remove <software>

系统磁盘克隆

发表评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注