動作確認機種 PowerEdge SC440
anonymous_enable=NO xferlog_enable=YES xferlog_file=/var/log/vsftpd.log xferlog_std_format=NO ascii_upload_enable=YES ascii_download_enable=YES ftpd_banner=Welcome to blah FTP service. chroot_local_user=YES chroot_list_enable=YES ls_recurse_enable=YES local_root=public_html use_localtime=YES pasv_addr_resolve=YES pasv_address=idol.dyndns.org pasv_min_port=60000 pasv_max_port=60030 ssl_enable=YES rsa_cert_file=/etc/pki/tls/certs/vsftpd.pem force_local_logins_ssl=NO force_local_data_ssl=NOホームディレクトリより上層へのアクセスを許可するユーザの登録
# cd /etc/pki/tls/certs/ # make vsftpd.pem
Country Name (2 letter code) [GB]:JP State or Province Name (full name) [Berkshire]:Chiba Locality Name (eg, city) [Newbury]:Matsudo Organization Name (eg, company) [My Company Ltd]:idol.dyndns.org Organizational Unit Name (eg, section) []: Common Name (eg, your name or your server's hostname) []:idol.dyndns.org Email Address []:メールアドレスvsftpd起動
# /etc/rc.d/init.d/vsftpd start # chkconfig vsftpd on
myhostname = idol.dyndns.org mydomain = idol.dyndns.org myorigin = $mydomain inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain home_mailbox = Maildir/ smtpd_banner = $myhostname ESMTP unknown smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination message_size_limit = 10485760 relayhost = プロバイダのSMTPサーバーSMTP-Auth設定
# /etc/rc.d/init.d/saslauthd start # chkconfig saslauthd onsendmail停止
# /etc/rc.d/init.d/sendmail stop # chkconfig sendmail offメールサーバー切替え
# alternatives --config mta Enterを押して現在の選択[+]を保持するか、選択番号を入力します:2Postfix起動
# /etc/rc.d/init.d/postfix start # chkconfig postfix on
ServerTokens Prod ServerAdmin メールアドレス ServerName idol.dyndns.org:80 Options Includes ExecCGI FollowSymLinks AllowOverride All LogFormat "%h %l %u %t \"%!414r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined SetEnvIf Request_URI "default\.ida" no_log SetEnvIf Request_URI "cmd\.exe" no_log SetEnvIf Request_URI "root\.exe" no_log SetEnvIf Request_URI "Admin\.dll" no_log SetEnvIf Request_URI "NULL\.IDA" no_log SetEnvIf Remote_Addr 192.168.1 no_log SetEnvIf Remote_Addr 127.0.0.1 no_log CustomLog logs/access_log combined env=!no_log ServerSignature Off #AddDefaultCharset UTF-8 AddHandler cgi-script .cgi .pl Options MultiViewsテストページ削除
# rm -f /etc/httpd/conf.d/welcome.conf # rm -f /var/www/error/noindex.htmlWebサーバー起動
# /etc/rc.d/init.d/httpd start # chkconfig httpd onアクセス権設定
# yum install php-gd導入後はapache2を再起動し、設定を有効に。
dos charset = CP932 unix charset = UTF-8 display charset = UTF-8 workgroup = WORKGROUP hosts allow = 192.168.0. [public] comment = Read only Directories path = /home/samba/public public = yes guest ok = yes [share] comment = All User shared Directories path = /home/samba/share public = yes only guest = yes writable = yes printable = no共有ディレクトリ作成
# mkdir -p /home/samba/public # mkdir -p /home/samba/share # chown -R nobody. /home/samba/Samba起動
# /etc/rc.d/init.d/smb start # chkconfig smb onユーザー設定
# useradd hiroyuki # passwd hiroyuki # pdbedit -a hiroyuki
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap server -4 ntp.nict.jp server -4 ntp.jst.mfeed.ad.jpNTPサーバー起動
# ntpdate ntp.nict.jp # /etc/rc.d/init.d/ntpd start # chkconfig ntpd on
# wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm # rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm # sed -i 's/enabled = 1/enabled = 0/g' /etc/yum.repos.d/rpmforge.repo # yum -y --enablerepo=rpmforge install clamd設定ファイル
#User clamav/etc/freshclam.conf
DatabaseMirror db.jp.clamav.netClam AntiVirus起動
# /etc/rc.d/init.d/clamd start # chkconfig clamd onウィルス定義ファイル最新化
# sed -i 's/Example/#Example/g' /etc/freshclam.conf # freshclam
# chmod +x jdk-1_5_0_06-linux-i586-rpm.bin # ./jdk-1_5_0_06-linux-i586-rpm.bin # yum -y remove java-1.4.2-gcj-compat設定ファイル
export JAVA_HOME=/usr/java/jdk1.5.0_06 export PATH=$PATH:$JAVA_HOME/bin export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar # source /etc/profile
# tar zxvf apache-tomcat-6.0.16.tar.gz # mv apache-tomcat-5.5.12/ /usr/local/tomcat設定ファイル
export TOMCAT_HOME=/usr/local/tomcat export CATALINA_HOME=/usr/local/tomcat export CLASSPATH=$CLASSPATH:$CATALINA_HOME/common/lib # source /etc/profile/usr/local/tomcat/conf/web.xml
<param-value>false</param-value>Tomcat起動
# chmod +x /etc/rc.d/init.d/tomcat # /etc/rc.d/init.d/tomcat start # chkconfig --add tomcat # chkconfig tomcat onTomcat確認
http://127.0.0.1:8080/examples/servlets/ http://127.0.0.1:8080/examples/jsp/Apache/Tomcat連携
# yum -y install httpd-devel # wget http://www.meisei-u.ac.jp/mirror/apache/dist/tomcat/tomcat-connectors/jk/source/tomcat-connectors-current-src.tar.gz # tar zxvf tomcat-connectors-current-src.tar.gz # cd tomcat-connectors-1.2.25-src/native/ # ./configure --with-apxs=/usr/sbin/apxs && make && make install # cp ../conf/workers.properties /etc/httpd/conf//etc/httpd/conf.d/jk.conf
LoadModule jk_module modules/mod_jk.so/etc/httpd/conf/workers.properties
[uri:/servlets-examples/*] [uri:/jsp-examples/*] # /etc/rc.d/init.d/httpd restart/usr/local/tomcat/conf/server.xml
<!-- <Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> --> # /etc/rc.d/init.d/tomcat restartApache/Tomcat連携確認
http://127.0.0.1/tomcat/examples/servlets/ http://127.0.0.1/tomcat/examples/jsp/
September 19, 2008 |
The following clause. |
サーバー構築部門 |