Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Mar 05, 2009 2:18 am 
Offline
Newbie

Joined: Tue May 27, 2008 9:51 pm
Posts: 3
Website: http://www.themike.com
Please take a look at the CentOS Virtual Hosting tutorial on the wiki: http://www.linode.com/wiki/index.php/CentOS

The tutorial covers the setup of a Linode for hosting multiple domains and email. The following software is installed and configured in the tutorial.
* Lighttpd
* ClamAV
* Dovecot
* Dovecot Sieve Plugin
* MailScanner
* MySQL
* PHP
* Postfix
* Postfix Admin
* SquirrelMail
* SpamAssassin

I wrote this tutorial as I went through the process of setting up my own Linode. My hope is that it will save someone from the frustration that comes with learning how to be an admin.

Please feel free to make changes and/or suggestions. I put the tutorial on the wiki so I wouldn't have to maintain it. :D


Top
   
 Post subject: Performance
PostPosted: Thu Mar 05, 2009 2:20 am 
Offline
Newbie

Joined: Tue May 27, 2008 9:51 pm
Posts: 3
Website: http://www.themike.com
Uptime
I have been testing the setup with my own domain for roughly three weeks now. Everything seems to be running smoothly, I haven't had to reboot it yet.

Spam Scanning
Four days ago I added a second domain which increased the amount of messages coming in to ~1000 per day. CPU usage remains around 3% to 5% and disk I/O averages 50.

Memory
Code:
free -m
             total       used       free     shared    buffers     cached
Mem:           360        263         97          0          3         76
-/+ buffers/cache:        183        177
Swap:          255         54        201


Top
   
 Post subject:
PostPosted: Tue May 19, 2009 6:26 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
your tutorial is really good but
I prefer to use YUM when it's possible, and now it should be possible...


Top
   
 Post subject:
PostPosted: Sat Jun 20, 2009 9:45 am 
Offline
Junior Member

Joined: Sat Jun 20, 2009 5:17 am
Posts: 25
I'm doing something wrong?

I've followed the wiki how to (http://www.linode.com/wiki/index.php/CentOS) - selecting the Apache option.

When I do http://[Linode MyIP]/ I get:
Connection Failure

The requested URL could not be retrieved

Would it help if I post my config files?


Top
   
 Post subject:
PostPosted: Wed Jun 24, 2009 9:48 am 
Offline
Junior Member

Joined: Sat Jun 20, 2009 5:17 am
Posts: 25
Ok, fixed that error, now php. I've set up php in httpd.conf as follow:
Code:
LoadModule php5_module modules/libphp5.so
AddHandler php5-script php
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl
#AddType application/x-httpd-php .php .php4 .php3
AddType text/html       php
AddType application/x-httpd-php-source phps



The removal of AddType application/x-httpd-php is recommended by http://dan.drydog.com/apache2php.html

I've tried it with or without the x-httpd-php. I've restarted apache with each change to httpd.conf.

When I surf to http://blahblah/setup.php it wants to download the file saying it is a PHP file (is this a case issue?)

if I surf to http://blahblah/ it wants to download the page because it is an application/x-httpd-php.

What am I missing here?


Top
   
 Post subject:
PostPosted: Thu Jun 25, 2009 12:58 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
What does the following command show on your Linode?
Code:
yum list installed '*php*'


Top
   
 Post subject:
PostPosted: Thu Jun 25, 2009 2:41 am 
Offline
Junior Member

Joined: Sat Jun 20, 2009 5:17 am
Posts: 25
Code:
yum list installed '*php*'
Loaded plugins: fastestmirror, priorities
Installed Packages
php.i386                            5.1.6-23.2.el5_3                   installed
php-cli.i386                        5.1.6-23.2.el5_3                   installed
php-common.i386                     5.1.6-23.2.el5_3                   installed
php-devel.i386                      5.1.6-23.2.el5_3                   installed
php-gd.i386                         5.1.6-23.2.el5_3                   installed
php-imap.i386                       5.1.6-23.2.el5_3                   installed
php-ldap.i386                       5.1.6-23.2.el5_3                   installed
php-mbstring.i386                   5.1.6-23.2.el5_3                   installed
php-mcrypt.i386                     5.1.6-15.el5.centos.1              installed
php-mysql.i386                      5.1.6-23.2.el5_3                   installed
php-odbc.i386                       5.1.6-23.2.el5_3                   installed
php-pdo.i386                        5.1.6-23.2.el5_3                   installed
php-pear.noarch                     1:1.4.9-4.el5.1                    installed
php-pear-Auth-SASL.noarch           1.0.2-4.el5.centos                 installed
php-pear-DB.noarch                  1.7.13-1.el5.centos                installed
php-pear-Date.noarch                1.4.7-2.el5.centos                 installed
php-pear-File.noarch                1.2.2-1.el5.centos                 installed
php-pear-HTTP-Request.noarch        1.4.2-1.el5.centos                 installed
php-pear-Log.noarch                 1.9.13-1.el5.centos                installed
php-pear-MDB2.noarch                2.4.1-2.el5.centos                 installed
php-pear-Mail.noarch                1.1.14-1.el5.centos                installed
php-pear-Mail-Mime.noarch           1.4.0-1.el5.centos                 installed
php-pear-Net-SMTP.noarch            1.2.10-1.el5.centos                installed
php-pear-Net-Sieve.noarch           1.1.5-2.el5.centos                 installed
php-pear-Net-Socket.noarch          1.0.8-1.el5.centos                 installed
php-pear-Net-URL.noarch             1.0.15-1.el5.centos                installed
php-pecl-Fileinfo.i386              1.0.4-3.el5.centos                 installed
php-pecl-memcache.i386              2.2.3-1.el5_2                      installed
php-sqlite2.i386                    5.1.6-200705230938                 installed
php-xml.i386                        5.1.6-23.2.el5_3                   installed
php-xmlrpc.i386                     5.1.6-23.2.el5_3                   installed
php5-ioncube-loader.i386            3.1-07051711                       installed
phpmyadmin.noarch                   2.11.9.3-1.fc7.rf                  installed
psa-php5-configurator.noarch        1.5.1-cos5.build92090422.13        installed


Top
   
 Post subject:
PostPosted: Thu Jun 25, 2009 11:40 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Well, you certainly don't seem to be missing the PHP package. Maybe the module isn't being loaded for some reason? Does php5_module show up when you run the following?
Code:
/usr/sbin/httpd -M


Top
   
 Post subject:
PostPosted: Fri Jun 26, 2009 2:28 am 
Offline
Junior Member

Joined: Sat Jun 20, 2009 5:17 am
Posts: 25
This is what I get:
Code:
# /usr/sbin/httpd -M
[Fri Jun 26 08:26:38 2009] [warn] module php5_module is already loaded, skipping
...
php5_module (shared)


Top
   
 Post subject:
PostPosted: Sat Jun 27, 2009 1:16 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Hmm, afraid I can't offer much help then. When I installed Apache and PHP on CentOS, it "just worked." If you don't mind abandoning your current configuration, maybe try deleting it, removing the httpd and php* packages, and re-installing them?


Top
   
 Post subject:
PostPosted: Sat Jun 27, 2009 8:16 am 
Offline
Senior Newbie

Joined: Wed May 27, 2009 9:43 pm
Posts: 18
Paste your httpd.conf


Top
   
 Post subject:
PostPosted: Sun Jun 28, 2009 7:35 am 
Offline
Junior Member

Joined: Sat Jun 20, 2009 5:17 am
Posts: 25
I've uploaded it to my other server:
http://www.paranoidandroid.co.za/files/httpd.conf
http://www.paranoidandroid.co.za/files/ ... hosts.conf

Most of my changes are marked with [ALE MOD]


Top
   
 Post subject:
PostPosted: Sun Jun 28, 2009 8:44 am 
Offline
Senior Newbie

Joined: Wed May 27, 2009 9:43 pm
Posts: 18
I checked your httpd.conf after sent you a pm.
I think there is a mime type problem.
But your httpd.conf is seems ok.

LoadModule php5_module modules/libphp5.so
AddHandler php5-script php
AddType text/html php

Php module is loaded too.
:?


Top
   
 Post subject:
PostPosted: Fri Jul 17, 2009 11:06 am 
Offline
Junior Member

Joined: Sat Jun 20, 2009 5:17 am
Posts: 25
Ok, just to update all and to ask a new question(s):

I've re-installed Centos (twice now, last time following the wiki article to the letter)

Now the first question:
I get the following in mailllog file

Code:
Jul 17 16:59:15 li73-31 postfix/postfix-script[27010]: warning: not owned by root: /etc/postfix/sql
Jul 17 16:59:15 li73-31 postfix/postfix-script[27011]: warning: not owned by root: /etc/postfix/sql/mysql_virtual_domains_maps.cf
Jul 17 16:59:15 li73-31 postfix/postfix-script[27012]: warning: not owned by root: /etc/postfix/sql/mysql_virtual_alias_maps.cf
Jul 17 16:59:15 li73-31 postfix/postfix-script[27013]: warning: not owned by root: /etc/postfix/sql/mysql_virtual_mailbox_maps.cf
Jul 17 16:59:15 li73-31 postfix/postfix-script[27027]: starting the Postfix mail system
Jul 17 16:59:15 li73-31 postfix/master[27028]: daemon started -- version 2.6.2, configuration /etc/postfix


Do I need to worry about it?
If so what should I do to fix it?

Thank you :)


Top
   
 Post subject:
PostPosted: Fri Jul 17, 2009 2:10 pm 
Offline
Junior Member

Joined: Sat Jun 20, 2009 5:17 am
Posts: 25
[Fixed] Also...

Postfix is having problems...

Code:
Jul 17 20:06:39 li73-31 postfix/smtpd[16986]: fatal: open database /etc/aliases.db: No such file or directory


And I don't have newaliases on my installation (I've un-installed sendmail as per the wiki.) What I can figure out is that newaliases is part of sendmail.

Should I re-install sendmail? [Yes]
Will it break my current postfix setup? [Doesn't seem to break postfix]


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group