Posted On April 1, 2019

Install Apache2 with PHP and Ruby on CentOS 5.2

kimconnect 0 comments
blog.KimConnect.com >> Linux >> Install Apache2 with PHP and Ruby on CentOS 5.2
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
[…]
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.2 Installing mod_ruby (OPTIONAL)

For 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
Next we download and install mod_ruby as follows:
cd /tmp
wget
tar zxvf mod_ruby-1.2.6.tar.gz
cd mod_ruby-1.2.6/
./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…
vim /etc/httpd/conf.d/ruby.conf
LoadModule ruby_module modules/mod_ruby.so
… and restart Apache:
/etc/init.d/httpd restart

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Disable and Enable Sleep Mode on a Linux Workstation

The following commands would work on any Linux machine with SystemD (Ubuntu, Linux Mint, Redhat,…

Centos 5.3 Server preparation for web hosting

These are compatible Repositories: FreshRPMS, Dries, NewRPMS and PlanetCCRMA   Note: to update PHP and…

How to Transfer Files Via SSH or WinRM

Secured Shell (SSH) is the prevalent standard for remote accessing of Linux systems. Even Microsoft…
Other project: DragonCoin.com