サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
災害への備え
centos.server-manual.com
[root@centos ~]# yum -y update [root@centos ~]# yum -y groupinstall "Base" "Development tools" "Japanese Support" [root@centos ~]# yum -y install yum-cron [root@centos ~]# /etc/rc.d/init.d/yum-cron start [root@centos ~]# chkconfig yum-cron on [root@centos ~]# chkconfig --list yum-cron yum-cron 0:off 1:off 2:on 3:on 4:on 5:on 6:off ヒント 「yum -y update」でアップデート可能な全パッケージをアップデートします。 「yum -y install yum-
↓下記を記入 #!/bin/bash COUNTRYLIST='CN KR' wget -q http://ftp.apnic.net/stats/apnic/delegated-apnic-latest for country in $COUNTRYLIST do for ip in `cat delegated-apnic-latest | grep "apnic|$country|ipv4|"` do COUNTRY=`echo $ip | awk -F"|" '{ print $2 }'` DROP_IP=`echo $ip | awk -F"|" '{ print $4 }'` TMPCIDR=`echo $ip | awk -F"|" '{ print $5 }'` FLTCIDR=32 while [ $TMPCIDR -ne 1 ]; do TMPCIDR=$((TMPCI
[root@centos ~]# mysql -u root -p Enter password:mysql_root_pass ←mysqlのrootパスワードを入力 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 19 Server version: 5.0.77 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE wordpress; mysql> EXIT; [root@centos ~]# wget http://ja.wordpress.org/wordpress-3.1-ja.tar.gz [root
3.鍵の生成が終わったらパスフレーズを入力して「公開鍵の保存」をクリック。 ※パスフレーズはログイン時に使用するので忘れずに。 4.「C:\Program Files\teraterm\サーバー名」にファイル名「id_rsa.pub」で公開鍵を保存。 ※保存する場所はどこでも構いません。
DirectoryIndex index.html index.htm index.cgi ↓ DirectoryIndex index.html index.htm index.cgi index.php ←追加(index.php許可) AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php ←追加(.phpファイルを使えるようにする) short_open_tag = Off ↓ short_open_tag = On ←変更(short_open_tag有効) expose_php = On ↓ expose_php = Off ←変更(バージョンを隠す) max_execution_time = 30 ↓ max_execu
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line ins
[root@centos ~]# chkconfig acpid off [root@centos ~]# chkconfig apmd off [root@centos ~]# chkconfig autofs off [root@centos ~]# chkconfig avahi-daemon off [root@centos ~]# chkconfig avahi-dnsconfd off [root@centos ~]# chkconfig bluetooth off [root@centos ~]# chkconfig cups off [root@centos ~]# chkconfig gpm off [root@centos ~]# chkconfig haldaemon off [root@centos ~]# chkconfig hidd off [root@cent
[root@centos ~]# rsync -a --delete /home /backup [root@centos ~]# crontab -e 0 5 * * * /usr/bin/rsync -a --delete /home /backup > /dev/null 2>&1 ←追加(5時にバックアップ)
ヒント 現状の設定ではhttp://mail.domain.tldやhttp://ftp.domain.tldでアクセスできてしまうため VirtualHostの設定でhttp://www.domain.tldのアクセスのみを許可する。 ServerAlias domain.tldを追加してhttp://domain.tldのアクセス許可も可能。
[base] priority=1 ←追加 name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #released updates [updates] priority=1 ←追加 name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releas
[root@centos ~]# mysql -u root mysql> SET PASSWORD FOR root@localhost=password('mysql_root_pass'); ←MySQLのrootパスワードを設定 mysql> SELECT user,host FROM mysql.user; ←登録ユーザーを見る +------+-----------------------+ | user | host | +------+------------------------------+ | root | 127.0.0.1 | | | localhost | | root | localhost | | | centos.server-manual.com | | root | centos.server-manual.com | +------+-------
[root@centos ~]# rpmbuild -bb --clean /usr/src/redhat/SPECS/webalizer.spec [root@centos ~]# rpm -ivh /usr/src/redhat/RPMS/i386/webalizer-2.01_10-30.1.jp.i386.rpm ←i386(32bit)の場合 [root@centos ~]# rpm -ivh /usr/src/redhat/RPMS/x86_64/webalizer-2.01_10-30.1.ja.x86_64.rpm ←x86_64(64bit)の場合 [root@centos ~]# rm -f webalizer-2.01_10-30.1.src.rpm [root@centos ~]# rm -f /usr/src/redhat/SPECS/* [root@centos
ヒント CAcert.orgは無料でサーバ証明書を発行してくれます。 ただしIEなどのブラウザにルート証明機関として登録されていないので手動で登録する必要があります。 更新はとても簡単です。半年に一回送られてくるメールのリンクをクリックするだけです。
CentOSとは、RHEL(Red Hat Enterprise Linux)との完全互換を目指したフリーのLinuxディストリビューションです。 CentOSサーバー構築マニュアル.comは、CentOS5,CentOS6,CentOS7で安定した自宅サーバーの構築手順を紹介しています。 初心者から上級者の方まで、コマンドを入力するだけで安定した自宅サーバーを構築することができます。 VPSに対応しています。 CentOS7 サーバー構築手順 初期準備 インストール前の初期準備 独自ドメイン取得 DNS情報設定 ダイナミックDNS取得 DNS情報設定 OSインストール CentOS7 インストール WindowsクライアントからTera TermでSSHログイン 初期設定 CentOS7 インストール後の設定 Tera Termで公開鍵認証 RPMforge EPEL ELRepo Re
ServerTokens OS ↓ ServerTokens Prod ←変更(サーバーの情報を隠す) KeepAlive Off ↓ KeepAlive On ←変更(クライアントとの接続を保持する) ServerAdmin root@localhost ↓ ServerAdmin postmaster@server-manual.com ←変更(管理者のメールアドレスを記入) #ServerName www.example.com:80 ↓ ServerName www.server-manual.com:80 ←コメント解除&変更(サーバー名を記入) <Directory "/var/www/html"> # # Possible values for the Options directive are "None", "All", # or any combination of:
ヒント CentOS5のインストール方法を説明します。 サーバーPCにCentOS5インストールメディアを入れて起動してください。
[mysqld] skip-character-set-client-handshake ←追加(クライアントの文字コードに依存しない) default-character-set=utf8 ←追加(デフォルト文字コードをUTF-8とする) ↓最終行に下記を記入 [mysql] default-character-set = utf8
[root@centos ~]# wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/2.11.11/phpMyAdmin-2.11.11-all-languages.tar.gz [root@centos ~]# tar zxvf phpMyAdmin-2.11.11-all-languages.tar.gz [root@centos ~]# rm -f phpMyAdmin-2.11.11-all-languages.tar.gz [root@centos ~]# mv phpMyAdmin-2.11.11-all-languages /var/www/html/phpMyAdmin
[root@centos ~]# /etc/rc.d/init.d/yum-updatesd stop [root@centos ~]# chkconfig yum-updatesd off [root@centos ~]# yum -y update [root@centos ~]# yum -y install gcc-c++ [root@centos ~]# yum -y install yum-cron [root@centos ~]# /etc/rc.d/init.d/yum-cron start [root@centos ~]# chkconfig yum-cron on [root@centos ~]# chkconfig --list yum-cron yum-cron 0:off 1:off 2:on 3:on 4:on 5:on 6:off ヒント 「/etc/rc.d
#myhostname = host.domain.tld ↓ myhostname = mail.server-manual.com ←コメント解除&変更(ホスト名をFQDNで指定) #mydomain = domain.tld ↓ mydomain = server-manual.com ←コメント解除&変更(ドメイン名を指定) #myorigin = $mydomain ↓ myorigin = $mydomain ←コメント解除(送信元メール@以降) inet_interfaces = localhost ↓ inet_interfaces = all ←変更(受信するネットワークアドレスを指定) mydestination = $myhostname, localhost.$mydomain, localhost ↓ mydestination = $myhostname, lo
[root@ns1 ~]# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.org [root@ns1 ~]# vi /etc/httpd/conf/httpd.conf ServerTokens OS ↓ ServerTokens Prod ←変更(サーバーの情報を隠す) KeepAlive Off ↓ KeepAlive On ←変更(クライアントとの接続を保持する) ServerAdmin root@localhost ↓ ServerAdmin hostmaster@centos.orz ←変更(管理者のメールアドレスを記載) #ServerName www.example.com:80 ↓ ServerName www.centos.orz:80 ←コメント解除&変更(ホスト名を記載) DocumentRoot "
[root@ns1 ~]# telnet プロバイダのSMTPサーバー 25 Trying xxx.xxx.xxx.xxx... Connected to SMTPサーバー (xxx.xxx.xxx.xxx). Escape character is '^]'. 220 SMTPサーバー ESMTP ehlo localhost 250-SMTPサーバー 250-AUTH LOGIN PLAIN ←認証方法を確認 250-PIPELINING 250 8BITMIME quit 221 SMTPサーバー Connection closed by foreign host.
このページを最初にブックマークしてみませんか?
『CentOSサーバー構築マニュアル.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く