[PC-BSD Testing] ya lost in Documentation Forest

Fabrizio Parrella fabrizio at bibivu.com
Fri Dec 19 06:58:37 PST 2008


and if you want to setup a whole server by start to end, here a few commands
lines (that I have in my "build server" scripts) that you can use.. I would
run those into a INMATE as well.

Hope that this helps (I have similar steps for qmail and MySQL 5.1, IMAP,
spamassassin, clamav, daemontools, UCSPI-tcp)

#!/bin/sh
readOne () {
        tput smso
        echo "Press any key to continue"
        tput rmso
        oldstty=`stty -g`
        stty -icanon -echo min 1 time 0
        dd bs=1 count=1 >/dev/null 2>&1
        stty "$oldstty"
        echo
}

/usr/libexec/locate.updatedb


############################################
#                                          #
# Generic packages                         #
#                                          #
############################################
pkg_add -r rsync
pkg_add -r curl
pkg_add -r logrotate
pkg_add -r p5-IO-Tty
pkg_add -r expect
pkg_add -r gd
pkg_add -r netpbm
pkg_add -r ImageMagick
pkg_add -r wget
pkg_add -r bash
############################################

############################################
#                                          #
# memcached                                #
#                                          #
############################################
pkg_add -r memcached
echo memcached_enable=\"YES\" >> /etc/rc.conf
############################################


############################################
#                                          #
# SpellChecks                              #
#                                          #
############################################
pkg_add -r ispell
pkg_add -r aspell
cd /usr/ports/textproc/en-aspell
make install; make clean
cd /usr/ports/textproc/es-aspell
make install; make clean
cd /usr/ports/textproc/it-aspell
make install; make clean
############################################

############################################
#                                          #
# OpenSSL                                  #
#                                          #
############################################
pkg_add -r openssl
cp /usr/local/openssl/openssl.cnf.sample /usr/local/openssl/openssl.cnf
############################################


############################################
#                                          #
# Apache 22 (+ modules)                    #
#                                          #
############################################
cd /usr/ports/www/apache22/
echo "select MEM_CACHE, and THREADS"
readOne
make config #select MEM_CACHE, and THREADS
make install; make clean
echo apache22_enable=\"YES\" >> /etc/rc.conf
cd /usr/ports/www/mod_bw
make install; make clean
echo accf_http_load=\"YES\" >> /boot/loader.conf
perl -pi -e
's,etc/apache22/Includes/\*.conf,/usr/local/etc/apache22/Includes/\*.conf,g'
/usr/local/etc/apache22/httpd.conf
perl -pi -e 's,Include etc/apache22/extra,Include
/usr/local/etc/apache22/extra,g' /usr/local/etc/apache22/httpd.conf
############################################

############################################
#                                          #
# C-client                                 #
#                                          #
############################################
cd /usr/ports/mail/cclient
echo "select SSL_AND_PLAINTEXT"
readOne
make config;#select SSL_AND_PLAINTEXT
make install; make clean
############################################


############################################
#                                          #
# php5 (+ modules)                         #
#                                          #
############################################
cd /usr/ports/lang/php5
echo "select APACHE"
readOne
make config #select APACHE
make install; make clean
echo "AddType application/x-httpd-php .php" >>
/usr/local/etc/apache22/httpd.conf
echo "AddType application/x-httpd-php-source .phps" >>
/usr/local/etc/apache22/httpd.conf
cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini
perl -pi -e 's,;session.save_path = "/tmp",session.save_path = "/tmp",g'
/usr/local/etc/php.ini
cd /usr/ports/www/php5-session
make install; make clean
cd /usr/ports/www/eaccelerator
make install; make clean
echo "extension=eaccelerator.so" >> /usr/local/etc/php/extensions.ini
cp eaccelerator/eaccelerator.ini /usr/local/etc/php/
cd /usr/ports/archivers/php5-bz2
make install; make clean
cd /usr/ports/archivers/php5-zlib
make install; make clean
cd /usr/ports/databases/php5-mysql
make install; make clean
cd /usr/ports/databases/php5-mysqli
make install; make clean
cd /usr/ports/databases/pecl-memcache
make install; make clean
cd /usr/ports/security/php5-mhash
make install; make clean
cd /usr/ports/ftp/php5-curl
make install; make clean
cd /usr/ports/mail/php5-imap
make install; make clean
cd /usr/ports/graphics/php5-exif
make install; make clean
cd /usr/ports/devel/php5-gettext
make install; make clean
cd /usr/ports/security/php5-openssl
make install; make clean
cd /usr/ports/devel/php5-pcntl
make install; make clean
cd /usr/ports/devel/php5-pcre
make install; make clean
cd /usr/ports/textproc/php5-ctype
make install; make clean
cd /usr/ports/converters/php5-iconv
make install; make clean
cd /usr/ports/graphics/php5-gd
make install; make clean
cd /usr/ports/converters/php5-mbstring
make install; make clean
cd /usr/ports/security/php-suhosin
make install; make clean
cp suhosin/suhosin.ini /usr/local/etc/php/
cd /usr/ports/security/php5-mcrypt
make install; make clean
cd /usr/ports/textproc/php5-simplexml
make install; make clean
cd /usr/ports/devel/php5-spl
make install; make clean
cd /usr/ports/textproc/php5-xml
make install; make clean
cd /usr/ports/net/php5-soap/
make install; make clean
cd /usr/ports/net/php5-sockets/
make install; make clean
cd /usr/ports/sysutils/php5-posix
make install; make clean
############################################


############################################
#                                          #
# Subversion                               #
#                                          #
############################################
cd /usr/ports/devel/apr-svn
make install; make clean
pkg_add -r neon
pkg_add -r db42
cd /usr/ports/devel/subversion
make WITH_MOD_DAV_SVN=yes
make install; make clean
############################################



############################################
#                                          #
# Web packages                             #
#                                          #
############################################
############################################
#          phpMyAdmin                      #
############################################
cd /usr/ports/databases/phpmyadmin
echo "select everything"
readOne
make config #select everything
make install; make clean
echo "" >> /usr/local/etc/apache22/httpd.conf
echo Alias /db/phpmyadmin/ \"/usr/local/www/phpMyAdmin/\" >>
/usr/local/etc/apache22/httpd.conf
echo \<Directory \"/usr/local/www/phpMyAdmin/\"\> >>
/usr/local/etc/apache22/httpd.conf
echo "   Options none" >> /usr/local/etc/apache22/httpd.conf
echo "   AllowOverride Limit" >> /usr/local/etc/apache22/httpd.conf
echo "   Order Allow,Deny" >> /usr/local/etc/apache22/httpd.conf
echo "   Allow from all" >> /usr/local/etc/apache22/httpd.conf
echo \</Directory\> >> /usr/local/etc/apache22/httpd.conf

############################################
#          SquirrelMail                    #
############################################
cd /usr/ports/mail/squirrelmail/
make install; make clean
cd /usr/ports/mail/squirrelmail-notes-plugin/
make install; make clean
cd /usr/local/www/squirrelmail/plugins
fetch http://www.squirrelmail.org/plugins/autocomplete.2.0-1.0.0.tar.gz
fetch http://www.squirrelmail.org/plugins/html_mail-2.3-1.4.tar.gz
tar -zxvf autocomplete.2.0-1.0.0.tar.gz
tar -zxvf html_mail-2.3-1.4.tar.gz
cp html_mail/config.php.sample html_mail/config.php
rm -f *.tar.gz
cd /usr/local/www/squirrelmail && ./configure
echo "" >> /usr/local/etc/apache22/httpd.conf
echo Alias /webmail/ \"/usr/local/www/squirrelmail/\" >>
/usr/local/etc/apache22/httpd.conf
echo \<Directory \"/usr/local/www/squirrelmail/\"\> >>
/usr/local/etc/apache22/httpd.conf
echo "   Options none" >> /usr/local/etc/apache22/httpd.conf
echo "   AllowOverride Limit" >> /usr/local/etc/apache22/httpd.conf
echo "   Order Allow,Deny" >> /usr/local/etc/apache22/httpd.conf
echo "   Allow from all" >> /usr/local/etc/apache22/httpd.conf
echo \</Directory\> >> /usr/local/etc/apache22/httpd.conf

############################################
# AWStats                                  #
############################################
pkg_add -r awstats
echo "" >> /usr/local/etc/apache22/httpd.conf
echo Alias /awstatsclasses \"/usr/local/www/awstats/classes/\" >>
/usr/local/etc/apache22/httpd.conf
echo Alias /awstatscss \"/usr/local/www/awstats/css/\" >>
/usr/local/etc/apache22/httpd.conf
echo Alias /awstatsicons \"/usr/local/www/awstats/icons/\" >>
/usr/local/etc/apache22/httpd.conf
echo ScriptAlias /awstats/ \"/usr/local/www/awstats/cgi-bin/\" >>
/usr/local/etc/apache22/httpd.conf
echo \<Directory \"/usr/local/www/awstats/\"\> >>
/usr/local/etc/apache22/httpd.conf
echo "   Options none" >> /usr/local/etc/apache22/httpd.conf
echo "   AllowOverride None" >> /usr/local/etc/apache22/httpd.conf
echo "   Order Allow,Deny" >> /usr/local/etc/apache22/httpd.conf
echo "   Allow from all" >> /usr/local/etc/apache22/httpd.conf
echo \</Directory\> >> /usr/local/etc/apache22/httpd.conf
############################################

echo ""
echo ""
echo ""
echo "Remember to uncomment"
echo "     LoadModule bw_module          libexec/apache22/mod_bw.so"
echo " from "
echo "     /usr/local/etc/apache22/httpd.conf"
echo ""
echo ""
echo " Enjoy !!"
echo " Fabrizio Parrella"




----- Original Message ----- 
From: "Kris Moore" <kris at pcbsd.com>
To: "PC-BSD Testing list" <testing at lists.pcbsd.org>
Sent: Friday, December 19, 2008 8:42 AM
Subject: Re: [PC-BSD Testing] ya lost in Documentation Forest


> Brodey Dover wrote:
>> Walt Pawley wrote:
>>> I need to learn a little PHP. So, I installed Apache 2.2 on my
>>> PC-BSD and php5 1.5.1 box via pkg_add. Apache served HTML and
>>> CLI php worked, but embedded php commands didn't do anything
>>> and *.php files simply browsed as plain text. After mucking
>>> about in some docs, I pkg_delete'd php5 and built php5 from
>>> ports. This method seemed to generate files the docs talked
>>> about that had been missing. This was nice, but didn't get
>>> anything working. I've reading and experimenting with
>>> configuration directives, etc. I notice that apachectl simply
>>> hands the parameter to httpd, so I tried stop followed by start
>>> as well as restart (didn't make any discernable difference).
>>>
>>> This should be really simple but I'm apparently not up to it.
>>> Anyone willing to provide step-by-step's?
>>>
>>> FWIW: I have one other issue that doesn't seem to be responding
>>> to what I think the docs are telling me - language negotiation.
>>> Instead of providing the Acceptable file, it provides the
>>> type-map to the browser. I can live without fixing that but I
>>> suspect it might be a related issue.
>>>
>> Make sure httpd.conf has this:
>>
>> LoadModule php5_module libexec/apache22/libphp5.so
>> AddType application/x-httpd-php .php3 .php .html
>> AddType application/x-httpd-php-source .phps
>> Include etc/apache22/Includes/*.conf
>>
>> Annnd directory index has index.html and index.php.
>>
>> I have been attempting Joomla and so far I've got the right versions of
>> MySQL, PHP, etc. going.
>
>
> If you want to make this a lot easier, go grab a copy of "The Warden"
> from PBIDir, and then setup a jail and install the AMP Inmate into it.
> That has Apache, MySQL, and PHP all setup and ready for Joomla :)
>
> Plus you can look through the included httpd.conf file to see how ours
> is setup.
>
>
> -- 
>
> Kris Moore
> PC-BSD Software
> http://www.pcbsd.com
> _______________________________________________
> Testing mailing list
> Testing at lists.pcbsd.org
> http://lists.pcbsd.org/mailman/listinfo/testing
>



More information about the Testing mailing list