技术头条 - 一个快速在微博传播文章的方式     搜索本站
您现在的位置首页 --> 系统运维 --> Linux服务器基本安装

Linux服务器基本安装

浏览:2277次  出处信息

    作者:吴炳锡 来源:http://www.mysqlsupport.cn/ 联系方式: wubingxi#gmail.com 转载请注明作/译者和出处,并且不能用于商业用途,违者必究。

     该文档只用于一般服务器的安装,其它专用服务器安装仅供参考。

    系统安装步骤:

    1)输入linux text选择text安装模式。

    2)安装时语言环境选English。

    3)键盘类型选us。

    4)鼠标选择No-mouse。

    5)安装类型选Custom。

    6)分区设置为:

    /dev/sda

    /dev/sda1 512M ext3 /boot

    /dev/sda2 5G ext3 /home

    /dev/sda3 3G ext3 /

    /dev/sda4 Extended

    /dev/sda5 5G ext3 /var

    /dev/sda6 2G ext3 swap

    /dev/sda7 余空间 /data

    7)使用GRUB Boot loader。

    8)不增加参数在Boot Loader Configuration。

    9)不为Boot Loader设置密码。

    10)设置Boot Loader启动Linux。

    11)将Boot Loader安装在硬盘的MBR。

    12)网络设置,按分配的IP配置网卡。

    /etc/sysconfig/network-scripts/

    #ls ifcfg-*

    ifcfg-eth0 ifcfg-eth1 ifcfg-lo

    编辑相应文件

    /sbin/service network restart

    13)主机名称视情况而定,预定为WEB-数字,数字为IP最后3位。

    14)防火墙的安全级别设为No firewall,禁用SEClinux

    15)语言支持选English (USA) 和Chinese (P.R. of China)。

    16)默认语言为English (USA)。

    17)时区选Asia/Shanghai。

    18)Root Password为:redhat

    19)Authentication Configuration启用Use Shadow Passwords和Enable MD5 Passwords。

    20)Package Group选择:

    @ Editors

    @ Text-based Internet

    @ Server Configuration Tools

    @ Development Tools

    @ Kernel Development

    @ Administration Tools

    @ System Tools

    21)不必创建Boot Diskette。

    22)配置显示选项,指定启动时进入文本模式。

    OS安装完毕。

    安装后配置

    1) 禁用ssh1登录

    vi /etc/ssh/sshd_config

    #Port 22

    #Protocol 2,1

    修改为

    Port 22

    Protocol 2

    2) 禁用多于服务

    rm /etc/rc.d/rc3.d/* -rf

    chkconfig network on

    chkconfig rsync on

    chkconfig sshd on

    chkconfig syslog on

    chkconfig crond on

    chkconfig xinetd on

    根据需要加入自已的相应服务。

    3)限制登录IP

    vi /etc/hosts.allow

    加入

    all:IP.:allow

    all:all:deny

    IP为允许进入管理的IP。当然这个文件也可以不用。

    4)定时同步时间

    crontab -e

    加入

    0 0 * * * rdate -s time-a.nist.gov

    or

    10 03 * * * /usr/sbin/ntpdate -u tick.ucla.edu tock.gpsclock.com ntp.nasa.gov timekeeper.isi.edu usno.pa-x.dec.com

    5)关闭ipv6

    echo “alias net-pf-10 off” >> /etc/modprobe.conf.dist

建议继续学习:

  1. 移动互联网创业公司的服务器选择    (阅读:4779)
  2. Hadoop超级安装手册    (阅读:3914)
  3. 通过HttpListener实现轻量级Web服务器[原创]    (阅读:3295)
  4. Ubuntu下Postgresql-8.4安装及配置    (阅读:3301)
  5. 查看你服务器的安全性    (阅读:3118)
  6. 在 Dell PowerEdge 1950 上安装 Linux 2.6.32-rc8 内核的问题与解决    (阅读:2904)
  7. 详细步骤:在64位Linux上安装Memcached    (阅读:2869)
  8. Ruby作为服务器端应用已经成熟了    (阅读:2606)
  9. MySQL Infobright 数据仓库快速安装笔记[原创]    (阅读:2598)
  10. mysql 的模块不能安装的解决方法    (阅读:2528)
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
© 2009 - 2024 by blogread.cn 微博:@IT技术博客大学习

京ICP备15002552号-1