本文共 2560 字,大约阅读时间需要 8 分钟。
SecureCRT中注意不要使用以Ascii方式上传文件,只有在需要的地方才使用。
主要是虚拟机中安装CentOS每次总会做一些设置,记录下来方便以后。
纯粹基本设置,比如本地SecureCRT可以连接虚拟机中的CentOS。
复杂的非基本设置见:
安装缺失文件
下载上传命令
rz: command not found
# yum -y install lrzsz
--------------------------------------------
安装C语言编译器gcc
cc: command not found
#yum -y install gcc
说明:-y说明安装直接选择yes--------------------------------------------
安装C++编译器
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++
--------------------------------------------
安装解压缩命令
#yum install -y unzip zip
=========================
本地windows上传shell到Linux不能执行
# yum install -y dos2unix
# yum install unix2dos
=========================
修改yum源
centos使用网易163的源和自动匹配源插件yum-fastestmirror
//先备份原来的设置,做什么修改之前都要有的习惯
# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
网易centos帮助:
CentOS-6# wget -O /etc/yum.repos.d/CentOS-Base.repo# yum makecacheyum-fastestmirror插件自动选择最快的yum源。
安装方法如下:centos5:# yum -y install yum-fastestmirror安装之后,生成配置文件/etc/yum/pluginconf.d/fastestmirror.conf。配置文件中的hostfilepath字段,用于定义yum源的配置文件(通常是/var/cache/yum/timedhosts.txt),然后我们就可以将所知道的yum源统统写入这个txt文件,如: mirror01.idc.hinet.net mirror.khlug.org centos.vr-zone.com mirror.yongbok.netmirrors.btte.net mirrors.sin1.sg.voxel.net mirrors.163.com mirror.neu.edu.cnmirrors.ta139.com centos.mirror.cdnetworks.com centos.tt.co.kr mirror.averse.netmirror.nus.edu.sgdata.nicehosting.co.kr 当然,如果你的yum版本比较高,会系统会自动将常用的yum源写入此文件。 这样,以后我们在yum安装rpm包的时候,就可以让yum自己去选择yum源了。目前公认较快的yum源是网易的:mirrors.163.com。
-----------------------------------------
如果yum源没有直接下载到本地
#yum localinstall 文件
下载rpm
#rpm -i 文件
-------------------------------------------
安装telnet
#yum -y install telnet
--------------------------------------------
安装lua
#yum -y install lua
#yum -y install lua-devel
----------------------------------------
phpize时提示
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.# wget
# tar -zvxf autoconf-2.62.tar.gz# cd autoconf-2.62/# ./configure && make && make install---------------------------------------------
getcwd: cannot access parent directories的解决方法
getcwd 命令无法定位到当前工作目录。一般来说是因为你 cd 到了某个目录之后 rm 了这个目录
这时去执行某些 service 脚本的时候就会报 getcwd 。只需要 cd 到任何一个实际存在的目录下在执行命令即可。出现这种现象的原因还有,当前用户没有当前目录的可执行权限----------------------------------------------
设置网络
自动连接
#cat /etc/sysconfig/network-scripts/ifcfg-eth0 ONBOOT=yes
重启网卡
#service network restart
------------------------------------------
转载地址:https://linuxstyle.blog.csdn.net/article/details/8173338 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!