shadowmac Posted August 7, 2009 Share Posted August 7, 2009 Prepare: rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*yum updateyum groupinstall 'Development Tools'yum groupinstall 'Development Libraries'yum install quotavi /etc/fstab /dev/VolGroup00/LogVol00 / ext3 defaults,usrquota,grpquota 1 1LABEL=/boot /boot ext3 defaults 1 2tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /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.groupchmod 600 /aquota.*mount -o remount /quotacheck -avugmquotaon -avug rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txtcd /tmpwget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpmrpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpmyum 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. # 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 passwordmysqladmin -u root password yourrootsqlpasswordmysqladmin -h server1.example.com -u root password yourrootsqlpasswordPHPRun 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.txtcd /tmpwget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpmrpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpmyum 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 ## Web application to manage MySQL### Order Deny,Allow# Deny from all# Allow from 127.0.0.1#Alias /phpmyadmin /usr/share/phpmyadminAlias /phpMyAdmin /usr/share/phpmyadminAlias /mysqladmin /usr/share/phpmyadmin Next we change the authentication in phpMyAdmin from cookie to http: vi /usr/share/phpmyadmin/config.inc.php /* 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 onchkconfig --levels 235 clamd on RESULTS:/usr/bin/freshclam/etc/init.d/amavisd start/etc/init.d/clamd startCreate some necessary directories: mkdir /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/dbchown 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 http://centos.karan.org/kbsingh-CentOS-Extras.repo 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 section: name=CentOS.Karan.Org-EL$releasever - Testinggpgcheck=0gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txtenabled=1baseurl=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: ;error_reporting = E_ALLerror_reporting = E_ALL & ~E_NOTICEcgi.fix_pathinfo = 1 Install suPHP: cd /tmpwget http://suphp.org/download/suphp-0.7.1.tar.gztar xvfz suphp-0.7.1.tar.gzcd 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=yesmakemake install Add the suPHP module to our Apache configuration... vi /etc/httpd/conf.d/suphp.conf LoadModule suphp_module modules/mod_suphp.so Create the file /etc/suphp.conf as follows: vi /etc/suphp.conf ;Path to logfilelogfile=/var/log/httpd/suphp.log;Loglevelloglevel=info;User Apache is running aswebserver_user=apache;Path all scripts have to be indocroot=/;Path to chroot() to before executing script;chroot=/mychroot; Security optionsallow_file_group_writeable=trueallow_file_others_writeable=falseallow_directory_group_writeable=trueallow_directory_others_writeable=false;Check wheter script is within DOCUMENT_ROOTcheck_vhost_docroot=true;Send minor error messages to browsererrors_to_browser=false;PATH environment variableenv_path=/bin:/usr/bin;Umask to set, specify in octal notationumask=0077; Minimum UIDmin_uid=100; Minimum GIDmin_gid=100;Handler for php-scriptsx-httpd-suphp="php:/usr/bin/php-cgi";Handler for CGI-scriptsx-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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.