Installing apache, php and mysql on ALT Linux
I’ve installed ALT Linux Lite on my laptop because windows XP worked very slow there (my laptop is outdated :)). When I decided to install apache there, I got some problems. This post is for people who have troubles with gcc on ALT linux.
Here is the error I got when tried to configure Apache with configure command line:
configure: error: in `srclib/apr`:
configure: error: C compiler cannot create executables
See `config.log` for more details.
configure failed for srclib/apr
I’ve search around the web looking for solutions for similar problem. The solution is to find and install some rpms to make the gcc compiler work. Here are the rpms you should find:
Then I began installing them (switched to root user with `su` command):
# rpm -i update-alternatives-1.8.3-alt1.noarch.rpm
# rpm -i cpp2.96-2.96-alt3.i586.rpm
# rpm -i kernel-headers-common-1.0-alt2.noarch.rpm
# rpm -i kernel24-headers-2.4.20-alt5.i586.rpm
# rpm -i glibc-devel-2.2.6-alt0.6.i586.rpm
# rpm -i libbfd-220.127.116.11.4-alt2.i586.rpm
# rpm -i binutils-18.104.22.168.4-alt2.i586.rpm
# rpm -i gcc2.96-2.96-alt3.i586.rpm
You might need to search for another rpms if you get any conflict installing them. In fact, the workflow is as follows:
1. Try to install gcc first. You will get conflicts.
2. Download the necessary rpms. Try to install them. If you get conflicts again, repeat the step.
3. When you satisfy all the conflicts you should finally have gcc installed.
Here are some more rpms I had to download from ftp.altlinux.org and install to make the gcc work for me:
Finally, I got the
./configure --enable-rewrite command work for Apache.
Then I execute:
That’s all to have apache installed. The document directory is at
/usr/local/apache2/htdocs and the site can be accessed by localhost.localdomain
Download the source distribution for mysql, extract and run the configure command:
./configure --prefix=/usr/local/mysql --with-named-curses-libs=/usr/lib/ncurses.so.5.6
I had to add
--with-named-curses-libs, because the configure generated error on my ALT Linux 4.0 Lite:
No curses/termcap library found
I’ve installed libncurses-devel-5.6-alt3.i586.rpm
Follow instructions listed here:
I’ve downloaded the most recent version from php.net: php 5.2.8
Extracted the tar.gz and entered into the directory. Tried ./configure, but it failed with errors.
Then had to install some rpms to make configure work:
The configure command:
./configure --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs
cp php.ini-dist /usr/local/lib/php.ini
Then edit apache httpd.conf file:
LoadModule php5_module modules/libphp5.so
And add handler for mime type:
AddType application/x-httpd-php .php .phtml