The Perfect Server - CentOS 5.2 x86_64 - Page 6
12 Apache2 With PHP, Ruby, PythonNow we install Apache with PHP (this is PHP 5.1.6): yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc 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
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
Afterwards we restart Apache: /etc/init.d/httpd restart
12.2 Installing mod_rubyFor CentOS 5.2, 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 apr-devel Next we download and install mod_ruby as follows: cd /tmp 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
... and restart Apache: /etc/init.d/httpd restart
12.3 Installing mod_pythonTo install mod_python, we simply run... yum install mod_python ... and restart Apache afterwards: /etc/init.d/httpd restart
13 ProFTPdISPConfig has better support for proftpd than vsftpd, so let's remove vsftpd: yum remove vsftpd Because CentOS has no proftpd package, we have to compile Proftpd manually: cd /tmp/ The proftpd binary gets installed in /usr/local/sbin, but we need it in /usr/sbin, so we create a symlink: ln -s /usr/local/sbin/proftpd /usr/sbin/proftpd Now create the init script /etc/init.d/proftpd: vi /etc/init.d/proftpd
Then we make the init script executable: chmod 755 /etc/init.d/proftpd Next we open /etc/proftpd.conf and change Group to nobody: vi /etc/proftpd.conf
For security reasons you can also add the following lines to /etc/proftpd.conf (thanks to Reinaldo Carvalho; more information can be found here: http://proftpd.org/localsite/Userguide/linked/userguide.html): vi /etc/proftpd.conf
To make sure that FTP users can use the chmod command, comment out the <Limit SITE_CHMOD> section:
Now we can create the system startup links for Proftpd: chkconfig --levels 235 proftpd on And finally we start Proftpd: /etc/init.d/proftpd start
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com





print: 
Recent comments
18 hours 3 min ago
19 hours 31 min ago
23 hours 5 min ago
1 day 1 hour ago
1 day 4 hours ago
1 day 5 hours ago
1 day 5 hours ago
1 day 6 hours ago
1 day 7 hours ago
1 day 8 hours ago