网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > 服务器环境搭建
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

服务器环境搭建 Windows,Linux,IIS,Apache等服务器配置、安全维护以及PHP和MYSQL运行环境讨论。

Reply
 
Thread Tools Display Modes
  #1   IP: 153.99.87.253
Old 2016-05-20, 10:51 PM
Decoursey Decoursey is offline
初级会员
 
Join Date: 2012-03-02
Posts: 1
Decoursey 现在声名狼藉
Default CentOS装机必备-基本设置以及缺失文件

SecureCRT中注意不要使用以Ascii方式上传文件,只有在需要的地方才使用。



主要是虚拟机中安装CentOS每次总会做一些设置,记录下来方便以后。

纯粹基本设置,比如本地SecureCRT可以连接虚拟机中的CentOS。

复杂的非基本设置见:Linux 命令集锦



安装缺失文件




下载上传命令

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源

添加 yum 源


centos 推荐使用epel源

centos使用网易163的源和自动匹配源插件yum-fastestmirror

//先备份原来的设置,做什么修改之前都要有的习惯

# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

网易centos帮助: http://mirrors.163.com/.help/centos.html
CentOS-6
# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo -O /etc/yum.repos.d/CentOS-Base.repo
# yum makecache

yum-fastestmirror插件自动选择最快的yum源。

安装方法如下:
centos5:
# yum -y install yum-fastestmirror


安装之后,生成配置文件/etc/yum/pluginconf.d/fastestmirror.conf。配置文件中的hostfilepath字段,用于定义yum源的配置文件(通常是/var/cache/yum/timedhosts.txt),然后我们就可以将所知道的yum源统统写入这个txt文件,如:

ftp.nsysu.edu.tw
mirror01.idc.hinet.net
mirror.khlug.org
centos.vr-zone.com
ftp.stu.edu.tw
ftp.cse.yzu.edu.tw
mirror.yongbok.net
mirrors.btte.net
mirrors.sin1.sg.voxel.net
ftp.daum.net
ftp.isu.edu.tw
mirrors.163.com
mirror.neu.edu.cn
mirrors.ta139.com
ftp.oss.eznetsols.org
centos.mirror.cdnetworks.com
centos.tt.co.kr
ftp.tc.edu.tw
ftp.twaren.net
mirror.averse.net
mirror.nus.edu.sg
data.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 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

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

getcwd: cannot access parent directories的解决方法

getcwd 命令无法定位到当前工作目录。一般来说是因为你 cd 到了某个目录之后 rm 了这个目录
这时去执行某些 service 脚本的时候就会报 getcwd 。
只需要 cd 到任何一个实际存在的目录下在执行命令即可。
出现这种现象的原因还有,当前用户没有当前目录的可执行权限

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


设置网络

自动连接

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



重启网卡

#service network restart
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 07:27 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.