Jump to content


- - - - -

Install Joomla on CentOS


  • Please log in to reply
No replies to this topic

#1 shadowmac

shadowmac

    Member

  • Members
  • PipPipPip
  • 93 posts

Posted 07 August 2009 - 06:51 PM

Prepare:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*

yum update

yum groupinstall 'Development Tools'

yum groupinstall 'Development Libraries'

yum install quota

vi /etc/fstab

Quote

/dev/VolGroup00/LogVol00 /                       ext3    defaults,usrquota,grpquota        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
NOTE:If you have chosen a different partitioning scheme than I did, you must adjust this chapter so that quota applies to the partitions where you need it.
touch /aquota.user /aquota.group

chmod 600 /aquota.*

mount -o remount /

quotacheck -avugm

quotaon -avug

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

cd /tmp

wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

yum install ntp httpd mysql-server php php-mysql php-mbstring php-mcrypt phpmyadmin rpm-build gcc mysql-devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap-servers libtool gdbm-devel pam-devel gamin-devel
NOTE: If you receive YUM errors, its more then likely because of mysqld and memory (especially if you are in a VPS).  easiest way to solve this is to stop mysqld service.[/CODE]

APACHE WEB SERVER
Apache Web Server is already installed and you can confirm it's installed by going to Webmin (https://youripaddress:10000)

Login (probably with root)


MYSQL DATABASE SERVER
Again, another easy task using Webmin.  Once you log into webmin as discussed previously, click on
Un-used Modules - MySQL Database Server and click on the link that will install using Yum

Once finished installing MySql Database Server you will be prompted with a link at the bottom of the screen that states something like Return to MySQL Database Server. Click the link to continue.
Click on Start MySQL Server which runs the command /etc/rc.d/init.d/mysqld start

Once MySQL starts successfully, you will now see the management screen for MySQL.  If not, while in Webmin, click on Servers then click on MySQL Database Server.
Click on MySQL System Variables and search for ‘port’ and you'll find the port number that MySQL is using. Typically 3306

Now that the MySQL database server is installed we just need to 'start' the server and then make sure that we configure it to 'autostart' when system is rebooted for any reason.

Run the following commands from shell access
# chkconfig --level 23 mysqld on

# chkconfig --list mysqld
NOTE: the 2 and 3 are Unix run level settings
  • rc2.d - Single User Mode with Networking
  • rc3.d - Multi-User Mode - boot up in text mode

Set MySQL Admin password
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword

PHP
Run the following commands from shell access to install PHP 5
#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
OR
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

cd /tmp

wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

yum install ntp httpd mysql-server php php-mysql php-mbstring php-mcrypt phpmyadmin rpm-build gcc mysql-devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap-servers libtool gdbm-devel pam-devel gamin-devel
NOTE: If you receive YUM errors, its more then likely because of mysqld and memory (especially if you are in a VPS).  easiest way to solve this is to stop mysqld service.

Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the stanza):
vi /etc/httpd/conf.d/phpmyadmin.conf

Quote

#
#  Web application to manage MySQL
#

#
#  Order Deny,Allow
#  Deny from all
#  Allow from 127.0.0.1
#


Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

Next we change the authentication in phpMyAdmin from cookie to http:
vi /usr/share/phpmyadmin/config.inc.php

Quote

[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]

Then we create the system startup links for Apache and start it:
chkconfig --levels 235 httpd on

/etc/init.d/httpd start

Now you can direct your browser to http://youripaddress/phpmyadmin/ or  and log in with the user name root and your new root MySQL password. (You may need to reboot the server)

Install amavisd-new, spamassassin and clamav:
yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql

Start freshclam, amavisd, and clamd:
chkconfig --levels 235 amavisd on

chkconfig --levels 235 clamd on
RESULTS:
/usr/bin/freshclam
/etc/init.d/amavisd start
/etc/init.d/clamd start

Create some necessary directories:
mkdir /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db

chown amavis /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db

ISPConfig 3 allows you to use mod_php, mod_fcgi/PHP5, cgi/PHP5, and suPHP on a per website basis.

mod_fcgid is not available in the official CentOS repositories, but there's a package for CentOS 5.x in the centos.karan.org testing repository. We enable the repository as follows:
cd /etc/yum.repos.d/

wget [url]http://centos.karan.org/kbsingh-CentOS-Extras.repo[/url]

Next we open /etc/yum.repos.d/kbsingh-CentOS-Extras.repo...
vi /etc/yum.repos.d/kbsingh-CentOS-Extras.repo

Set gpgcheck to 0 and enabled to 1 in the [kbs-CentOS-Testing] section:

Quote

[...]
[kbs-CentOS-Testing]
name=CentOS.Karan.Org-EL$releasever - Testing
gpgcheck=0
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
enabled=1
baseurl=http://centos.karan.org/el$releasever/extras/testing/$basearch/RPMS/

yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-mbstring php-mcrypt php-mhash php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel mod_fcgid php-cli httpd-devel

Next we open /etc/php.ini...
vi /etc/php.ini

Change the error reporting (so that notices aren't shown any longer) and add cgi.fix_pathinfo = 1 at the end of the file:

Quote

[...]
;error_reporting  =  E_ALL
error_reporting = E_ALL & ~E_NOTICE
[...]
cgi.fix_pathinfo = 1

Install suPHP:
cd /tmp

wget [url]http://suphp.org/download/suphp-0.7.1.tar.gz[/url]

tar xvfz suphp-0.7.1.tar.gz

cd suphp-0.7.1/

./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=owner --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable-SUPHP_USE_USERGROUP=yes

make

make install

Add the suPHP module to our Apache configuration...
vi /etc/httpd/conf.d/suphp.conf

Quote

LoadModule suphp_module modules/mod_suphp.so

Create the file /etc/suphp.conf as follows:
vi /etc/suphp.conf

Quote

[global]
;Path to logfile
logfile=/var/log/httpd/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
docroot=/

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0077

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100

[handlers]
;Handler for php-scripts
x-httpd-suphp="php:/usr/bin/php-cgi"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

Restart Apache:
/etc/init.d/httpd restart

PureFTPd can be installed with the following command:
yum install pure-ftpd

Then create the system startup links and start PureFTPd:
chkconfig --levels 235 pure-ftpd on

/etc/init.d/pure-ftpd start



JOOMLA 1.5





Similar Topics Collapse

  Topic Forum Started By Stats Last Post Info

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users