debian インストール後にやること。

chmod a+x //すべてのユーザーに実行権限を与える
chown -R user名 srcds //ディレクトリ以下のすべてのファイルの権限を変更する

apt-get update //パッケージのリストをサーバーから入手する
apt-get upgrade //システムにインストールされているパッケージをアップデートする

*SSHのポート番号を変更
nano /etc/ssh/sshd_config
Port **
/etc/init.d/ssh reload

*スクリーンのインストール
apt-get install screen
nano .screenrc

autodetach on
bell_msg "^G"
defkanji utf-8
defencoding utf-8
encoding utf-8 utf-8
defscrollback 10000
escape ^Jj
startup_message off
vbell off
caption always "%{= wb} %-w%{=bu dr}%n %t%{-}%+w %= %{=b wk} [%l] %{=b wb}%y/%m/%d(%D) %{=b wm}%c"
bind n screen
bind h prev
bind j next
bind l windowlist

*ネットワークのバッファサイズ拡張
apt-get install ethtool
ethtool -g eth0 //設定の確認

*カーネルパラメータの調整
nano /etc/sysctl.conf

vm.swappiness = 0
kernel.panic = 10
net.ipv4.ip_local_port_range = 4096 65535
net.core.netdev_max_backlog = 40000
net.core.somaxconn = 512
net.ipv4.udp_rmem_min = 60000
net.ipv4.udp_wmem_min = 60000
net.core.rmem_max = 2097150
net.core.wmem_max = 2097150
net.core.rmem_default = 1048575
net.core.wmem_default = 1048575
net.core.optmem_max = 1048575

*CPUの周波数変動の設定
aptitude install cpufrequtils
grep "MHz" /proc/cpuinfo //周波数の確認

*ipv6の無効化
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf sysctl -p

*ファイヤーオールの設定
aptitude -y install iptables iptables-persistent
nano /etc/iptables/rules.v4

--------------------------
*filter

# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT

# Accepts all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Allows all outbound traffic
# You could modify this to only allow certain traffic
-A OUTPUT -j ACCEPT

# Allows srcds connections
-A INPUT -p udp --dport ***** -j ACCEPT
-A INPUT -p udp --dport ***** -j ACCEPT

# Allows SSH connections
# THE -dport NUMBER IS THE SAME ONE YOU SET UP IN THE SSHD_CONFIG FILE
-A INPUT -p tcp -m state --state NEW --dport ** -j ACCEPT

# Now you should read up on iptables rules and consider whether ssh access
# for everyone is really desired. Most likely you will only allow access from certain IPs.

# Allow ping
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT

# log iptables denied calls (access via 'dmesg' command)
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

# Reject all other inbound - default deny unless explicitly allowed policy:
-A INPUT -j REJECT
-A FORWARD -j REJECT

COMMIT
--------------------------

/etc/init.d/iptables-persistent restart
iptables -L

dpkg --add-architecture i386
apt-get update
apt-get install lib32gcc1 lib32z1

この操作後に追加で 87.9 MB のディスク容量が消費されます。
続行しますか [Y/n]? y

cd /
mkdir srcds
cd srcds
mkdir install
cd install
wget "http://media.steampowered.com/client/steamcmd_linux.tar.gz"
tar xvf steamcmd_linux.tar.gz
STEAMEXE=steamcmd ./steam.sh

Steam>login anonymous

Connecting anonymously to Steam Public...Success.

Steam>force_install_dir /srcds/csgo
Steam>app_update 740 validate

App state (0x300502) downloading, progress: 98.63 (5558835698 / 5636329177)
App state (0x300502) downloading, progress: 99.55 (5610714818 / 5636329177)
App state (0x300502) downloading, progress: 100.00 (5636268005 / 5636329177)
Success! App '740' fully installed.

Steam>quit

crontab -e

00 17 * * * /*****/aimmap start
05 17 * * * cpufreq-set -r -g performance
25 17 * * * ethtool -G eth0 rx 512
27 17 * * * ethtool -G eth0 tx 512
00 19 * * * cpufreq-set -c 1 -g performance
35 01 * * * /sbin/shutdown -h now

05 07 * * * /sbin/shutdown -r now
30 07 * * * /root/aimmap start

/etc/init.d/cron restart

2014-11-01 : SRCDS : コメント : 0 :
Pagetop
コメントの投稿
非公開コメント

Pagetop
« next  ホーム  prev »

過去ログ