之前从来没有尝试过CentOS linux,之所以用这个系统一方面是想装CUDA 10.0,另一方是尝试以下Red Hat系的系统。安装过程十分方便,把DVD版本的景象写入U盘即可(我推荐一个工具rufus,以dd形式写入就行),之后就是图形化的安装界面了,本文主要介绍一些安装后个人喜欢的软件和配置。
1.配置软件源#
首先备份 CentOS-Base.repo#
1
|
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
|
下载对应版本的 CentOS-Base.repo , 放入 /etc/yum.repos.d/#
我的系统是CentOS7,放入以下文件命名为CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
更新软件源#
之前总是cant resolve 正常的网址,所以这次就先在/etc/resolv.conf中加一句
1
2
3
4
|
root$ echo "nameserver 8.8.8.8" >> /etc/resolv.conf
yum clean all
yum makecache
yum update
|
添加好用的软件源#
EPEL [与官方源不冲突]#
1
|
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
ELRepo [包含各种硬件驱动]#
1
|
rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
|
Nux Dextop [多媒体相关软件包][与EPEL个别软件冲突]#
1
|
yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
|
2. 安装一些软件#
chrome#
https://www.google.cn/chrome/下载rpm
1
|
sudo yum localinstall google-chrome-stable_current_x86_64.rpm
|
下载SwitchOmega插件
https://github.com/FelisCatus/SwitchyOmega/releases
crx后缀改为zip解压后安装
anaconda:不多说了,下载安装#
1
2
3
|
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
|
idea pycharm#
jetbrains官网下载
ss-qt5#
1
2
3
4
5
|
cd /etc/yum.repos.d/
su root
wget -4 https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo
sudo yum update
sudo yum install shadowsocks-qt5
|
git#
compton 为了透明的窗口效果#
1
2
3
4
|
sudo yum install compton
# 加上启动命令compton
nano /etc/rc.local
chmod +x /etc/rc.d/rc.local
|
hugo#
1
2
3
4
|
cd /etc/yum.repos.d/
su root
wget -4 https://copr.fedorainfracloud.org/coprs/daftaupe/hugo/repo/epel-7/daftaupe-hugo-epel-7.repo
sudo yum install hugo
|
sublime text#
Install the GPG key:
1
2
|
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
Select the channel to use:
|
Stable
1
|
sudo yum-config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
|
Dev
1
|
sudo yum-config-manager --add-repo https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo
|
Update yum and install Sublime Text
1
|
sudo yum install sublime-text
|
R & Rstudio#
1
2
3
|
sudo yum install R
wget -4 https://download1.rstudio.org/rstudio-1.1.463-x86_64.rpm
sudo yum localinstall rstudio-1.1.463-x86_64.rpm
|
3.改字体#
希望所有字体都是文泉驿
在系统设置里改就行
4. 设置自动更新的桌面#
具体见下一篇文章
5. tensorflow GPU 环境设置#
具体见下两篇文章
- CentOS 源使用帮助http://mirrors.ustc.edu.cn/help/centos.html
- CentOS 7 下软件安装方法和策略 https://www.jianshu.com/p/e35863947b30
- CentOS7安装和使用DNF https://my.oschina.net/liuyuantao/blog/756133
- ss-qt5安装指南 https://github.com/shadowsocks/shadowsocks-qt5/wiki/%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97
- gohugoio/hugo https://github.com/gohugoio/hugo/releases
- Sublime Text https://www.sublimetext.com/docs/3/linux_repositories.html#yum