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

Linux: How to create samba shares for Windows

Install Samba: yum install samba   SELinux:  setsebool -P samba_enable_home_dirs 1   Run the utility…

How to Install Chrome on Ubuntu 20.04

Ubuntu and its variants are pre-packaged with Mozilla's Firefox Web Browser. Although that is a…

How to Install Visual Studio Code on Linux Mint 20.04

Linux Mint versions earlier than 20.04 would allow a user to install snapd, prior to…