LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Linux Answers > Applications / GUI / Multimedia
User Name
Password

Notices


By xushi at 2005-04-16 16:16
Note: for a text editor, here i use pico. If you want a quick tutorial on it,

to edit a file
Code:
pico myfile
Code:
pico /etc/apache2/myfile
to save
Code:
ctrl + o
enter
to exit
Code:
ctrl + x
enter
to save and exit (together)
Code:
ctrl + o + x
enter

=====================
MySQL 4.1.11
=====================

download from linuxpackages.net
=============
install
============
Code:
installpkg mysql-4.1.11-i486-2mjg.tgz
create a group called mysql
============
Code:
groupadd mysql
create user mysql (if you don't have him.. to see if you do, type su - mysql. If it says "Unknown id: mysql" then you don't have that user.
============
Code:
useradd -g mysql mysql
give user mysql access
============
Code:
chown -R mysql.mysql /var/lib/mysql
install a database from user mysql
============
Code:
su - mysql
mysql_installdb
exit
create a my.cnf file
============
Code:
cp /etc/my-medium.cnf /etc/my.cnf
keep the socket in /var/run/mysql/, its more secure than /tmp.
don't modify anything else

start mysql
============
Code:
chmod +x /etc/rc.d/rc.mysqld
su - mysql
/etc/rc.d/rc.mysqld start
exit
set a password for mysql root user
============
Code:
/usr/bin/mysqladmin -u root password 'new-password'

From this point onwards, i prefer to use mysqlcc to set mysql up..
download it from
http://dev.mysql.com/downloads/other/mysqlcc.html

unpack it
============
Code:
tar xvfz mysqlcc-0.9.4-linux-glibc23tar.gz
run it
============
Code:
cd mysqlcc-0.9.4-linux-glib23/
./mysqlcc
file > new
name: mylocalmysql
hostname: localhost
user: root
password: **********
socket file: /var/run/mysql/mysql.sock

click on test, it should be successful



=================================
APACHE 2.0.53
=================================

download apache
=============
install apache
==============
Code:
installpkg apache2-2.0.53-i486-2spi.tgz
edit apache config file
===============
Code:
pico /etc/apache2/httpd.conf
You don't really have to edit anything right now. Apache should work with the current configs.


==================================
PHP 5.0.4
==================================

download php-apache2
==============
install php-apache2
==============
Code:
installpkg php-apache2-5.0.4-i486-1spi.tgz
download & install t1lib 5.0.2 (needed)
=================
Code:
wget ftp://ftp.scarlet.be/pub/linuxpackag...-i486-2spi.tgz

installpkg t1lib-5.0.2-i486-2spi.tgz

configure php
==============

edit httpd.conf and make sure this line is at the bottom of the file
=============
Code:
pico /etc/apache2/httpd.conf

Include /etc/apache2/mod_php.conf
edit mod_php.conf
==================
make sure the line looks similar to this

Code:
LoadModule php5_module lib/apache2/libphp5.so

start apache & php
==============
Code:
apachectl start
or
Code:
/etc/rc.d/rc.httpd start
When started, go to your web browser, and go to
Code:
http://localhost
you should see a website. Good.

let's test php
===============
Code:
cd /var/www/htdocs
create a file called test.php and add the following to it

Code:
<? phpinfo(); ?>
You should now be able to see all the php configurations.
If you search for mysql, you won't find it.
Let us link mysql to apache and php now.

stop apache
===========
Code:
apachectl stop
or
Code:
/etc/rc.d/rc.httpd stop
go back to /etc/apache2, and edit php.ini
==================
Code:
cd /etc/apache2/
pico php.ini
search for mysql
============
Code:
ctrl + w  mysql
uncomment the line ;extension=mysql.so by removing the ';'
============
Code:
extension=mysql.so
restart apache
============
Code:
apachectl start
refresh the http://localhost/test.php
and search for mysql
now you will find it halfway through the webpage.

Congratulations... =)

by quakefiend on Fri, 2005-09-02 23:59
great howto, but it doesn't work for me. when I get to starting apache server via 'apachectl start' after editing mod_php.conf, I get:
Cannot load /usr/lib/apache2/libphp5.so into server: libt1.so.5: cannot open shared object file: No such file or directory

I followed your howto exactly =/

by Diademed on Thu, 2005-09-08 12:39
PHP-Apache2 no longer exists at that link, it appears

by Kristijan on Fri, 2005-10-07 21:50
Hi all,

I have the exact same issue as quakefiend.

Does anyone know what I can do to fix this?

-Kristijan

by picobyte on Sat, 2005-10-22 07:35
for this and/or other missing packages slackware/getslack or try at linuxpackages and if that's still not helping, try google

by Black187 on Wed, 2005-11-09 08:24
How do I install tomcat with this tutorial. I used the tomcat from this site: http://fairylinux.zapto.org/packages/apachetomcat/
But as soon as I instaled it, my apache crashed. Which tomcat should I use?

by Black187 on Wed, 2005-11-16 03:08
Anybody?

by Black187 on Wed, 2005-11-16 03:09
Edit: Maybe my slackware is corrupt?

by Elvei'sH on Wed, 2005-12-21 08:18
Quote:
Originally Posted by quakefiend
great howto, but it doesn't work for me. when I get to starting apache server via 'apachectl start' after editing mod_php.conf, I get:
Cannot load /usr/lib/apache2/libphp5.so into server: libt1.so.5: cannot open shared object file: No such file or directory

I followed your howto exactly =/
G'Day,

I think the problem is that there are extra library's that need to be installed, i am quite new to linux so i will do my best to explain how too get this going.

1st find your libphp5.so file

slocate -U /
slocate libphp5.so

then check for dependantcies or missing libraries, not sure if thats wat there called but i guess you understand.

ldd /path/libphp5.so

should produce results showing that 2 or 3 library files arnt there.

Write down the files that are missing. Then mount your slackware installation cd and change to the slackware installation dir.

mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom/slackware


cat FILE_LIST | grep *missing library name here*

installpkg *dirname*/*missing library name*.tgz

repeat for next library.

By doing the above, that will allow apache and php to run.

You can check that all is well by running


ldd /path/libphp5.so

again.

As for PHP5 to be able to call on MYSQL, I have no idea as i am currently stuck there now. Could anyone please provide me with a copy of there php.ini file. For some unbeknown reason mine was blank. I have borrowed a redhat php.ini file and alterd paths to no avail.

I have also tried adding the line

extension=mysql.so


########################
Problem Fixed

The latest version of mysql would not funtion with PHP5 as so i installed the ver on the slack cd.

Final Setup
Slackware 10.2 Min intsall
Mysql provided by slack cd
Apache2 latest download
PHP5 Latest download

Works a treat.

##############################



Good luck! And yes im a noob

If anyone has the time to school me a little in the art of Linux please send an email to d_norburyAThotmail.com

Kind Regards
David Norbury

by laurensjanbrinkhorst on Thu, 2006-04-13 09:08
Great walkthrough, really helped me a lot.

The PHP package complained that it couldn't find php.ini-recommended. This is easily solved by downloading the complete PHP distribution and copying the file from there into /etc/apache2/.

by Dorax on Sat, 2006-11-11 04:52
I have the same problem. Running ldd shows me:
libt1.so.5 => not found


I could not find this package on linuxpackages or getslack. Any ideas where I might find it? I checked the php source, but it wasn't there.

Thanks for this great thread!


  



All times are GMT -5. The time now is 06:35 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration