"Custom" reinstallation on Fedora 7

yorn

Verified User
Joined
Apr 24, 2006
Messages
17
Hello all.

In a few days i'll be travelling to the datacenter to replace a server. The new one will run Fedora 7 and I want to install some tweaks rightaway.
The most important ones are
- Install PHP5/Apache2/MySQL 5
- suPHP (or something similar, I just want PHP scripts to be executed as their owner)
- Install Dovecot
- Install RoundCube

Of course I also need to migrate all accounts from the old server to the new one.

Now my questions are:
- Does DirectAdmin work on Fedora 7?
- Since i'm at a datacenter and it's a long while to travel for me, I don't have all time for trial and error. I've been browsing the forum for a while to find out how to do the tweaks I want. Dovecot and Roundcube seem quite easy, but what's the safest way to install PHP5/Apache2/MySQL 5 and suPHP? http://help.directadmin.com/item.php?id=137 should take care of PHP5/Apache2/MySQL5, but is it compatible with suPHP? I found this thread about suPHP: http://directadmin.com/forum/showthread.php?t=1985 but I don't quite understand which suPHP version I should use. I also read about CustomBuild, but I don't really understand how that should work either; the configfile allows me to install PHP5 as CGI, but that alone doesn't give me suPHP, right? So, what is the best way to install PHP5/Apache2/MySQL5/suPHP?
- Any hints regarding transferring accounts from the old to the new server?
 
Fedora7 (they no longer use FC as the designation) is brand new. I doubt that DA staff has had a chance to even begin a compile on it yet. I'd contact their sales department and ask them what their plans are.

Jeff
 
I've got unofficial confirms DA works on Fedora 7, just like it works on FC6 while that's not supported either (I did mail sales though, thanks for the hint!). I figured i'd best just arm myself with both F7 and FC6 when I go to the datacenter.
But Fedora 7 support isn't my biggest concern (if it doesn't work i'll simply install FC6), but the modifications I want to make are.

Now I read about doing custombuild @ install (I did some more research), http://www.directadmin.com/features.php?id=774
What's the best way to install PHP5/Apache2/MySQL5/suPHP/Dovecot after DA installation? I can find nice tutorials for PHP5/Apache2/MySQL5/Dovecot, but I can't find a straightforward tutorial for suPHP, and I did search (the thread I mentioned above and custombuild)
So, any clues on that one? It can't be i'm the first one who wants to install suPHP. I'd rate my linux knowledge medium, but i'm fairly new to DA
 
Last edited:
Hello,

At the moment, I'm guessing the binaries will probably work from FC6, but the install scripts might not. This means that you can probably just change the version in your /etc/redhat-release back to 6 for the time being until we get a chance to look at the new OS.

John
 
Then I guess that when I want to use Fedora 7 i'd better not use the buildscript, especially not the beta.
Now, I still need to know how to install suPHP

Will this work?

Code:
## Extract suPHP
$ curl [url]http://www.suphp.org/download/suphp-0.6.2.tar.gz[/url] | tar -zxv

## Copy the original PHP binary
$ cp /usr/local/bin/php /usr/local/bin/php.cli

## Modify the buildscript
$ cd /usr/local/directadmin/customapache/ 
$ ./build clean 
$ vi configure.php 
## Remove --with-apxs and add at the end --enable-force-cgi-redirect

## Rebuild PHP
./build php n
## php -v should now mention the CGI version

## Rename the new PHP binary
$ mv /usr/local/bin/php /usr/local/bin/php.cgi

## Link the old PHP binary back
$ ln /usr/local/bin/php.cli /usr/local/bin/php

## Compile suPHP
$ cd suphp-0.6.2
$ ./configure --with-apache-user=apache --with-php=/usr/local/bin/php.cgi --with-min-uid=500 --with-min-gid=500
$ make
$ make install

## Modify apache config
## edit /etc/httpd/conf/httpd.conf 
## Find:
AddType application/x-httpd-php .inc .php .php4 .php3 .phtml 
AddType application/x-httpd-php-source .phps 
## Before, add:
suPHP_Engine on 
AddHandler x-httpd-php .php 

## Edit PHP config
## edit /usr/local/lib/php.ini 
## Find:
;cgi.force_redirect =
## Replace with:
cgi.force_redirect =0

## Restart Apache
service httpd restart

I made this tutorial by reading http://www.directadmin.fr/viewtopic.php?t=6 with the best French I can and modifying commands where I thought it was necessary
 
Last edited:
I also read about CustomBuild, but I don't really understand how that should work either; the configfile allows me to install PHP5 as CGI, but that alone doesn't give me suPHP, right? So, what is the best way to install PHP5/Apache2/MySQL5/suPHP?

PHP5 as CGI = PHP5(CGI)+suPHP
 
Thanks for your reply
I'll try this then
Code:
cd /usr/local/directadmin
mkdir custombuild
cd custombuild
wget http://files.directadmin.com/services/custombuild/beta/build
./build update
./build all
 
Well i'm done setting up the server
DirectAdmin installs fine on Fedora 7, at install I fed it the fedora 5 tar.gz as it failed to find a suitable file, this worked fine.
Apache2 installation went completely wrong, caused errors in httpd.conf, things like "Order Allow, Deny" and "Options" suddenly weren't recognized anymore, wasn't fixed when I tried to downgrade, DirectAdmin reïnstall didn't work either, Fedora reïnstall did the trick.
I installed PHP5, MySQL5 and Dovecot without problems.
I managed to install suPHP, but it required a user wwwrun (even though I compiled it with "apache" as the apache user), which I made to be an alias of apache. Then it would run, but it ran every script as the wwwrun user and made the system load 8 times as high as it was before. So, less resources and no extra security whatsoever. A little sidenote is that this was with suPHP 6. suPHP 5 made Apache refuse to start with "suPHP_Engine not allowed here"
Anyhow, the server runs fine now, but not with enough security IMHO.
 
Back
Top