天天看點

centos7使用前的預先準備

個人比較喜歡gnome而不是gnome classic在開機登陸時候,在要輸入登陸密碼的界面,點選下面的小齒輪就可以進行桌面的更換了。

最最先就是換源,預設是國外的源,最好換成國内的,我這裡換成了aliyun的源

  1. 備份源
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
               
  2. 下載下傳新的 CentOS-Base.repo 到 /etc/yum.repos.d/
    wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
               
  3. 緩存
    yum makecache
               

然後就是sudo yum update 把系統更新到最新版本。

不喜歡firefox,想要換成chrome浏覽器:

  1. 擷取rpm
    wget  https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm   //擷取chrome浏覽器
               
  2. 換成aliyun的源
    wget -O google https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
     	yum clean all
     	yum repolist
               
  3. 安裝chrome包,由于少很多依賴,偷懶直接用localinstall安裝即可
    yum localinstall  google-chrome-stable_current_x86_64.rpm
               

這樣托盤裡面就有chrome浏覽器,拉出放入panel中就可以用了

裝java和eclipse

首先删除自己的oepnjdk

rpm -qa | grep java
		rpm -e  --nodeps xxxxxxxxxx  //xxxxxx是上面的各種檔案
           

去官網下載下傳jdk然後

rpm -ivh xxx.rpm    //xxx為java的包的名字
           

這裡不能用yum install指令 這樣就又安裝了openjdk (哭了)

最新版本裡面已經不用進行java的配置了。。。省了好長時間

安裝eclipse,從eclipse官網下載下傳最新的包,

mv xxxxxx.tar.gz /opt      //放到opt檔案夾内
           

然後

tar -zxvf xxxxx.tar.gz      //解壓到目前檔案夾
           

然後建立圖示

vim /usr/share/applications/eclipse.desktop
           

輸入

[Desktop Entry]
		Type=Application
		Name=eclipse
		Exec=/opt/eclipse/eclipse
		GenericName=eclipse
		Comment=Java development tools
		Icon=/opt/eclipse/icon.xpmCategories=Application;Development;
		Terminal=false
           

同樣 從托盤裡面拖出圖示到panel裡面使用就ok

epel源

epel源比官網源多的太多,很多軟體官網沒有的epel就有,是以基本是必裝的

yum install epel-release