Make An ISO File From a CD in UNIX/Linux
Mount The CD-ROM
mount /dev/cdrom
Issue The Disk Dump Command
dd if=/dev/cdrom of=/software/<filename>.iso
Software For Every Situation.
Archive for May 2007
Mount The CD-ROM
mount /dev/cdrom
Issue The Disk Dump Command
dd if=/dev/cdrom of=/software/<filename>.iso
Stop VM Servers
/etc/init.d/vmware stop
Install VMWare Package
rpm -Uhv /tmp/VMware-server-<version>.i386.rpm
Run Installation Script
vmware-config.pl
Run YUM update, answer yes to all prompts
yum update -y
Direct all clean traffic using an exact match on the host.
$HTTP["host"] == “www.<example>.com” {
server.document-root = “/www/sites/<example>.com/www/”
}
Trap all traffic not directed to the main site (regex non-match), then filter remaining traffic headed to the correct domain with the wrong host (regex) and redirect to the main site.
$HTTP["host"] !~ “^(www|mail)\.(<example>\.com)$” {
$HTTP["host"] =~ “(^|.*\.)<example>\.com” {
url.redirect = ( “^/(.*)” => “http://www.<example>.com/” )
}
}
This is an effective defensive technique to guard against redundant content bombing in which a competitor submits URLs containing different hosts with the same domain to search engines making it appear as if the target site has several pages of identical content
Download, Compile And Install Package
lynx -source “http://download.pureftpd.org/OpenBSD/misc/ports/php5.1-with-fastcgi-openbsd-4.0.tar.gz” > /tmp/php5.1-with-fastcgi-openbsd-4.0.tar.gz
Unfortunately, as of OpenBSD 4.0 there isn’t a standard package for PHP with FastCGI support.
cd /tmp
tar xzf /tmp/php5.1-with-fastcgi-openbsd-4.0.tar.gz
cd /tmp/php5 && make install clean
…wait a long, long time…
Install Subsequent PHP Support Packages
pkg_add -v /usr/ports/packages/i386/all/php5-mysql-5.1.6.tgz
/usr/local/sbin/phpxs -a mysql
Install Packages
pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.0/packages/i386/fcgi-2.4.0p1.tgz
pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.0/packages/i386/lighttpd-1.4.11-mysql.tgz
Example /etc/lighttpd.conf For PHP
$HTTP["host"] == “www.<example>.com” {
server.document-root = “/www/sites/<example>.com/www/”
index-file.names = ( “index.php” )
server.error-handler-404 = “/index.php”
fastcgi.server = ( “.php” =>
( “localhost” =>
(
”socket” => “/tmp/php-fastcgi.socket”,
”bin-path” => “/usr/local/bin/php-fcgi”
)
)
)
}
Example /etc/lighttpd.conf For Ruby on Rails
$HTTP["host"] == “www.<example>.com” {
server.indexfiles = ( “index.html” )
server.error-handler-404 = “/dispatch.fcgi”
server.document-root = “/Rails/public”
fastcgi.server = (”.fcgi” => ( “<example>” =>
( “min-procs” => 1,
”max-procs” => 5,
”socket” => “/tmp/rails-<example>.fastcgi”,
”bin-path” => “/Rails/public/dispatch.fcgi”,
”bin-environment” => ( “RAILS_ENV” => “production” )
)
))
}
Start Daemon on Server Startup, Add to rc.local
if [ -x /usr/local/sbin/lighttpd ] ; then
echo ‘Lighttp’
/usr/local/sbin/lighttpd -f /etc/lighttpd.conf
fi
Create New Database
create database <database>;
Create Administrator Account
grant all on <database>.* to ‘<user>’@'localhost’ identified by ‘<password>’;
Reset Privileges
flush privileges;
Install Package
pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.0/packages/i386/mysql-server-5.0.22.tgz
Start Service And Set Root Password
/usr/local/bin/mysqld_safe &
/usr/local/bin/mysqladmin -u root password ‘<password>’
Start Daemon on Server Startup, Add to /etc/rc.local
if [ -x /usr/local/bin/mysqld_safe ]; then
echo ‘MySQL’
/usr/local/bin/mysqld_safe &
fi
Download Ports
cd /tmp
ftp ftp://ftp.openbsd.org/pub/OpenBSD/4.0/ports.tar.gz
Extract Ports
cd /usr
tar xzf /tmp/ports.tar.gz
Make, Install And Clean
cd /<directory> && make install clean