您的位置:首页 > 运维架构 > Linux

CentOS — 配置网卡、FTP、安装AMP

2012-03-15 22:43 363 查看
这篇短文记录了从拿到服务器的root账号和密码后,如何部署服务器的文章。本篇文章适合给Linux初学者参考。

步骤

* 修改root用户密码

paddwd root


* 配置多IP地址

A 在不重启的情况下,绑定IP地址

ifconfig eth0:1 x.x.x.x netmask 255.255.255.0
ifconfig eth0:2 x.x.x.x netmask 255.255.255.0


B 保存配置信息到文件

1 拷贝配置信息

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:2


2 使用vi命令,修改对应的配置文件

vi /etc/sysconfig/network-scripts/ifcfg-eth0:1


DEVICE=eth0
BOOTPROTO=none
HWADDR=00:1e:90:ee:2c:6f
ONBOOT=yes
NETMASK=255.255.255.0   #这里填写服务商提供的子网掩码
IPADDR=x.x.x.x       #这里填写你要分配的IP地址
GATEWAY=x.x.x.x       #这里填写服务商提供的网关IP
TYPE=Ethernet


service network restart


* 或者保存 ifconfig 的命令到 /etc/rc.d/rc.local 文件中

* 安装Apache,Mysql,PHP

默认CentOS上已经安装了Apache 2.2,我们只需要安装Mysql,PHP即可。安装过程也很简单,使用yum命令。这里有一遍具体将如何安装的文章

CentOS 5.x yum安装LAMP(Apache+MySQL+PHP)

或者参考这里:CentOS — 搭建 LAMP 运行环境

配置Apache

cd /etc/httpd/conf/
cd /etc/httpd/conf/extra/


<VirtualHost x.x.x.x:80>
ServerAdmin google@gmail.com
DocumentRoot /home/website/www.google.com
ServerName google.com
ServerAlias www.google.com
ErrorLog logs/dummy-google.com-error_log
CustomLog logs/dummy-google.com-access_log common
</VirtualHost>


* VSFTPD

centos 5 yum安装与配置vsFTPd FTP服务器

== VsFtpd ==
今天用root用户登录vsftpd出现530 Login incorrect错误与530 Permission denied错误。
530 Permission denied
原因是/etc/vsftpd/vsftpd.conf里userlist_enable=YES
/etc/vsftpd/user_list 含有root名单
2种解决办法:

userlist_enable=NO

将root从user_list中去掉 + 将root从/etc/vsftpd/ftpusers中去掉

530 Login incorrect错误
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: