选择第一项 Boot Arch Linux Live CD
/arch/setup
我们选择第一个,CD安装
base-devel因为arch源更新太快,不如直接线上同步
LOCALE="zh_CN.UTF-8"
将里面zh_CN前面的"#"全部去掉,保存推出
nameserver 192.168.0.230 nameserver 8.8.8.8
#title Windows #rootnoverify #makeactive #chainloader +1
将grub安装到硬盘
关机 poweroff 重启 reboot
mount tmpfs /tmp -o size 512m
为了将ecos cache放置到tmpfs上,把该命令加入/etc/rc.local保重每次重启加载
卸载命令
umout /tmp
pacman -Syu base-devel openssh python curl boost boost-libs pcre spidermonkey tcsh scons readline gcc ncurses git ntp ntpdate db mcrypt vim inetutils
修改/etc/sysctl.conf
# Add net.ipv4.tcp_max_syn_backlog = 65536 net.core.netdev_max_backlog = 32768 net.core.somaxconn = 32768 net.core.wmem_default = 8388608 net.core.rmem_default = 8388608 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_timestamps = 0 net.ipv4.tcp_synack_retries = 2 net.ipv4.tcp_syn_retries = 2 net.ipv4.tcp_tw_recycle = 1 #net.ipv4.tcp_tw_len = 1 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_mem = 94500000 915000000 927000000 net.ipv4.tcp_max_orphans = 3276800 #net.ipv4.tcp_fin_timeout = 30 #net.ipv4.tcp_keepalive_time = 120 net.ipv4.ip_local_port_range = 1024 65535 kernel.shmmax=268435456
配置立即生效
/sbin/sysctl -p
修改文件/etc/security/limits.conf,在最末尾添加
* soft nofile 1024000 * hard nofile 1024000
用下面的命令检查是否收效
ulimit -a
/etc/hosts.allow
ALL:ALL/etc/hosts.deny
#ALL: ALL hosts.deny 允许所有的
/etc/rc.conf
DAEMONS=(syslog-ng network netfs crond sshd ntp ntpdate)
修改如上的服务器启动