È¥ÀÚ¼ ÀÌ°ÍÀú°Í ½ÃÇàÂø¿À¸¦ °¡Áö°í Á¤¸®Çؼ ¾´ ±ÛÀÔ´Ï´Ù. ¿À·ù°¡ ÀÖÀ»¼öµµ ÀÖ°í ¹®Á¦°¡ ¹ß»ýÇÒ¼öµµ ÀÖ½À´Ï´Ù¸¸ µµ¿òÀÌ µÇ±â¸¦... ¾Æ·¡ Ƽ½ºÅ丮 °¡½Ã¸é Á¶±Ý ´õ Æí¾ÈÇÏ°Ô º¸½Ç¼ö ÀÖ½À´Ï´Ù.
http://boayo.tistory.com/25
webmin ¼³Ä¡Çؼ samba, proftpd, webdav ±×¸®°í EBS ³ìÀ½±îÁö ¼³Á¤ ¸¶Ä§.
Çϵ带 ±³Ã¼ÇÏ¿´°Å³ª µ¥ºñ¾È ¼³Ä¡ÈÄ¿¡ óÀ½ ¼³Á¤ ÇÒ °æ¿ì
fdisk -l ·Î Çϵå È®ÀÎÇÏ°í
fdisk /dev/sda d //±âÁ¸ ÆÄƼ¼Ç »èÁ¦ n // »õ ÆÄƼ¼Ç p // primary ·Î 1 // ÇϳªÀÇ ÆÄƼ¼Ç enter // default »çÀÌÁî enter // default »çÀÌÁî w // µð½ºÅ©¿¡ ¾²±â
mkfs ext4 /dev/sda1 // ext4 ·Î Æ÷¸Ë
mkdir /mnt/nas
mount /dev/sda1 /mnt/nas
chown nobody.users /mnt/nas // ¼ÒÀ¯ÀÚ º¯°æ
chmod g+w /mnt/nas // ±×·ì¿¡ ¾²±â ±ÇÇÑ
¾Æ·¡¿¡¼´Â mnt ¾Æ·¡¿¡ public, private µÎ Æú´õ·Î ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.
webmin ¼³Ä¡ ½ÃÀÛ
nano /etc/apt/sources.list ¿¡¼ Ãß°¡
deb http://download.webmin.com/download/repository sarge contrib
cd /root wget http://www.webmin.com/jcameron-key.asc apt-key add jcameron-key.asc
apt-get update apt-get install apt-transport-https apt-get install webmin
system - users and groups ¿¡¼ »ç¿ëÀÚ Ãß°¡
unused modules - samba windows file sharing Ãß°¡
unused modules - proftpd server Ãß°¡
nginx ¼³Ä¡
apt-get install -y nginx php5-fpm php5-cgi libhtml-parser-perl
webmin - webmin configuration - webmin modules ¿¡¼ install from url ¿¡ ¾Æ·¡ ¸µÅ©·Î ¼³Ä¡
https://www.justindhoffman.com/sites/justindhoffman.com/files/nginx-0.10.wbm_.gz
webdav »ç¿ëÀÚ Ãß°¡ÇÏ°í nginx °¡ »ç¿ëÇÒ µð·ºÅ丮 »ý¼º
#printf "id:$(openssl passwd -crypt password)\n" >> /mnt/.htpasswd
#mkdir /tmp/nginx
±×¸®°í ´Ù½Ã webmin Á¢¼ÓÇϸé servers ¿¡¼ webdav, proftpd, samba ¼³Á¤ ÇÒ¼ö ÀÖ´Ù.
webdav ¼³Á¤ ½ÃÀÛ
server - nginx webserver - default ¼³Á¤
nano /etc/nginx/sites-available/default ·Î ssh Á¢¼ÓÇؼ Á÷Á¢ ¼³Á¤µµ °¡´É
# Default server configuration # server { listen 80 default_server; listen [::]:80 default_server;
# include snippets/snakeoil.conf;
root /mnt; charset utf-8; #ÇÑ±Û ÀÎÄÚµù
# Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html index.php;
server_name [your_domain_name]; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; }
location /webdav { # Á¢¼ÓÇÏ°í ½ÍÀº µÞºÎºÐ ÁÖ¼Ò autoindex on; alias /mnt/public/EBS; # °øÀ¯ÇÏ°í ½ÍÀº À§Ä¡ auth_basic "Restricted Access"; auth_basic_user_file /mnt/.htpasswd; # ºñ¹ø ÀúÀå À§Ä¡ client_body_temp_path /tmp/nginx/webdav; # ÀÓ½ÃÆÄÀÏ ÀúÀå À§Ä¡ dav_methods PUT DELETE MKCOL COPY MOVE; # ±âº»¸ðµâ ¿É¼Ç dav_ext_methods PROPFIND OPTIONS; # È®Àå¸ðµâ ¿É¼Ç create_full_put_path on; dav_access user:rw group:rw all:r; # ±ÇÇÑ¿¡ ´ëÇÑ ³»¿ë }
}
proftpd ¼³Á¤ ½ÃÀÛ
server - proftpd server - edit config files ¼³Á¤
nano /etc/proftpd/proftpd.conf ·Î ssh Á¢¼ÓÇؼ Á÷Á¢ ¼³Á¤µµ °¡´É
# # /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file. # To really apply changes, reload proftpd after modifications, if # it runs in daemon mode. It is not required in inetd/xinetd mode. #
# Includes DSO modules Include /etc/proftpd/modules.conf
# Set off to disable IPv6 support which is annoying on IPv4 only boxes. UseIPv6 on # If set on you can experience a longer connection delay in many cases. IdentLookups off
ServerName "Debian" ServerType standalone DeferWelcome off
MultilineRFC2228 on DefaultServer on ShowSymlinks on
TimeoutNoTransfer 600 TimeoutStalled 600 TimeoutIdle 1200
DisplayLogin welcome.msg DisplayChdir .message true ListOptions "-l"
DenyFilter \*.*/
# Use this to jail all users in their homes # DefaultRoot ~
# Users require a valid shell listed in /etc/shells to login. # Use this directive to release that constrain. # RequireValidShell off
# Port 21 is the standard FTP port. Port 21
# This is useful for masquerading address with dynamic IPs: # refresh any configured MasqueradeAddress directives every 8 hours <IfModule mod_dynmasq.c> # DynMasqRefresh 28800 </IfModule>
# To prevent DoS attacks, set the maximum number of child processes # to 30. If you need to allow more than 30 concurrent connections # at once, simply increase this value. Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server # that allows you to limit maximum number of processes per service # (such as xinetd) MaxInstances 30
# Set the user and group that the server normally runs at. User proftpd Group nogroup
# Umask 022 is a good standard umask to prevent new files and dirs # (second parm) from being group and world writable. Umask 022 022 # Normally, we want files to be overwriteable. AllowOverwrite on
TransferLog /var/log/proftpd/xferlog SystemLog /var/log/proftpd/proftpd.log
<IfModule mod_quotatab.c> QuotaEngine off </IfModule>
<IfModule mod_ratio.c> Ratios off </IfModule>
# Delay engine reduces impact of the so-called Timing Attack described in # http://www.securityfocus.com/bid/11430/discuss # It is on by default. <IfModule mod_delay.c> DelayEngine on </IfModule>
<IfModule mod_ctrls.c> ControlsEngine off ControlsMaxClients 2 ControlsLog /var/log/proftpd/controls.log ControlsInterval 5 ControlsSocket /var/run/proftpd/proftpd.sock </IfModule>
<IfModule mod_ctrls_admin.c> AdminControlsEngine off </IfModule>
# Include other custom configuration files Include /etc/proftpd/conf.d/ DefaultChdir /mnt DefaultRoot /mnt
#VALID LOGINS <Limit LOGIN> AllowUser dad AllowUser kids DenyALL </Limit> <Directory /mnt/private> <Limit ALL> AllowUser OR dad DenyAll </Limit> <Limit READ DIRS> AllowUser OR dad DenyAll </Limit> </Directory>
<Directory /mnt/public> <Limit ALL> AllowUser OR kids,dad DenyAll </Limit> <Limit READ DIRS> AllowUser OR kids,dad DenyAll </Limit> </Directory>
samba ¼³Á¤ ½ÃÀÛ
server - samba windows file sharing - edit config files ¼³Á¤
nano /etc/samba/smb.conf ·Î ssh Á¢¼ÓÇؼ Á÷Á¢ ¼³Á¤µµ °¡´É
[global] passwd program = /usr/bin/passwd %u pam password change = yes dns proxy = no map to guest = bad user obey pam restrictions = yes passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . server role = standalone server log file = /var/log/samba/log.%m workgroup = WORKGROUP syslog = 0 os level = 20 usershare allow guests = yes unix password sync = yes security = user passdb backend = tdbsam max log size = 1000 panic action = /usr/share/samba/panic-action %d server string = MARIO netbios name = MARIO
[admin] create mask = 0666 directory mask = 0777 writeable = yes valid users = dad path = /mnt/private [kids] create mask = 0666 writeable = yes valid users = kids,dad path = /mnt/public directory mask = 0777
hdparm ¼³Á¤
Çϵå ÀýÀü À§ÇØ hdparm ¼³Ä¡
apt-get install hdparm
nano /etc/hdparm.conf ¿¡ Ãß°¡
/dev/sda { spindown_time = 120 }
/dev/sdb { spindown_time = 120 }
EBS ³ìÀ½ ÇÏ·Á¸é
nano /etc/apt/sources.list Ãß°¡
deb http://ftp.nz.debian.org/debian jessie-backports main
°ü·Ã ¾Û ¼³Ä¡
apt-get update
apt-get install rtmpdump ffmpeg ntp cron
crontab -e ½ÇÇàÇؼ ¾Æ·¡ Ãß°¡
0 5 * * 1-6 /mnt/public/EBS/ebs_record.sh Pocket-CH 10 /mnt/public/EBS/1Pocket-CH 30 5 * * 4-6 /mnt/public/EBS/ebs_record.sh Basic-CH 20 /mnt/public/EBS/2Basic-CH 20 6 * * 1-6 /mnt/public/EBS/ebs_record.sh Easywriting 20 /mnt/public/EBS/3Easywriting 40 7 * * 1-6 /mnt/public/EBS/ebs_record.sh English 20 /mnt/public/EBS/4English
nano /mnt/public/EBS/ebs_record.sh
#!/bin/bash
RADIO_ADDR="rtmp://ebsandroid.ebs.co.kr:1935/fmradiofamilypc/familypc1m"
RADIO_NAME="ebs_radio"
PROGRAM_NAME=$1
RECORD_MINS=$(($2 * 60))
DEST_DIR=$3
REC_DATE=`date +%Y%m%d-%H%M`
TEMP_FLV=/mnt/public/EBS/`date +%Y%m%d-%H%M`
M4A_FILE_NAME=$PROGRAM_NAME"_"$REC_DATE.m4a
rtmpdump -r $RADIO_ADDR -B $RECORD_MINS -o $TEMP_FLV
ffmpeg -i $TEMP_FLV -vn -acodec copy $M4A_FILE_NAME > /dev/null 2>&1
rm $TEMP_FLV
mkdir -p $DEST_DIR
mv $M4A_FILE_NAME $DEST_DIR
¿ª½Ã ¼³Á¤ ÀúÀåÇØµÐ°Ô ÀÖÀ¸´Ï ÆíÇÏ´Ù. ¹é¾÷ ¹é¾÷ ¹é¾÷ ÇսôÙ.
ajenti ¸¦ »ç¿ëÇØ º¸·Á°í ÇßÁö¸¸ Àͼ÷ÇÏÁö ¾Ê¾Æ¼ÀÎÁö Æ©Å丮¾óµµ ¾ø°í »ç¿ë °Á°¡ ¾ø¾î¼
´çºÐ°£ webmin ¿¡ Á¤Âø
¼Óµµ´Â samba³ª ftp ³ª 100¸Þ°¡ ÀÌ»ó ³ª¿À´Âµí...
| |
|
Àú´Â ·¹µåÇÞ°è¿ÀÌÁö¸¸¿ä ...