Difference between revisions of "Install a new server (CentOS)"

From Organic Design wiki
m (Opps; no that is edits to apache http.conf)
(formatting & typos)
Line 1: Line 1:
 
# ---------------------- Installation on wikiexpert.com -------------------------- #  
 
# ---------------------- Installation on wikiexpert.com -------------------------- #  
# Original apache installation in /var/www
+
# Original rpm apache installation in /var/www controlled with /usr/sbin/apachectl
# controlled with /usr/sbin/apachectl
+
# /var/www/html/index.shtml is the index file
# index.shtml is the index file
 
 
 
 
# Source install at /usr/local/apache2
 
# Source install at /usr/local/apache2
 
# Apache now controlled with /usr/local/apache2/bin/apachectl
 
# Apache now controlled with /usr/local/apache2/bin/apachectl
 +
# ---------------------- Installation on wikiexpert.com -------------------------- #
 
tar -zxvf httpd-2.2.0.tar.gz
 
tar -zxvf httpd-2.2.0.tar.gz
 
cd httpd-2.2.0
 
cd httpd-2.2.0
Line 12: Line 11:
 
make install
 
make install
  
# Install zlib for domxml
+
# ---------------------- Install zlib for domxml ------------------------ #
 
cd /tmp
 
cd /tmp
 
wget http://www.zlib.net/zlib-1.2.3.tar.gz
 
wget http://www.zlib.net/zlib-1.2.3.tar.gz
Line 21: Line 20:
 
make install
 
make install
  
# Installing mysql 5.0.19 from source
+
# --------------------  Installing mysql 5.0.19 from source ------------------- #
 +
#  see INSTALL-BINARY
 
wget ftp://mirror.services.wisc.edu/mirrors/mysql/Downloads/MySQL-5.0/mysql-standard-5.0.19-linux-i686.tar.gz
 
wget ftp://mirror.services.wisc.edu/mirrors/mysql/Downloads/MySQL-5.0/mysql-standard-5.0.19-linux-i686.tar.gz
tar -zxvf mysql-standard-5.0.19-linux-i686.tar.gz
 
cd mysql-standard-5.0.19-linux-i686
 
#  see INSTALL-BINARY
 
 
 
/usr/sbin/groupadd mysql
 
/usr/sbin/groupadd mysql
 
/usr/sbin/useradd -g mysql mysql
 
/usr/sbin/useradd -g mysql mysql
Line 40: Line 36:
  
  
# Reinstalling ming (php compilation failed) /usr/local/lib/
+
# ------------------  ming in /usr/local/lib/ -------------------- #
 
# See http://www.opaque.net/wiki/index.php?MingInstall,
 
# See http://www.opaque.net/wiki/index.php?MingInstall,
 
# http://www.opaque.net/wiki/index.php?PlatformIssues
 
# http://www.opaque.net/wiki/index.php?PlatformIssues
Line 48: Line 44:
 
cp -rf * ../../php-4.4.2/ext/ming/
 
cp -rf * ../../php-4.4.2/ext/ming/
  
# PHP-4.4.2 (php also having problems - with mysql) e.g.
 
# gcc: ext/pcre/pcrelib/pcre_chartables.o: No such file or directory
 
# pcre is perl compatible regular expressions
 
#  v5.8.3 built for i386-linux-thread-multi (not 5.8.6)
 
# Looks like pcre needs to be installed again :(
 
# http://www.pcre.org/
 
 
# Stupid header file appears to be in the wrong place
 
# cp /usr/include/pcre/pcre.h /usr/lib
 
# ./configure --with-mysql --with-pcre-regex=/usr/lib
 
  
 +
# ------------------------ PHP-4.4.2 -------------------------- #
 
cd /tmp
 
cd /tmp
 
tar -zxvf php-4.4.2.tar.gz
 
tar -zxvf php-4.4.2.tar.gz
Line 67: Line 54:
 
cp php.ini-dist /usr/local/lib/php.ini
 
cp php.ini-dist /usr/local/lib/php.ini
 
vi /usr/local/apache2/conf/httpd.conf
 
vi /usr/local/apache2/conf/httpd.conf
# Addi: LoadModule php4_module libexec/libphp4.so
+
# Add: LoadModule php4_module libexec/libphp4.so
# Add: AddType application/x-httpd-php .php .phtml
+
# Add: AddType application/x-httpd-php .php .phtml
 
 
+--------------------------------------------------------------------+
 
|                        *** WARNING ***                            |
 
|                                                                    |
 
| You chose to compile PHP with the built-in MySQL support.  If you  |
 
| are compiling a server module, and intend to use other server      |
 
| modules that also use MySQL (e.g, mod_auth_mysql, PHP 3.0,        |
 
| mod_perl) you must NOT rely on PHP's built-in MySQL support, and  |
 
| instead build it with your local MySQL support files, by adding    |
 
| --with-mysql=/path/to/mysql to your configure line.                |
 
+--------------------------------------------------------------------+
 
| License:                                                          |
 
| This software is subject to the PHP License, available in this    |
 
| distribution in the file LICENSE.  By continuing this installation |
 
| process, you are bound by the terms of this license agreement.    |
 
| If you do not agree with the terms of this license, you must abort |
 
| the installation process at this point.                            |
 
+--------------------------------------------------------------------+
 
|                          *** NOTE ***                              |
 
|            The default for register_globals is now OFF!            |
 
|                                                                    |
 
| If your application relies on register_globals being ON, you      |
 
| should explicitly set it to on in your php.ini file.              |
 
| Note that you are strongly encouraged to read                      |
 
| http://www.php.net/manual/en/security.globals.php                  |
 
| about the implications of having register_globals set to on, and  |
 
| avoid using it if possible.                                        |
 
+--------------------------------------------------------------------+
 

Revision as of 00:02, 31 March 2006

  1. ---------------------- Installation on wikiexpert.com -------------------------- #
  2. Original rpm apache installation in /var/www controlled with /usr/sbin/apachectl
  3. /var/www/html/index.shtml is the index file
  4. Source install at /usr/local/apache2
  5. Apache now controlled with /usr/local/apache2/bin/apachectl
  6. ---------------------- Installation on wikiexpert.com -------------------------- #

tar -zxvf httpd-2.2.0.tar.gz cd httpd-2.2.0 ./configure make make install

  1. ---------------------- Install zlib for domxml ------------------------ #

cd /tmp wget http://www.zlib.net/zlib-1.2.3.tar.gz tar -zxvf zlib-1.2.3.tar.gz cd zlib-1.2.3 ./configure make make install

  1. -------------------- Installing mysql 5.0.19 from source ------------------- #
  2. see INSTALL-BINARY

wget ftp://mirror.services.wisc.edu/mirrors/mysql/Downloads/MySQL-5.0/mysql-standard-5.0.19-linux-i686.tar.gz /usr/sbin/groupadd mysql /usr/sbin/useradd -g mysql mysql cd /usr/local gunzip < /tmp/mysql-standard-5.0.19-linux-i686.tar.gz | tar xvf - ln -s /usr/local/mysql-standard-5.0.19-linux-i686 mysql cd mysql ./scripts/mysql_install_db --user=mysql chown -R root . chown -R mysql data chgrp -R mysql . ./bin/mysqld_safe --user=mysql &


  1. ------------------ ming in /usr/local/lib/ -------------------- #
  2. See http://www.opaque.net/wiki/index.php?MingInstall,
  3. http://www.opaque.net/wiki/index.php?PlatformIssues

cd /tmp wget http://superb.dl.sourceforge.net/sourceforge/ming/ming-php-0.3.0.tar.gz cd ming-0.3.0 cp -rf * ../../php-4.4.2/ext/ming/


  1. ------------------------ PHP-4.4.2 -------------------------- #

cd /tmp tar -zxvf php-4.4.2.tar.gz cd php-4.4.2 ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-ming --with-xml --with-domxml --with-zlib-dir=/usr/local/lib make make install cp php.ini-dist /usr/local/lib/php.ini vi /usr/local/apache2/conf/httpd.conf

  1. Add: LoadModule php4_module libexec/libphp4.so
  2. Add: AddType application/x-httpd-php .php .phtml