Build your own digital IC EDA environment (two): build the basic environment and tools for Centos

1. Brief description

The last time Centos7 was successfully installed, the default environment of the system was still very inconvenient to use, so now the basic environment configuration is completed to make the environment easier to use.

2. Configure the basic use environment

1) Connect to the Internet

Download is required for subsequent operations, so you must connect to the Internet;
Insert picture description here

2) Install git

Centos does not have a git tool by default, so you need to install it yourself;

 sudo yum install -y git

If the prompt in the figure below appears, you need to add a super user, the command is as follows:
Insert picture description here

  • First enter the super user, password: 2020;
  • Go to the etc directory and modify sudoers permissions;
  • Open it with vim, enter "i" to enter the editing mode, and add users on line 101; then "esc" key to exit the editing mode, ":" enter the command line, enter "wq" to save and exit;
  • Then modify the file permissions back;
su
cd ~/../../etc/
chmod 777 sudoers
vim sudoers
chmod 440 sudoers

Insert picture description here
After completion, use the following command to exit the super user:

su ICer

3) Install givm

Centos is vim by default, there is no gvim convenient to use, use the following command to download:
install dependent libraries

sudo yum install -y ncurses-devel

In this way, use the following command to compile and install

sudo yum install vim-X11.x86_64 -y

After inputting "gvim" in terminal, the effect is as follows:
Insert picture description here

4) Configure the .bashrc environment

Open the .bashrc file in the home directory;

cd ~ 
gvim .bashrc

The simple configuration is as follows, the last one can be completed and automatically display the file after entering the directory with cd;

alias gv="gvim"
alias g="gvim"
alias la="ls -a"
alias ..="cd ../"
cd() {
    
     builtin cd "$@" && ls; }

Remember to source it after saving and exiting

source .bashrc

Under the super user, the same operation as above is required; otherwise, the above configuration under the super user is invalid;

5) Configure gvim

The gvim interface is really not pretty. You need to customize the configuration and create a new .vimrc in the home directory;

touch .vimrc

Use gvim to open .vimrc

g .vimrc

The specific configuration is as follows:

" 语法高亮度显示
syntax on

" 设置行号
set nu

"防止中文注释乱码
set fileencoding=utf-8
set fenc=utf-8
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936,big-5                    
set enc=utf-8
let &termencoding=&encoding

"设置字体
set guifont=Monospace\ 13

" 设置tab4个空格
set tabstop=4
set expandtab

"程序自动缩进时候空格数
set shiftwidth=4

"退格键一次删除4个空格
set softtabstop=4
autocmd FileType make set noexpandtab

" 在编辑过程中,在右下角显示光标位置的状态行
set ruler

" 搜索忽略大小写 
set ignorecase 

" vim使用自动对起,也就是把当前行的对起格式应用到下一行
set autoindent

" 依据上面的对起格式,智能的选择对起方式,对于类似C语言编写上很有用
set smartindent

" 在状态列显示目前所执行的指令
set showcmd

" 设置颜色主题
colorscheme darkblue

set nocompatible
set backspace=indent,eol,start

Save and exit, the effect is as follows
Insert picture description here

6) terminal displays the full path

By default, Centos only displays the current directory name, not the current full path. When we enter a deep directory, it is easy to find the location. It is very complicated to use "pwd" to view, and it is simply configured to display the complete directory; as follows:

su
cd ~/../../etc
gvim profile

Add the following command at the bottom of the profile, and remember to source it after saving and exiting:

export PS1='[\u@\h `pwd`]\$'

Under ordinary users, this command needs to be added to .bashrc, the effect is as follows
Insert picture description here

3. Summary

Now the basic use environment is configured, and the others can be configured or installed according to their needs; the next step is to install vcs, verdi and other IC software. After the entire installation is complete, I will share the entire EDA environment.

Welcome to follow my public account: Core Kingdom, there are more FPGA & digital IC technology sharing, and you can also get open source FPGA projects!

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_40377195/article/details/109703017