wsv2の相違点

setenv PACKAGEROOT ftp://ftp3.jp.FreeBSD.org
mount_nfs 192.168.0.146:/back /mnt

suEXEC

cd /usr/ports/www/apache22
make package WITH_SUEXEC=true SUEXEC_DOCROOT=/home/www
pkg_add -fv /mnt/wsv_package/apache-2.2.15_9.tbz
diff httpd.conf httpd.conf.org
95d93
< LoadModule suexec_module libexec/apache22/mod_suexec.so
222c220
<     DirectoryIndex index.php index.html index.htm
---
>     DirectoryIndex index.html
374c372
<     AddHandler cgi-script .cgi .pl
---
>     #AddHandler cgi-script .cgi
385,386c383,384
<     AddType text/html .shtml .shtm .html .htm
<     AddOutputFilter INCLUDES .shtml .shtm .html .htm
---
>     #AddType text/html .shtml
>     #AddOutputFilter INCLUDES .shtml
438c436
< Include etc/apache22/extra/httpd-userdir.conf
---
> #Include etc/apache22/extra/httpd-userdir.conf
444c442
< Include etc/apache22/extra/httpd-vhosts.conf
---
> #Include etc/apache22/extra/httpd-vhosts.conf
 
  • extra/httpd-vhosts.conf
    <VirtualHost *:80>
        DocumentRoot /home/www/kens/home
        ServerName kens.fm
        ServerAlias www.kens.fm
        SuexecUserGroup kens www_user
      <Directory "/home/www/kens/home">
          Options MultiViews All
          AllowOverride All
          Order allow,deny
          Allow from all
      </Directory>
    </VirtualHost>
    
  • extra/httpd-userdir.conf
    diff httpd-userdir.conf.orig httpd-userdir.conf
    10c10
    < UserDir public_html
    ---
    > UserDir home
    16c16
    < <Directory "/home/*/public_html">
    ---
    > <Directory "/home/*/home">
    

proftpd

pkg_add -r proftpd

echo 'proftpd_enable="YES"' >> /etc/rc.conf

/etc/inetd.conf
#ftp    stream  tcp     nowait  root    /usr/libexec/ftpd       ftpd -l
ftp     stream  tcp     nowait  root    /usr/local/sbin/proftpd proftpd
cat /usr/local/etc/proftpd.conf | grep -v ^#|grep -v ^$
ServerName                      "ProFTPD Zenno.Com"
ServerType                      inetd
DefaultServer                   on
ScoreboardFile                  /var/run/proftpd/proftpd.scoreboard
TimesGMT                        off
ListOptions                     "-A"
UseReverseDNS                   on
MaxLoginAttempts                1
Port                            21
UseIPv6                         off
Umask                           022
MaxInstances                    5
CommandBufferSize               512
User                            nobody
Group                           nogroup
DefaultRoot                     ~/home !wheel
AllowOverwrite                  on
/etc/hosts.allow
proftpd : .zenno.ne.jp : allow

新しいバージョンでは

chroot下で /lib /etc を作成できない .conf に RLimitChroot? off で解除できる

また .conf で 標準で chmod の制限が入ってる

vipw

kens:************:8017:8000::0:0:User &:/home/www/kens:/bin/sh

group

pw groupadd www_user -g 8000

rsync

rsync -av --delete www2:/home/www/\* /home/www/

mysql

cd /usr/ports/databases/mysql55-server
make package WITH_XCHARSET=all 
cat /data/mysql/my.cnf
[mysqld]
max_connections=1000
thread_cache=100
character-set-server=eucjpms
skip-character-set-client-handshake

mysqldump

mysqldump -hwww2 -uUSER -pPASS --add-drop-database --databases c0000s h00001 m0000d > www2.sql.dump
sed s/'timestamp(14) NOT NULL'/'timestamp'/ < www2.sql.dump > www2.sql.dump.temp
sed s/'TYPE=MyISAM;'/';'/ < www2.sql.dump.temp > www2.sql.dump
mysql -pROOTPASS < www2.sql.dump

php.ini

226c226
< short_open_tag = Off
---
> ;short_open_tag = Off
347c347
< safe_mode = Off
---
> safe_mode = On
523c523
< error_reporting = E_ALL & ~E_DEPRECATED
---
> ;error_reporting = E_ALL & ~E_DEPRECATED
561c561
< log_errors = On
---
> ;log_errors = On
1005c1005
< ;date.timezone =
---
> date.timezone = Asia/Tokyo
 

etc

/usr/local/scripts
- find /home/vpopmail/domains/ -name \*.zenno.net\*\[0-9\$\] -and -mtime +21 -exec ls -al {} \; -exec rm {} \;
+ find /home/vpopmail/domains/ -name \*.zenno.net\*\[0-9\$\] -and -mtime +61 -exec ls -al {} \; -exec rm {} \;
/usr/local/etc/rc.d/mysql-server stop
rm /var/db/mysql/vpopmail
cd /var/db/
mv mysql /data/
ln -s /data/mysql  mysql
cd /data
mv vpopmail/ mysql/
/usr/local/etc/rc.d/mysql-server start
/usr/local/etc/rc.d/apache22 stop
cd /usr/home/
mv www /data/
ln -s /data/www www
/usr/local/etc/rc.d/apache22 start

BIND

named_enable="YES"
named_wait="YES"
named_wait_host="wsv2.zenno.net"
named_wait_max="2"
--- /etc/rc.d/named.orig        2010-11-15 18:39:30.000000000 +0900
+++ /etc/rc.d/named     2010-11-15 19:00:57.000000000 +0900
@@ -97,11 +97,16 @@
 }

 named_poststart () {
+       local count
+
        make_symlinks

+       count=0
+
        if checkyesno named_wait; then
-               until ${command%/sbin/named}/bin/host $named_wait_host >/dev/null 2>&1; do
+               until ${command%/sbin/named}/bin/host $named_wait_host >/dev/null 2>&1 || ([ $named_wait_max ] && [ $count -gt $named_wait_max ]) ; do
                        echo "  Waiting for nameserver to resolve $named_wait_host"
+                       count=$((${count} + 1))
                        sleep 1
                done
        fi
--- /etc/defaults/rc.conf.orig  2010-07-19 11:24:59.000000000 +0900
+++ /etc/defaults/rc.conf       2010-11-15 19:03:01.000000000 +0900
@@ -277,6 +277,9 @@
 named_symlink_enable="YES"     # Symlink the chrooted pid file
 named_wait="NO"                # Wait for working name service before exiting
 named_wait_host="localhost"    # Hostname to check if named_wait is enabled
+#named_wait_max="60"           # Maximum number of seconds named_wait will wait
+                               # while attempting to resolve named_wait_host.
+                               # If not set, it will never stop waiting.
 named_auto_forward="NO"        # Set up forwarders from /etc/resolv.conf
 named_auto_forward_only="NO"   # Do "forward only" instead of "forward first"

Tracker

FreeBSD


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-01-25 (水) 09:39:18 (2875d)