The Perfect Server - Fedora 10 - Page 5

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Wed, 2008-11-26 20:24. ::

12 Apache2 With PHP, Ruby, Python

Now we install Apache with PHP5 (this is PHP 5.2.6):

yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mhash php-mssql php-shout php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel

Then edit /etc/httpd/conf/httpd.conf:

vi /etc/httpd/conf/httpd.conf

and change DirectoryIndex to

[...]
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl
[...]

Now configure your system to start Apache at boot time:

chkconfig --levels 235 httpd on

Start Apache:

/etc/init.d/httpd start

 

12.1 Disable PHP Globally

(If you do not plan to install ISPConfig on this server, please skip this section!)

In ISPConfig you will configure PHP on a per-website basis, i.e. you can specify which website can run PHP scripts and which one cannot. This can only work if PHP is disabled globally because otherwise all websites would be able to run PHP scripts, no matter what you specify in ISPConfig.

To disable PHP globally, we edit /etc/httpd/conf.d/php.conf and comment out the AddHandler and AddType lines:

vi /etc/httpd/conf.d/php.conf

#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
#AddHandler php5-script .php
#AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps

Afterwards we restart Apache:

/etc/init.d/httpd restart

 

12.2 Ruby

Starting with version 2.2.20, ISPConfig has built-in support for Ruby. Instead of using CGI/FastCGI, ISPConfig depends on mod_ruby being available in the server's Apache.

For Fedora 10, there's no mod_ruby package available, so we must compile it ourselves. First we install some prerequisites:

yum install httpd-devel ruby ruby-devel

Next we download and install mod_ruby as follows:

cd /tmp
wget http://modruby.net/archive/mod_ruby-1.3.0.tar.gz
tar zxvf mod_ruby-1.3.0.tar.gz
cd mod_ruby-1.3.0/
./configure.rb --with-apr-includes=/usr/include/apr-1
make
make install

Finally we must add the mod_ruby module to the Apache configuration, so we create the file /etc/httpd/conf.d/ruby.conf...

vi /etc/httpd/conf.d/ruby.conf

LoadModule ruby_module modules/mod_ruby.so

... and restart Apache:

/etc/init.d/httpd restart

You can find more details about mod_ruby in this article.

 

12.3 Installing mod_python

To install mod_python, we simply run...

yum install mod_python

... and restart Apache afterwards:

/etc/init.d/httpd restart

 

13 ProFTPd

ISPConfig has better support for proftpd than vsftpd, so let's remove vsftpd and install proftpd:

yum remove vsftpd

yum install proftpd

Now we can create the system startup links for Proftpd and start it:

chkconfig --levels 235 proftpd on
/etc/init.d/proftpd start

 

14 Webalizer

To install webalizer, just run

yum install webalizer

 

15 Synchronize The System Clock

If you want to have the system clock synchronized with an NTP server do the following:

yum install ntp

chkconfig --levels 235 ntpd on
ntpdate 0.pool.ntp.org
/etc/init.d/ntpd start

 

16 Install Some Perl Modules

ISPConfig comes with SpamAssassin which needs a few Perl modules to work. We install the required Perl modules with a single command:

yum install perl-HTML-Parser perl-DBI perl-Net-DNS perl-Digest-SHA1 perl-ExtUtils-AutoInstall

 

17 ISPConfig

The configuration of the server is now finished. You can now install ISPConfig on it, following these instructions: http://www.ispconfig.org/manual_installation.htm

 

17.1 A Note On SuExec

If you want to run CGI scripts under suExec, you should specify /var/www as the web root for websites created by ISPConfig as Fedora's suExec is compiled with /var/www as Doc_Root. Run

/usr/sbin/suexec -V

and the output should look like this:

[root@server1 ~]# /usr/sbin/suexec -V
 -D AP_DOC_ROOT="/var/www"
 -D AP_GID_MIN=100
 -D AP_HTTPD_USER="apache"
 -D AP_LOG_EXEC="/var/log/httpd/suexec.log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
 -D AP_UID_MIN=500
 -D AP_USERDIR_SUFFIX="public_html"
[root@server1 ~]#

So if you want to use suExec with ISPconfig, don't change the default web root (which is /var/www) if you use expert mode during the ISPConfig installation (in standard mode you can't change the web root anyway so you'll be able to use suExec in any case).

 

18 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by DTR (not registered) on Sun, 2009-06-21 13:47.

If you want ssl to work you must have mod_ssl

<code>yum install mod_ssl</code>

Submitted by Anonymous (not registered) on Fri, 2009-05-08 23:44.
i think you forgot flex
Submitted by Anonymous (not registered) on Wed, 2009-05-06 12:30.
After following the procedure...  After quit from configuration with firewall, network, and others (blue screen with lists of configuration) then reboot , it came up black screen with logon which I didn't input any of my username yet?? 
Submitted by Léonce (not registered) on Sun, 2009-11-01 07:59.

Hi!

I have the same probleme. I've finished the install steps and decided to reboot my computer.

And was really surprised that i can't log in. Nothing. I've try to enter command mode (Ctrl+Alt+F2) succesfully.

But I'll rather know how to log in with GUI, because I want to configure the ISPConfig.

So I hope that you finally found a solution.

I'll be please if you can helped.

Submitted by Anonymous (not registered) on Mon, 2009-03-23 19:11.

Hi,

i just finished all the steps from the 'fedora the perfect server' guide (except ispconfig), and i got the message '[warn] NameVirtualHost *:80 has no VirtualHosts'.

i can not start apache through the service HTTP restart or stop/start, and i don't really know what i should do.

 

any advise?thanks
Submitted by rbartz (registered user) on Tue, 2009-02-10 15:24.

I have done the perfect setup for Core 10 a couple of times lately over a basic install of Fedora Core 8 upgraded to 9 and then to 10 with yum. 

In both cases, mod_ssl was not installed along the way.  Simple fix: 

yum install mod_ssl

Anyway, was wondering at first why no https...  and that was the problem.

 

Submitted by severnet (registered user) on Tue, 2009-01-13 13:48.
Hello! I've successfully installed Fedora10 server, ISPConfig2 and some extensions: php-ffmpeg, memcashed, locale. It's working in terminal but not the Web. The CMS can not found ffmpeg dir, memcashed can not configured ( not available). The same problem in Ubuntu 8.10 too. What should I do?
Submitted by severnet (registered user) on Mon, 2009-01-12 19:50.

########## MAIL SERVER ##########

Checking for MTA...
./setup2: line 439: which: команда не найдена
./setup2: line 439: which: команда не найдена
ERROR: Your system configuration is not compatible with ISPConfig! The installation routine stops here!

 

=(

Submitted by papalozarou (not registered) on Sat, 2009-03-07 22:01.

You need to install which - yum install which. After that everything should run okay, but you need to delete the install_ispconfig folder (rm -Rf install_ispconfig) first and untar it again

 

 

 

Submitted by altaibskt (registered user) on Tue, 2009-01-06 12:36.

hi

how can i run or use the run command ? i am in the fedora desktop?

Submitted by Anonymous (not registered) on Sun, 2008-12-07 00:54.
Disabling iptables and selinux is down-right stupid and negligent.  The rest of the guide is mostly nonsense..
Submitted by admin (registered user) on Sun, 2008-12-07 01:44.
Can you give me some reasons, or are you just having a bad day?
Submitted by Anonymous (not registered) on Thu, 2008-12-04 04:21.
Wrong path to mysql daemon start stop script! Should be /etc/rc.d/init.d/mysqld instead of /etc/init.d/mysqld/ which is where you will find this on Debian based systems.
Submitted by admin (registered user) on Sun, 2008-12-07 01:43.
/etc/init.d is a symlink to /etc/rc.d/init.d so both are working.
Submitted by Terry Jennings (not registered) on Wed, 2008-12-03 16:47.

Warning: Most servers would likely be using SCSI disks or RAID arrays.  Fedora 10 currently has bugs that make these configurations either difficult or impossible to use.  See these two threads: