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 到任何一个实际存在的目录下在执行命令即可。
出现这种现象的原因还有,当前用户没有当前目录的可执行权限

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