CentOS裝機必備-基本設定以及缺失檔案

來源:互聯網
上載者:User

主要是虛擬機器中安裝CentOS每次總會做一些設定,記錄下來方便以後。

純粹基本設定,比如本地SecureCRT可以串連虛擬機器中的CentOS。

複雜的非基本設定見:Linux  命令集錦

 

設定網路

自動連接

#cat /etc/sysconfig/network-scripts/ifcfg-eth0 ONBOOT=yes

 

重啟網卡

#service network restart

 ------------------------------------------

安裝缺失檔案

下載上傳命令

rz: command not found

# yum install lrzsz    

 

如果yum源沒有直接下載到本地

#yum localinstall 檔案

 

下載rpm

#rpm -i 檔案

-------------------------------------------

安裝telnet

#yum -y install telnet

--------------------------------------------

安裝lua

#yum -y install lua

#yum -y install lua-devel

 

--------------------------------------------

安裝gcc編譯C語言

cc: command not found

#yum gcc

#yum -y install gcc

說明:-y說明安裝直接選擇yes

--------------------------------------------

checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.

#yum install gcc gcc-c++

--------------------------------------------

phpize時提示

Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
# tar -zvxf autoconf-2.62.tar.gz
# cd autoconf-2.62/
# ./configure && make && make install

----------------------------------------------

安裝rzsz

#yum install lrzsz

---------------------------------------------

 getcwd: cannot access parent directories的解決方案

getcwd 命令無法定位到當前工作目錄。一般來說是因為你 cd 到了某個目錄之後 rm 了這個目錄
這時去執行某些 service 指令碼的時候就會報 getcwd 。
只需要 cd 到任何一個實際存在的目錄下在執行命令即可。
出現這種現象的原因還有,目前使用者沒有目前的目錄的可執行許可權

----------------------------------------------

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.