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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值