Short Attention Span Theatre

Server setup, test.

Update: These in­struc­tions have been superseded by a more recent project. Please do not regard these as anything but an ancient curiosity. ;)

All in­struc­tions are based on the more detailed in­struc­tions at the djb way.

Dae­mon­tools

Add a group for multilog to be a member of:

# pw groupadd nofiles

Add a user for multilog use only:

# pw useradd multilog -c "multilog user" -g nofiles -d /nonexistant -s /nonexistant

Anytime a log run file is created, append s2097152 to the portion multilog multilog t. For example:

exec setuidgid multilog multilog t /var/multilog/mathopd

would become

exec setuidgid multilog multilog t s2097152 /var/multilog/mathopd

Install using the in­struc­tions here. After executing

# mkdir /var/multilog

execute

# chown multilog:nofiles /var/multilog

then continue (but do not reboot to start svscan until after you've completed the booting svscan in­struc­tions).

After completing that, follow the link at the bottom of the page labeled booting svscan, and perform those in­struc­tions. When you get to chown multilog /var/multilog/svscan-service, execute

# chown multilog:nofiles /var/multilog/svscan-service

instead, then continue until the end of that page. After that, you'll need to reboot to start svscan, then you're done.

UCSPI-TCP

Install using the in­struc­tions here.

Instead of creating the directory /etc/tcprules, create /usr/local/etc/tcprules.

Mathopd

Install the ports from /usr/ports/www/mathopd, /usr/ports/www/php4-cgi, /usr/ports/databases/php4-mysql, and /usr/ports/devel/php4-pcre.

Execute

# cp /usr/local/etc/php.ini-recommended /usr/local/etc/php.ini

Add a user for mathopd use only:

# pw useradd mathopd -c "mathopd user" -g nofiles -d /nonexistant -s /nonexistant

Add a user whose only job will be to run cgi scripts:

# pw useradd mathopdcgi -c "mathopd cgi user" -g nofiles -d /nonexistant -s /nonexistant

Install using the in­struc­tions here, but using mathopd.conf, dir_cgi.c, mathopd.run, and mathopd.log.run.

NTP

/usr/local/etc/ntp.conf

server time.nist.gov
server time.nrc.ca
server fartein.ifi.uio.no
server ntp.globe.cz
server ntp2.belbone.be
server ntp-0.cso.uiuc.edu

restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap

driftfile /var/db/ntpd.drift

/var/svc.d/ntpd/run

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#!/bin/sh
# ntpd/run
# daemontools run script for ntpd server
# ===
exec 2>&1
echo "*** Starting ntpd..."
exec /usr/sbin/ntpd 
    -c /usr/local/etc/ntp.conf 
    -n

### that's all, folks!

/var/svc.d/ntpd/log/run

1
2
3
4
5
#!/bin/sh
# ntpd/log/run
exec setuidgid multilog multilog t s2097152 /var/multilog/ntpd

### that's all, folks!

OpenSSH

Add to /etc/rc.conf:

sshd_enable="NO"

/var/svc.d/sshd/run

1
2
3
4
5
6
7
8
9
#!/bin/sh
# sshd/run
# daemontools run script for sshd server
# ===
exec 2>&1
echo "*** Starting sshd..."
exec /usr/sbin/sshd -D -e

### that's all, folks!

/var/svc.d/sshd/log/run

1
2
3
4
5
#!/bin/sh
# sshd/log/run
exec setuidgid multilog multilog t s2097152 /var/multilog/sshd

### that's all, folks!</pre>

MySQL

Enter /usr/ports/databases/mysql40-server and 'make && make install'. Set the root password for mysql (at the end of 'make install' it will tell you how).

Add to /etc/rc.local:

# don't allow mysql server to start through init:
if [ -e /usr/local/etc/rc.d/mysql-server.sh ]; then
    echo -n ' not_mysql'
    mv /usr/local/etc/rc.d/mysql-server.sh /usr/local/etc/rc.d/mysql-server.sh-dist
fi

/var/svc.d/mysqld/run

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#!/bin/sh
# mysqld/run
# daemontools run script for mysqld server
# ===
exec 2>&1
echo "*** Starting mysqld..."
exec /usr/local/libexec/mysqld 
    --basedir=/usr/local 
    --datadir=/var/db/mysql 
    --user=mysql

### that's all, folks!

/var/svc.d/mysqld/log/run

1
2
3
4
5
#!/bin/sh
# mysqld/log/run
exec setuidgid multilog multilog t s2097152 /var/multilog/mysqld

### that's all, folks!

WordPress

Download latest wordpress. Setup as indicated in 'readme.html'

Go through and replace all the file names with the actual contents of the files.

Transfer blues » « Site is up!
sast favicon