�����Ώ�����
2006������07·���10������
CentOS������vi\��\���\��\��ď�����\«\������¼²½����LINUX����
[root@admin/]# yum -y install vim-enhanced
[2]"vi"�����ҏ��������¾������vim���������Ð�����ď��·���������¹��¡�
[root@admin/]# alias vi='vim'
[3]"vi"�������������¾�돪�������³���������·���������¹��¡�
[root@admin/]# which vi
[4]"bashrc\���\���\���\���"���������Ð�����ď��·���������¹��¡�
[root@admin/]# vi /etc/bashrc
²¼µ�����ҏ�돪�½���¹��ԏ�����������²������·���������¹��¡�
alias vi='vim'
CentOS������¼«����돪���쏢����»���¹��������ҏ��µ³�������¹������������»�����������Ώ���������LINUX����
�����������돢돪�½���������\��\���\���\��я��������������������������¹��¡�
[root@admin/]# su -
²¼µ�������½¼������root@admin/���root@admin~�������������������������������¹��¡�
[root@admin~]#
[1]"ntp"������\���\���\¹\������¼\��������ҏ��·���������¹��¡�
[root@admin~]# yum -y install ntp
[2]"ntpdate \³\���\���\���"������»��С���ӏ����ҏ��·���������¹��¡�
[root@admin~]# ntpdate ntp.nex.ne.jp
[3]"\·\¹\���\���»��С���ӏ�����¹������������»������sh\¹\���\���\��\���"�����ҏ�돫�����·���������¹��¡�
[root@admin~]# vi ntpdate
[4]"\·\¹\���\���»��С���ӏ�����¹������������»������sh\¹\���\���\��\���"�����ҏ�돫�����·���������¹��¡�
[root@admin/]# vi ntpdate
[root@admin~]#!/bin/sh
/usb/sbin/ntp.nex.ne.jp > /dev/null
[5]"��돫�����·������\���\���\���\��������������"�����ҏ�����¹¹���·���������¹��¡�
[root@admin/]# chmod 755 ntpdate
[6]"������������¼«�����¼���¹��ԏ��µ������������\���\��\���\���\���\���"�������돪䏩��돢�·���������¹��¡�
[root@admin~]# mv ntpdate /etc/cron.daily/
CentOS������FTP\µ���¼\Ð���������Ώ���������LINUX����
[1]"vdftpd"������\���\���\¹\������¼\��������ҏ��·���������¹��¡�
[root@admin/]# yum -y install vsftpd
[2]"vsFTPD���������Ώ�����\���\���\���\���"�����ҏ�����½������·���������¹��¡�
[root@admin/]# vi /etc/vsftpd/vsftpd.conf
# �����ď��¾\������¼\��������\���\��\���\��я��µ���»������������
anonymous_enable=NO
# \��\���\���\���»��Џ�����\���\���\���\��\���\��������ҏ����Ώ�����(600������)
idle_session_timeout=600
# �����䏪�³»���»��Џ�����\���\���\���\��\���\��������ҏ����Ώ�����(60������)
data_connection_timeout=60
\��\¹\���¼\������¼\���������\��\���\��\������¼\���µ���²������¹������
ascii_upload_enable=YES
# \��\¹\���¼\������¼\���������\���\���\���\������¼\���µ���²������¹������
ascii_download_enable=YES
\���\��\���\���»��Џ�����\��\������¼\���\��\���\��\Ð\������¼
ftpd_banner=Welcome to ¹\������������¾����돢���ҏ����Џ��� FTP service.
# �돫�������\������¼\��������\��叢�¼\���\���\¹������������¾���������\��\���\»\¹���µ���»������������
chroot_list_enable=YES
\��叢�¼\���\���\¹������������¾���������\��\���\»\¹���µ���»������������\������¼\��\���\¹\���\���\���\���\���
chroot_list_file=/etc/vsftpd/chroot_list
# \���\��\���\���\���\��������ҏ�돫�½���²������½���������¹������
ls_recurse_enable=YES
/etc/vsftpd/user_list������½��Џ�������������������\������¼\�� ������\���\��\���\��я��µ���»������������
userlist_enable=YES
��²¼µ������²���¹��������䏢�������¹��¡�
# \������¼\�����̏�����������¹��Џ����я�����ftp\³\���\���\���������\���\�돢����»������¹(²¼µ��²������)
xferlog_std_format=NO
log_ftp_protocol=YES
# \���\���\���\¹\���\���\��»��С���ӏ����ҏ����䏪����»��С���ӏ�����¹������������»������
use_localtime=YES
# \���\���\·\���\������¼\��������ҏ����̏����Џ��������¹������
pasv_promiscuous=YES
# \���\���\·\���\������¼\��������̏�����»��Џ�����\����¼\����������돪�(������¡�50000����50030)
pasv_min_port=50000
pasv_max_port=50030
����FTP�����䏪�³\������¼\�����������Ώ���������
[3]"\��叢�¼\���\���\¹������������¾���������\��\���\»\¹���µ���»������������\������¼\���돫������"�����ҏ����Ώ��������·���������¹��¡�
[root@admin/]# vi /etc/vsftpd/chroot_list
���·µ�̏����������Ώ�����\���\���\���\�������chroot_list���������ҏ�돫�����·��¡�\������¼\�����¼���¾���������Џ��������ҏ��·���������¹��¡�
file
luke
gundam
doragonball
[4]"FTP�����䏪�³���µ���»������������\������¼\���돫������"�����ҏ����Ώ��������·���������¹��¡�
[root@admin/]# vi /etc/vsftpd/user_list
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd.ftpusers
# for users that are denied.
root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
# \������¼\������xxxftp��¡ߏ�����FTP�����䏪�³���µ���»�����������������������Ï����������Ώ�����
xxxftp
[5]"FTP\���\��\���\��я��������������\���\���\���\��\���\���"�����ҏ����Ώ��������·���������¹��¡�
[root@admin/]# vi /etc/hosts.allow
vsftpd : 192.168.1. 127.0.0.1 211.xxx.xxx.xxx
[6]"»������������µ������������\���\���\���\��\���\����돪�³�돪���������"µ��Џ��������������Ώ��������·���������¹��¡�
[root@admin/]# vi /etc/hosts.deny
vsftpd : ALL
[7]"vsFTPD"�����ҏ�돩�µ�������돢�·���������¹��¡�
[root@admin/]# /etc/rc.d/init.d/vsftpd restart
[8]"vsFTPD"������µ�������돢�·���������¹��¡�
[root@admin/]# chkconfig vsftpd on
[9]"vsFTPD"������µ�������돢�·���������¹��¡�
[root@admin/]# chkconfig --list vsftpd
²¼µ�������½¼�����̏��¹���������Ð���µ¾������������¹��¡�
vsftpd 0:OFF 1:OFF 2:ON 3:ON 4:ON 5:ON 6:OFF
���³�����������������Ώ�����������½��쏪�»���·���������·�����ď�¡�
¼�������Windows������\���\���\���\��\���\���\���\·\��я��«������\���\��\���\���������¹��ԏ��������������¹��¡�
����\���\���\���\������¾������»������������·������¼���¹��ԏ���cmd������¡ߏ�����¹��ԏ��������������������������µ��������¡�
[10]"\���\���\���\������¾������»������������·������¼���¹���"������µ�������돢�·���������¹��¡�
����cmd��¡ߏ����������Џ������·����������ok��¡ߏ�����\���\���\���\���
[11]"FTP"������µ�������돢�·���������¹��¡�
C:\Documents and Settings\fedora>ftp
[12]"µ��Џ�����\������¼\�����¼������\���\��\���\���"\���\��\���\��������ҏ��·���������¹��¡�
ftp> op���¡�«\³\���\���\���¼���¹���
To 192.168.1.5���¡�«\µ���¼\Ð������IP�����ҏ����Џ���
Connected to 192.168.1.5.
220 (vsFTPd 1.2.1)
User (192.168.1.5:(none)): xxxftp���¡�«µ��Џ������������Ð�����ď��·������\������¼\�����¼���¾
[13]"µ��Џ�����\���\���\»���¼\���"������³�����������ҏ��·���������¹��¡�
530 Permission denied.
Login failed.
[14]"FTP�����䏪�³"������½��쏪�»���·���������¹��¡�
ftp> bye
[15]"\���\���\·\���\������¼\���������¾��؏�����"������³���������·���������¹��¡�
ftp> ls -l
²¼µ������\���\���\»���¼\������̏��½¼�����µ���������������Ð���µ¾������������¹��¡�
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw------- 1 500 500 2049 Oct 05 16:27 Mailbox
226 Directory send OK.
ftp: 65 bytes received in 0.00Seconds 65000.00Kbytes/sec.
ftp>
[16]"\��叢�¼\���\���\¹�돪�³�돢����³�̏������������돪䏩��돢����������������«����"������³���������·���������¹��¡�
ftp> pwd
²¼µ������\���\���\»���¼\������̏��½¼�����µ���������������Ð���µ¾������������¹��¡�
257 "/"
[17]"/root/�������돪䏩���"������³���������·���������¹��¡�
ftp> cd /root/
²¼µ������\���\���\»���¼\������̏��½¼�����µ���������������Ð���µ¾������������¹��¡�
550 Failed to change directory.
[18]"\µ���¼\Ð������\���\���\���\��������ҏ��¾�����"������³���������·���������¹��¡�
ftp> put c:\textfile
²¼µ������\���\���\»���¼\������̏��½¼�����µ���������������Ð���µ¾������������¹��¡�
-rw-r--r-- 1 500 500 57 Dec 07 17:57 textfile
226 Directory send OK.
ftp: 131 bytes received in 0.00Seconds 131000.00Kbytes/sec.
[19]"\µ���¼\Ð������\���\���\���\���������¼���������"������³���������·���������¹��¡�
ftp> get textfile
²¼µ������\���\���\»���¼\������̏��½¼�����µ���������������Ð���µ¾������������¹��¡�
200 PORT command successful. Consider using PASV.
150 Opening ASCII mode data connection for textfile (57 bytes).
226 File send OK.
ftp: 60 bytes received in 0.00Seconds 60000.00Kbytes/sec.
[20]"FTP�����䏪�³"������½��쏪�»���·���������¹��¡�
ftp> bye
¼�����돪�����FTP\½\���\�������������¡�FFTP����������������»��������Џ��·������»����·�����������Ώ��������������������µ��������¡�
�����������я�����������\µ���¼\Ð���������·������������������������������������·�����ď���������������������\¹\��ď��¼\��������������������������������������ď��������Ï��Ï���
CentOS������yum������\���\���\¹\������¼\������¹����������LINUX����
[root@admin]# yum -y install yum-plugin-fastestmirror
���¹������������\���\���\¹\������¼\�������¼���¹��ԏ��µ���������������¹��¡�
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for yum-plugin-fastestmirror to pack into transaction set.
yum-plugin-fastestmirror- 100% |=========================| 3.1 kB 00:00
---> Package yum-plugin-fastestmirror.noarch 0:0.2.4-3.c4 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
yum-plugin-fastestmirror noarch 0.2.4-3.c4 extras 13 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 13 k
Downloading Packages:
(1/1): yum-plugin-fastest 100% |=========================| 13 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: yum-plugin-fastestmirror ######################### [1/1]
Installed: yum-plugin-fastestmirror.noarch 0:0.2.4-3.c4
Complete!
\���\���\¹\������¼\������������돪�»���·���������·�����ď��̏�¡��³���������������ޏ�����������"yum"������\���\���\¹\������¼\������¹��������돪�¡�ID����²��ď��������«���«�����я��������«������\���\���\¹\������¼\���������������������»�����я�¡�²¼µ������돫¢����������¹��ԏ��������������¹��¡�
[2]"GPG Key"������¼���������¹��Џ����Ώ��������¹��¡�
[root@admin]# rpm --import http://ftp.riken.jp/Linux/centos/RPM-GPG-KEY-CentOS-4
GPG��������������¡�GNU Privacy Guard������¢̏�����RPM\���\���\�ޏ��¼\���������½��Ï��¾���µ�����������������¾��⏢�̏�����¾��⏢�µ���������������¹��¡�
[3]"yum������\������¼\���\��㏢�¼\¹¹¹���·"������¹��ԏ��������������¹��¡�
[root@admin]# yum list
���¹������������¹¹���·���̏��«���«���������������¹��¡�
Gathering header information file(s) from server(s)
Server: Fedora Core 2 - i386 - Base
Server: Fedora Core 2 - i386 - Released Updates
Finding updated packages
Downloading needed headers
pango-0-1.4.1-1.i386.hdr 100% |=========================| 5.7 kB 00:00
squirrelmail-0-1.4.3a-6.F 100% |=========================| 28 kB 00:00
gtk2-0-2.4.14-1.fc2.i386. 100% |=========================| 16 kB 00:00
gd-0-2.0.21-5.20.1.i386.h 100% |=========================| 2.7 kB 00:00
nscd-0-2.3.3-27.1.i386.hd 100% |=========================| 20 kB 00:00
��¡�
��¡�
xorg-x11-ISO8859-2-100dpi 100% |=========================| 76 kB 00:00
perl-TimeDate-1-1.16-1.no 100% |=========================| 2.9 kB 00:00
xsri-1-2.1.0-7.i386.hdr 100% |=========================| 1.7 kB 00:00
kde-i18n-Korean-1-3.2.2-2 100% |=========================| 11 kB 00:00
libgnomeprint15-1-0.37-9. 100% |=========================| 3.9 kB 00:00
Name Arch Version Repo
--------------------------------------------------------------------------------
4Suite i386 1.0-1.0.a3.1 base
Canna-devel i386 3.7p1-6 base
ElectricFence i386 2.2.2-17.1 base
FreeWnn-devel i386 1.11-42.1 base
GConf i386 1.0.9-13.1 base
��¡�
��¡�
ytalk i386 3.1.1-15 base
zip i386 2.3-26.2 updates-released
zisofs-tools i386 1.0.4-4 base
zsh i386 4.2.0-1 base
zsh-html i386 4.2.0-1 base
[4]"yum������\��\���\��\������¼\���������³������"������¹��ԏ��������������¹��¡�
[root@admin]# yum check-update
[5]"yum������\���\���\�ޏ��¼\���"\��\���\��\������¼\��������ҏ�����������������¹��ԏ��������������¹��¡�
[root@admin]# yum update cups
[6]"yum������\���\���\�ޏ��¼\���"\��\���\��\������¼\��������ҡ돫�³���������¹��ԏ��������������¹��¡�
#!/bin/sh
echo "Job Name (yum_upgrade.sh)"
echo " ³«»���(`date +"%k»���%M�����%S������"`)"
yum -y update
echo " ½��쏪�»(`date +"%k»���%M�����%S������"`)"
[root@admin]# yum update
[7]"yum������돪����·\���\���\�ޏ��¼\���"������¼«�����\��\���\��\��\������¼\��������ҏ����Ώ�������¡�
[root@admin]# vi /root/yum_upgrade.sh
vi\��\���\��\��ď�����\·\��\���\¹\���\���\��\��������ҏ�돫�����·�����ď��������Ï��Ï���
[8]"��돫�����·������\·\��\���\¹\���\���\��\���"������¼���¹��ԏ�������ҏ����ď�𡯏�������¡�
[root@admin]# chmod 700 /root/yum_upgrade.sh
[9]"\��\���\��\���\��������ҏ���������䏪���쏢����¼���¹��ԏ��¹������crond"���������Ώ�����\���\���\���\��������ҏ�����½������¹��������¡�
[root@admin]# crontab -e
������������05:00��������돪����·\���\���\�ޏ��¼\��������ҏ����������¹������
00 05 * * * /root/yum_upgrade.sh | nkf -j
nkf "-j"��«���³���³�����¡돪؏�����������Ï��Ï��Ï���
nkf������������»���\³���¼\��������ҏ����С�¹��¡�
euc\³���¼\���������JIS\³���¼\��������������С�¹���·������������»���²½���ޏ�����²��я����ҏ��¹��������¡�
nkf������\���\���\������¼\��ď�����²¼µ»²¾���
-e EUC\³���¼\��������������С�¹
-s \·\���\���JIS\³���¼\��������������С�¹
-j JIS\³���¼\��������������С�¹