Apache-SdnFw

 view release on metacpan or  search on metacpan

lib/Apache/SdnFw/tt/install.txt  view on Meta::CPAN

mkdir -m 0700 /etc/skel/.ssh
touch /etc/skel/.ssh/authorized_keys
chmod 0600 /etc/skel/.ssh/authorized_keys
echo 'Port 6056' >/etc/ssh/sshd_config
echo 'LoginGraceTime 1m' >>/etc/ssh/sshd_config
echo 'PermitRootLogin without-password' >>/etc/ssh/sshd_config
echo '#PasswordAuthentication no' >>/etc/ssh/sshd_config
echo '#UsePAM yes ? default is no?' >>/etc/ssh/sshd_config
echo 'UseDNS no' >>/etc/ssh/sshd_config
echo 'MaxStartups 5' >>/etc/ssh/sshd_config
echo '# override default of no subsystems' >>/etc/ssh/sshd_config
echo 'Subsystem       sftp    /usr/libexec/openssh/sftp-server' >>/etc/ssh/sshd_config
service sshd restart

# disable firewall and SELinux

yum -y install ntp
chkconfig ntpd on
service ntpd start

# change ntpd options to allow large time sku change

vim /etc/sysconfig/ntpd
OPTIONS="-g -u ntp:ntp -p /var/run/ntpd.pid"

mkdir /root/src
cd /root/src

yum -y install readline-devel 'perl(Date::Format)' ImageMagick-perl 'perl(Time::CTime)' perl-TimeDate \
perl-XML-Simple perl-GD perl-GDGraph perl-DBD-Pg perl-DBI perl-Apache-DBI \
perl-MIME-tools expat-devel libxml2-devel openssl-devel pango-devel

wget http://wwwmaster.postgresql.org/redir/198/h/source/v8.2.20/postgresql-8.2.20.tar.gz
tar -zxf postgresql-8.2.20.tar.gz
cd postgresql-8.2.20
./configure
make
make install
rm -f /usr/bin/psql
ln -s /usr/local/pgsql/bin/psql /usr/bin
rm -f /usr/bin/createdb
ln -s /usr/local/pgsql/bin/createdb /usr/bin
rm -f /usr/bin/dropdb
ln -s /usr/local/pgsql/bin/dropdb /usr/bin
rm -f /usr/bin/pg_dump
ln -s /usr/local/pgsql/bin/pg_dump /usr/bin

# run cpan and set things up so stuff installs easier without a bunch of questions
cpan
o conf prerequisites_policy follow
o conf build_requires_install_policy yes
o conf commit

cpan -i LDS/Crypt-CBC-2.12.tar.gz Crypt::Blowfish XML::Dumper \
IO::Socket::SSL Net::SMTP::SSL Authen::SASL Template \
DateTime::Locale IO::Socket::INET Net::IMAP::Simple XML::Simple \
Lingua::EN::Numbers Google::SAML::Response

# Generally you don't need to install mysql, only if you need wordpress
yum -y install mysql-devel.x86_64 mysql-server.x86_64 mysql.x86_64
chkconfig --add mysqld
chkconfig mysqld on
vim /etc/my.cnf
# add bind-address=127.0.0.1
service mysqld start
/usr/bin/mysqladmin -u root password 'what ever you want password to be'

# now back to normal install packages
cd /root/src
mkdir apache
cd apache
wget http://www.apache.org/dist/perl/mod_perl-1.30.tar.gz
tar -zxf mod_perl-1.30.tar.gz
wget http://archive.apache.org/dist/httpd/apache_1.3.37.tar.gz
tar -zxf apache_1.3.37.tar.gz
wget http://www.modssl.org/source/mod_ssl-2.8.28-1.3.37.tar.gz
tar -zxf mod_ssl-2.8.28-1.3.37.tar.gz
wget http://us3.php.net/get/php-5.3.5.tar.gz/from/us.php.net/mirror
tar -zxf php-5.3.5.tar.gz
cd mod_perl-1.30
perl Makefile.PL APACHE_SRC=../apache_1.3.37/src DO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1
make
make install

# PHP is generally not needed, unless you need wordpress or maybe something else that runs php
cd ../php-5.3.5

# only config with mysql if you need it for wordpress, otherwise use the next option
./configure --with-zlib \
--with-mysql=/usr/bin/ --with-libdir=lib64 \
--with-pgsql --with-apache=../apache_1.3.37

# Postgres only
./configure --with-zlib \
--with-pgsql --with-apache=../apache_1.3.37
make
make install

# now back to normal stuff
cd ../mod_ssl-2.8.28-1.3.37/
./configure --with-apache=../apache_1.3.37 --with-ssl=SYSTEM --prefix=/usr/local/apache --enable-shared=ssl

cd ../apache_1.3.37
wget http://www.awe.com/mark/dev/mod_status_xml/dist/mod_status_xml.c
mv mod_status_xml.c src/modules/extra/

# without php
./configure --activate-module=src/modules/perl/libperl.a --enable-module=env \
--enable-module=log_config --enable-module=log_agent --enable-module=log_referer \
--enable-module=mime --enable-module=status --enable-module=info --enable-module=dir \
--enable-module=cgi --enable-module=alias --enable-module=proxy --enable-module=rewrite \
--enable-module=access --enable-module=expires --enable-module=setenvif --enable-module=so \
--activate-module=src/modules/ssl/libssl.a --enable-module=dir --disable-shared=dir \
--add-module=src/modules/extra/mod_status_xml.c

# with php



( run in 2.200 seconds using v1.01-cache-2.11-cpan-f56aa216473 )