1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      安裝完CentOS7Minimal之后如何打造桌面工作環(huán)境

      小編給大家分享一下安裝完CentOS 7 Minimal之后如何打造桌面工作環(huán)境,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!

      公司主營業(yè)務(wù):網(wǎng)站設(shè)計制作、成都做網(wǎng)站、移動網(wǎng)站開發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競爭能力。成都創(chuàng)新互聯(lián)公司是一支青春激揚、勤奮敬業(yè)、活力青春激揚、勤奮敬業(yè)、活力澎湃、和諧高效的團隊。公司秉承以“開放、自由、嚴謹、自律”為核心的企業(yè)文化,感謝他們對我們的高要求,感謝他們從不同領(lǐng)域給我們帶來的挑戰(zhàn),讓我們激情的團隊有機會用頭腦與智慧不斷的給客戶帶來驚喜。成都創(chuàng)新互聯(lián)公司推出鞏義免費做網(wǎng)站回饋大家。

      安裝完CentOS 7 Minimal之后,從頭打造桌面工作環(huán)境

      U盤裝CentOS 7 DVD版不能引導(dǎo)的解決辦法

      更改root密碼

      SSH登錄

      增加除root之外的常規(guī)用戶

      裝完CentOS 7之后,以前裝好的win7或是其它系統(tǒng)沒有出現(xiàn)在啟動項中的解決辦法

      啟動桌面環(huán)境

      設(shè)置是否默認啟動桌面環(huán)境

      沒有ifconfig命令的解決辦法

      網(wǎng)絡(luò)配置

      DNS工具與Windows一樣

      安裝第三方源(EPEL和RPMForge)

      安裝C++編譯器

      掛載NTFS文件系統(tǒng)

      安裝VirtualBox

      安裝Markdown解析器(python-markdown)

      安裝Flash Player

      安裝wkhtmltopdf

      安裝MPlayer

      配置GoAgent

      安裝配置管理Git

      安裝配置管理Apache HTTP Server(httpd)

      安裝配置管理MySQL(MariaDB)

      安裝配置管理PHP

      Linux(Yum系)常用壓縮打包命令

      Yum和RPM常用命令備忘錄

      制作bash腳本

      Hard Link(硬鏈接)

      Symbolic Link(符號鏈接、軟鏈接)

      查找文件

      常用配置文件

      改變Aptana Rubles文件夾默認在家目錄的解決辦法

      GNOME配置

      U盤裝CentOS 7 DVD版不能引導(dǎo)的解決辦法

      用UltraISO將DVD版的iso刻錄到U盤后,刪除packages文件夾(節(jié)省空間,不刪除亦可),將iso文件復(fù)制進U盤根目錄,開機之后出現(xiàn)

      dracut:/#

      輸入命令

      $ cd dev
      $ ls

      找到U盤的盤符,比如sda5,然后重新開機,按方向鍵選擇到第一項Install CentOS 7,按下Tab鍵,出現(xiàn)

      vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet

      修改為

      vmlinuz initrd=initrd.img repo=hd:/dev/sda5:/ quiet

      更改root密碼

      用root賬戶登錄shell,Alt+(F1~F6)切換tty1~tty6。

      # passwd

      SSH登錄

      $ ssh root@SERVER_IP_ADDRESS

      增加除root之外的常規(guī)用戶

      # useradd newusername
      # passwd newusername

      裝完CentOS 7之后,以前裝好的win7或是其它系統(tǒng)沒有出現(xiàn)在啟動項中的解決辦法

      在/boot/grub2/grub.cfg中添加

      menuentry 'Windows 7 Professional' {
          set root=(hd0,1)
          chainloader +1
      }

      (hd0,1)代表第一個分區(qū)。

      安裝GNOME桌面環(huán)境

      # yum grouplist
      # yum groupinstall "GNOME Desktop"

      CentOS 6.x與CentOS 7的yum group是不同的,CentOS 6.x需要這樣

      # yum groupinstall "X Window System" "Desktop" "Chinese Support"

      啟動桌面環(huán)境

      # startx

      設(shè)置是否默認啟動桌面環(huán)境

      $ vi /etc/inittab

      /etc/inittab文件明確聲明了inittab is no longer used when using systemd,并指示了如何用systemd的方式來做。

      # systemctl get-default
      # systemctl set-default multi-user.target
      # systemctl set-default graphical.target

      沒有ifconfig命令的解決辦法

      如果沒有安裝桌面環(huán)境,那么minimal版本沒有ifconfig命令。

      找出哪個包提供了ifconfig命令

      # yum provides ifconfig

      # yum whatprovides ifconfig

      輸出中可以看到net-tools包提供了ifconfig命令。

      # yum install net-tools

      網(wǎng)絡(luò)配置

      $ ifconfig -a 
      # ifconfig enp0s3 up // 開啟enp0s3網(wǎng)卡
      # ifconfig enp0s3 down // 關(guān)閉enp0s3網(wǎng)卡
      $ dhclient enp0s3 // 發(fā)送DHCP請求

      DNS工具與Windows一樣

      $ nslookup

      安裝第三方源(EPEL和RPMForge)

      CentOS官方文檔聲稱嚴重推薦EPEL,不推薦RPMForge,因為RPMForge已經(jīng)不再被維護了,雖然曾經(jīng)被CentOS推薦。

      EPEL

      官方網(wǎng)站http://fedoraproject.org/wiki/EPEL

      EL7下載地址http://download.fedoraproject.org/pub/epel/7/x86_64/repoview/epel-release.html

      # rpm -ivh epel-release-7-5.noarch.rpm

      EPEL的repo文件已經(jīng)在目錄/etc/yum.repos.d/下。

      RPMForge

      官方網(wǎng)站http://repoforge.org/

      EL7下載地址http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

      # rpm -ivh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

      RPMForge的repo文件已經(jīng)在目錄/etc/yum.repos.d/下。

      安裝C++編譯器

      # yum install gcc-c++

      掛載NTFS文件系統(tǒng)

      CentOS自身的源里沒有支持NTFS的包,需要從EPEL或RPMForge(也叫RepoForge)源里安裝。

      # yum install ntfs-3g --enablerepo=epel

      # yum install fuse-ntfs-3g --enablerepo=rpmforge

      安裝VirtualBox

      VirtualBox要編譯內(nèi)核,所以需要kernel-devel這個包。

      # yum install kernel-devel
      # yum localinstall *.rpm

      對于VirtualBox只能裝32位系統(tǒng)的情況,涉及到Host的CPU是否支持虛擬化以及是否開啟了虛擬化,如果沒有開啟,在BIOS里面設(shè)置,一般在CPU的子設(shè)置里面,且含有“Virtualization”或“Virtual”字樣,將它設(shè)為Enable

      安裝Markdown解析器(python-markdown)

      Linux下Markdown解析器有很多,CentoOS官方Y(jié)um源(extras)里有python-markdown。

      # yum install python-markdown

      python-markdown的命令名是markdown_py,查看幫助。

      $ markdown_py -h

      用法簡單,舉例說明,用以備忘。

      • 解析*.md,輸出html內(nèi)容到stdout。

        $ markdown_py *.md

      • 解析*.md,利用重定向,輸出html內(nèi)容到*.html。

        $ markdown_py *.md > *.html

      • 可以不使用重定向,利用markdown_py命令的-f選項,輸出html內(nèi)容到*.html。

        $ markdown_py -f *.html *.md

      • -o選項用來指定解析完之后html的輸出格式,可以是html5html4xhtml1,默認xhtml1,所以最好明確指定-o選項。

        $ markdown_py -o html5 *.md > *.html

      安裝Flash Player

      • adobe官網(wǎng)下載yum安裝包

        # rpm -ivh *.rpm
        # yum install flash-plugin --enablerepo=adobe-linux-x86_64

      • adobe官網(wǎng)下載rpm安裝包

        # rpm -ivh *.rpm

      • 利用RPMforge

        # yum install flash-plugin --enablerepo=rpmforge

      安裝wkhtmltopdf

      RPMforge(現(xiàn)在叫RepoForge)的repo中沒有CentOS 7的smplayer,所以需要源代碼安裝。

      安裝MPlayer通常需要以下3個東西:

      • source code(源代碼tarball文件)

      • binary codecs(一堆二進制的解碼器文件)

      • a skin(皮膚)

      官網(wǎng)下載source code。

      $ ./configure --enable-gui --language=zh_CN --disable-ossaudio

      --enable-gui告訴configure以后運行MPlayer需要圖形界面,不僅只從command line運行。

      --language=zh_CN告訴configure安裝中文環(huán)境。

      --disable-ossaudio是因為linux2.4以后的內(nèi)核逐漸拋棄oss音頻架構(gòu)而轉(zhuǎn)向alsa(詳細說明請參考http://blog.csdn.net/meizum10/article/details/17437959)。

      提示No FFmpeg checkout, press enter to download one with git or CTRL+C to abort,按下回車鍵。

      通常configure會失敗,因為需要一些依賴。它告訴缺什么就裝什么。

      提示./configure: line 1522: git: command not found Failed to get a FFmpeg checkout,configure需要利用git下載ffmpeg,如果git沒有安裝,那么就安裝git。

      # yum install git

      提示Error: Compiler is not functioning correctly. Check your installation and custom CFLAGS .,源代碼編譯安裝當然需要gcc,如果沒有安裝,那么就安裝它。g++依賴于gcc,所以為了以后省事,干脆安裝g++。

      # yum install gcc-c++

      提示Error: yasm not found, use --yasm='' if you really want to compile without,缺少yasm,去yasm官網(wǎng)http://yasm.tortall.net下載源代碼tarball,簡單的三步走:

      $ ./configure
      $ make
      $ su
      # make install

      In function avcodec_register_all' 提示Error: The GUI requires X11.`,缺少X11,yum安裝gtk2-devel,注意要安裝gtk2-devel,gtk3-devel不行

      # yum install gtk2-devel

      configure通過,接著

      $ make
      $ su
      # make install

      OK,安裝完成,在command line里運行mplayer 媒體文件名一般可以播放。

      官網(wǎng)下載binary codecs,是個tarball,解壓,得到一堆解碼器文件,將這些解碼器文件放到/usr/local/lib/codecs/里。/usr/local/lib/下如果沒有codecs文件夾,那就手動創(chuàng)建一個。

      官網(wǎng)下載skin文件(我安裝的是clearplayer),是個tarball,解壓,得一文件夾,將這文件夾放到/usr/local/share/mplayer/skins/里,之后建立一個叫default的符號鏈接,指向皮膚文件夾。

      # ln -s <文件夾名字> default

      當然,也可以把文件夾名字直接改成default。

      如果播放沒有聲音,那么就這么干:

      # yum install *alsa*

      安裝了一堆alsa相關(guān)的東西。

      至于CentOS 6.x,RPMforge(現(xiàn)在叫RepoForge)的CentOS 6.x的repo中有smplayer,所以直接yum安裝。

      # yum install smplayer --enablerepo=rpmforge

      配置GoAgent

      服務(wù)端上傳:

      $ python server/uploader.py // linux & mac
      雙擊server/uploader.bat // windows

      客戶端運行:

      $ python local/proxy.py // linux & mac
      雙擊local/goagent.exe // windows

      Firefox和Opera需要導(dǎo)入證書。

      對于CentOS 6.x:

      # yum install centos-release-SCL
      # yum install python27

      在/etc/ld.so.conf.d/文件夾中建立文件python27.conf,內(nèi)容為/opt/rh/python27/root/usr/lib64。

      # ldconfig // 加載配置
      $ /opt/rh/python27/root/usr/bin/python proxy.py

      安裝配置管理Git

      安裝
      # yum install git
      git config

      安裝完需要用git config配置user name和user email,否則不能commit。

      $ git config --global user.email "you@example.com"
      $ git config --global user.name "Your Name"
      $ git config --list

      git config有3種選項,對應(yīng)不同配置文件。

      1. --system /etc/gitconfig

      2. --global ~/.gitconfig

      3. no option .git/config

      SSH KEY

      為了使用GitHub的SSH keys功能,利用ssh-keygen工具在本地生成rsa密鑰對。

      $ ssh-keygen -t rsa -C "your_email@example.com" // generate a rsa key pair in the file ~/.ssh/id_rsa & ~/.ssh/id_rsa.pub
      $ ssh-keygen -p //adding or changing a passphrase
      .gitignore

      各種類型的gitignore模板https://github.com/github/gitignore

      # 此為注釋
      *.a 忽略所有目錄下.a結(jié)尾的文檔
      !lib.a 但不忽略lib.a文檔
      *.[oa] 忽略所有目錄下.a或.o結(jié)尾的文檔
      *~ 忽略所有目錄下~結(jié)尾的文檔
      TODO 忽略所有目錄下的TODO文檔
      /TODO 僅僅忽略根目錄下的TODO文檔
      build/ 忽略所有目錄下的build文件夾
      /build/ 僅僅忽略根目錄下的build文件夾
      doc/**/*.txt 忽略doc文件夾下的所有.txt文檔
      星號*匹配零個或多個任意字符
      [abc] 匹配任何一個列在方括號中的字符(這個例子要么匹配一個 a,要么匹配一個 b,要么匹配一個 c)
      問號?只匹配一個任意字符
      如果在方括號中使用短劃線分隔兩個字符,表示所有在這兩個字符范圍內(nèi)的都可以匹配,比如 [0-9] 表示匹配所有 0 到 9 的數(shù)字
      常用命令
      $ git init
      $ git add *
      $ git commit -m 'message'
      
      $ git status
      $ git status -s
      $ git status --short
      
      $ git diff
      
      $ git clone git@github.com:who/whatrepo.git
      $ git clone https://github.com/who/whatrepo
      $ git clone https://github.com/who/whatrepo SpecifiedFolder
      
      $ git remote
      $ git remote -v
      $ git remote add [shortname] [url]
      $ git remote rm [remote-name]
      $ git remote rename [old-name] [new-name]
      $ git remote fetch [remote-name]
      $ git push [remote-name] [branch-name]
      $ git pull

      安裝配置管理Apache HTTP Server(httpd)

      安裝
      # yum install httpd
      管理

      在Windows下,httpd是以系統(tǒng)服務(wù)的形式運行,在Unix(Linux)下,httpd作為daemon(守護進程)運行。

      httpd官方文檔推薦用apachectl這個script來調(diào)用httpd可執(zhí)行程序,原因是:apachectl首先會設(shè)置一些為保證httpd正確運行所必要的環(huán)境變量,然后再去調(diào)用httpd可執(zhí)行程序,而且apachectl會把命令行參數(shù)原封不動的傳遞給httpd。

      apachectl是httpd daemon的front end。所以管理員應(yīng)該用apachectl來管理httpd daemon

      apachectl在CentOS 6.x和CentOS 7下均可用。

      # apachectl start
      # apachectl stop或graceful-stop
      # apachectl restart或graceful
      # apachectl status

      如果不使用apachectl這個script,也可以使用service這個管理daemon的命令。

      # service httpd start
      # service httpd stop
      # service httpd restart
      # service httpd status

      如果系統(tǒng)支持systemd(CentOS 7開始支持systemd),既可以用service命令,也可以用systemd。

      # systemctl start httpd.service
      # systemctl stop httpd.service
      # systemctl restart httpd.service
      # systemctl status httpd.service
      # systemctl is-active httpd.service
      設(shè)置開機自動啟動

      要設(shè)置開機自動啟動httpd,需要區(qū)分在CentOS 6.x和CentOS 7下2種情況。

      CentOS 6.x沒有systemd,我最喜歡的方式是修改/etc/rc.d/rc.local這個文件。

      # vi /etc/rc.d/rc.local

      添加以下命令。

      /usr/sbin/apachectl start

      CentOS 7用了systemd。

      # systemctl enable httpd.service
      # systemctl disable httpd.service
      理解并設(shè)置虛擬主機

      httpd的主配置文件是/etc/httpd/conf/httpd.conf。目錄/etc/httpd/conf.d/下的文件只要以.conf作為擴展名,其內(nèi)容就能被集成到主配置文件中。所以盡量不直接修改主配置文件,而是在目錄/etc/httpd/conf.d/下面搞。

      httpd官方文檔把Virtual Host(虛擬主機)分為了2種:IP-based和Name-based。

      我的理解是:

      在配置文件里放一個 block,就代表配置了一個Virtual Host,放2個就代表配置了2個。起始標簽里需要說明IP地址和端口,即這個樣子,IP可以是*,端口可以不寫。

      一個request來了之后,就根據(jù)IP地址和端口按照配置文件中的順序來一個個匹配 block。如果所有的 block都沒匹配上,那么就去咨詢主配置文件里的指示了。而一旦某些 block匹配上了,那么只有這些匹配上的block才能成為request的候選者,其它的 block包括主配置文件就都沒有機會了。

      如果候選者只有1個,那么沒的挑了,就是你了。而如果候選者有多個,怎么選?

      就得看 block里面的ServerNameServerAlias指示了,誰的ServerNameServerAlias與request的HTTP報文的header的Host相匹配,那么誰就勝出。如果多個block都匹配,那么先來后到,誰在前邊誰勝出。如果都不匹配,那么還是先來后到。

      Listen 80
      
          DocumentRoot /var/www/html
          ServerName www.example.com
          ServerAlias example.com 
      
      
          AllowOverride All
      

      AllowOverride All的作用是使web目錄內(nèi)的.htaccess文件起作用,常用于開啟Drupal的簡潔URL。

      如果VirtualHost指定了端口,需要寫上Listen指示,因為只有先告訴httpd監(jiān)聽某個端口,request才能從這個端口進來,進而進入某個VirtualHost。httpd主配置文件默認已經(jīng)配置了Listen 80,所以VirtualHost如果指定80端口,就不需要再此指示監(jiān)聽80端口了,配置文件里重復(fù)的指示不符合語法。

      安裝配置管理MySQL(MariaDB)

      安裝

      MySQL

      # yum install mysql-server

      MariaDB

      # yum install mariadb-server

      mysql-server package依賴于mysql package,所以沒必要這么做:yum install mysql mysql-server

      管理
      MySQL
      # service mysqld start
      # service mysqld stop
      # service mysqld restart
      # service mysqld status
      MariaDB
      # service mariadb start
      # service mariadb stop
      # service mariadb restart
      # service mariadb status

      也可以用systemd方式

      # systemctl start mariadb.service
      # systemctl stop mariadb.service
      # systemctl restart mariadb.service
      # systemctl status mariadb.service
      # systemctl is-active mariadb.service
      配置
      # mysql_secure_installation

      # mysqladmin -u root password ''
      設(shè)置開機自動啟動
      MySQL
      # vi /etc/rc.d/rc.local

      添加以下命令

      /usr/sbin/service mysqld start
      MariaDB
      # systemctl enable mariadb.service
      # systemctl disable mariadb.service
      登錄
      $ mysql -hhost -Pport -Ddatabase -uusername -p
      登錄后的常見命令
      > create database if not exists * default character set utf8;
      > show databases;
      > use *;
      > show tables;

      安裝配置管理PHP

      安裝
      # yum install php

      僅僅安裝PHP往往是不夠的,通常還需要安裝模塊。

      # yum install php-mysql
      # yum install php-gd
      # yum install php-xml
      # yum install php-mbstring
      配置

      PHP配置文件

      /etc/php.int

      通常需要改配置文件

      upload_max_filesize = 2M

      Linux(Yum系)常用壓縮打包命令

      .tar.gz

      $ tar xzvf *.tar.gz
      $ tar czvf *.tar.gz file1 file2

      .tar.bz2

      $ tar xjvf *.tar.bz2
      $ tar cjvf *.tar.bz2 file1 file2

      .tar.xz

      $ tar xJvf *.tar.xz
      $ tar cJvf *.tar.xz file1 file2

      .zip

      # yum install zip unzip
      $ zip *.zip file1 file2
      $ unzip *.zip

      .rar

      # yum install rar --enablerepo=rpmforge
      $ rar a *.rar file1 file2
      $ rar x *.rar

      .7z

      # yum install p7zip --enablerepo=rpmforge
      $ 7za a *.7z file1 file2
      $ 7za x *.7z

      Yum和RPM常用命令備忘錄

      yum history

      # yum history
      # yum history list 
      # yum history info 
      # yum history undo 
      # yum history redo 

      yum update

      # yum clean all
      # yum makecache
      # yum update

      rpm安裝卸載

      # rpm -ivh *.rpm
      # rpm -qa
      # rpm -qa|grep *
      # rpm -e *
      # rpm -e * --nodeps

      制作bash腳本

      #!/bin/bash
      write cmd line here
      # comment

      Hard Link(硬鏈接)

      $ ln target_file link_file

      Symbolic Link(符號鏈接、軟鏈接)

      $ ln -s target_file link_file

      查找文件

      $ find / -name "*"

      常用配置文件

      /etc/resolv.conf
      /etc/hosts
      /etc/inittab
      /etc/yum.repos.d/
      ~/.config/user-dirs.dirs
      ~/.bash_profile

      改變Aptana Rubles文件夾默認在家目錄的解決辦法

      eclipse.ini文件中,在-vmargs之后添加

      -Dstudio.rubleUserLocation=Aptana Rubles

      GNOME配置

      $ gnome-tweak-tool

      看完了這篇文章,相信你對“安裝完CentOS 7 Minimal之后如何打造桌面工作環(huán)境”有了一定的了解,如果想了解更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!


      當前文章:安裝完CentOS7Minimal之后如何打造桌面工作環(huán)境
      網(wǎng)站網(wǎng)址:http://www.ef60e0e.cn/article/ihdihi.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        曲阳县| 伊川县| 贵州省| 卢湾区| 商都县| 常德市| 普兰县| 四子王旗| 防城港市| 谢通门县| 图片| 乌鲁木齐县| 和林格尔县| 郯城县| 淄博市| 峡江县| 康马县| 屯昌县| 乡城县| 临城县| 屏南县| 盘山县| 平度市| 平江县| 长治市| 松潘县| 济阳县| 龙江县| 龙陵县| 穆棱市| 都江堰市| 镇康县| 陕西省| 宜君县| 调兵山市| 鹿邑县| 雷山县| 闽清县| 东山县| 定兴县| 安化县|