CentOS裝機必備-基本設置以及缺失文件

主要是虛擬機中安裝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 到任何一個實際存在的目錄下在執行命令即可。
出現這種現象的原因還有,當前用戶沒有當前目錄的可執行權限

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章