Skip to content

Instantly share code, notes, and snippets.

@nefo-mi
Forked from naoto/serversman_vps_setup.mkdn
Created October 27, 2010 02:38
Show Gist options
  • Save nefo-mi/648310 to your computer and use it in GitHub Desktop.
Save nefo-mi/648310 to your computer and use it in GitHub Desktop.

ServersMan@vps Debian/GNUセットアップ内容

0. サーバ状態

   $ uname -a
   Linux dti-vps-srv25 2.6.18-194.3.1.el5.028stab069.6 #1 SMP Wed May 26 18:31:05 MSD 2010 i686 GNU/Linux

   $ df -lh
   Filesystem            Size  Used Avail Use% Mounted on
   /dev/simfs             30G  373M   30G   2% /
   tmpfs                 512M     0  512M   0% /lib/init/rw
   tmpfs                 512M     0  512M   0% /dev/shm


   $ free -m
   total       used       free     shared    buffers     cached
   Mem:          1024         15       1008          0          0          0
   -/+ buffers/cache:         15       1008
   Swap:            0          0          0


   $ more /proc/cpuinfo
   processor       : 0
   vendor_id       : GenuineIntel
   cpu family      : 6
   model           : 26
   model name      : Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz
   stepping        : 5
   cpu MHz         : 903.099
   cache size      : 8192 KB
   physical id     : 1
   siblings        : 8
   core id         : 0
   cpu cores       : 4
   apicid          : 16
   fpu             : yes
   fpu_exception   : yes
   cpuid level     : 11
   wp              : yes
   flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm sys
   call nx rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
   bogomips        : 4522.12
   clflush size    : 64
   cache_alignment : 64
   address sizes   : 40 bits physical, 48 bits virtual
   power management: [8]

   processor       : 1
   vendor_id       : GenuineIntel
   cpu family      : 6
   model           : 26
   model name      : Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz
   stepping        : 5
   cpu MHz         : 903.099
   cache size      : 8192 KB
   physical id     : 0
   siblings        : 8
   core id         : 0
   cpu cores       : 4
   apicid          : 0
   fpu             : yes
   fpu_exception   : yes
   cpuid level     : 11
   wp              : yes
   flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm sys
   call nx rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
   bogomips        : 4522.04
   clflush size    : 64
   cache_alignment : 64
   address sizes   : 40 bits physical, 48 bits virtual
   power management: [8]

1. 設定

ユーザ追加

   # adduser -G wheel user

ssh設定

   # vi /etc/ssh/sshd_config
   Port xxxxxxxxxxx
   PermitRootLogin no

   dti-vps-srv11:~# /etc/init.d/ssh reload
   Reloading OpenBSD Secure Shell server's configuration: sshd

sudo 設定

   # visudo
   ## add sudo user and group
   user        ALL=(ALL)       ALL
   %wheel      ALL=(ALL)       ALL

sudo時にエラーが出る対応

   $ vi /etc/hosts
   127.0.1.1 HOSTNAME

fail2banのインストール

   $ sudo apt-get install aptitude
   $ sudo aptitude install fail2ban
   $ sudo vim /etc/fail2ban/jail.conf

DropBoxインストール

   $ wget -O dropbox http://www.dropbox.com/download?dl=packages/dropbox.py
   $ chmod 744 dropbox
   $ mv dropbox ~/bin
   $ bin/dropbox start -i
   $ .dropbox-dist/dropboxd&
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment