LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-05-2004, 12:19 AM   #1
bmcneil2k
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Rep: Reputation: 0
Tring to install Mysql on Redhat 9


Hello all

I have install Redhat 9 and want to run Mysql and PHP 3.. I was able to down load , mysql-standard-4.0.17-pc-linux-i686 and PHP3, I unpacked the software, upon my command: ./configure --prefix=/usr/local/mysql
to set the Directory usr/local/mysql, it never happened instead I received this:
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!.. I cannot rund the database nor complete the commands make make install. I must tell you the version on the Redhat cd for Mysql was installed, then removed. is this what is causing the errors with my install..

bmcneil2k@nyc.rr.com

Help
 
Old 02-05-2004, 01:03 AM   #2
ter_roshak
Member
 
Registered: May 2001
Location: Everett, WA
Distribution: Gentoo, RedHat
Posts: 102

Rep: Reputation: 15
You want to obtain the source to MySQL if you want to configure and compile it for your machine. If you use the binary, you install it and run it, and it has been compiled for a generic machine so that it will run on many machines.

So, download the source to MySQL:
http://www.mysql.com/downloads/mysql-4.0.html

-Josh
 
Old 02-05-2004, 03:41 AM   #3
infochen
LQ Newbie
 
Registered: Mar 2003
Location: Belgium
Distribution: Redhat 8.0
Posts: 7
Blog Entries: 1

Rep: Reputation: 0
Dear,

The distribution you downloaded is not a 'build from scratch' set but a binary distribution. Everything will be installed for you so no need to compile.
I have created a small script for myself to get this working . See underneath.
This should do the job for you. I have a similar setup script for Apache and PHP , and it takes me 15 minutes to get it all installed from scratch.
The main thing is to make sure you have the appropriate user and run the install script.

#! /bin/bash
# works for mysql-standard-4.0.14-pc-linux-i686
# 17 nov chenged on this machine to version 4.0.16
echo "#############################"
echo "Install mysql.."
echo "Making group and user mysql"
echo "#############################"
groupadd mysql
useradd -g mysql mysql
echo "Unzip and untar mysql"
cd /usr/local/
gunzip mysql*.tar.gz
tar -xvf mysql*.tar
echo "Make soft link"
ln -s mysql-standard-4.0.17-pc-linux-i686 mysql
cd mysql
./scripts/mysql_install_db
chown -R root /usr/local/mysql/
chown -R mysql /usr/local/mysql/data/
chgrp -R mysql /usr/local/mysql
./bin/mysqld_safe --user=mysql &
 
Old 02-07-2004, 05:23 PM   #4
bmcneil2k
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Hey thanks , I am sort of a nubie, so if you would , tell me when I create this script where to run it from, Should I put it where the tar files are. Also I want to use a user other than root. what settings are needed on a user I created to have permissions to run install.

could you post the php, and apatche scripts as well

this I beleive will get me some where....

This is the error I get when I run --> mysql

ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
 
Old 02-08-2004, 03:03 PM   #5
bmcneil2k
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
What are the entire install proceedure for the *.tar binary installation of Mysql on Linux 9
 
Old 02-09-2004, 03:08 AM   #6
infochen
LQ Newbie
 
Registered: Mar 2003
Location: Belgium
Distribution: Redhat 8.0
Posts: 7
Blog Entries: 1

Rep: Reputation: 0
installation MySQL

1. To generate the script :
a. copy the text into a file on your machine. I normally put files like these in the /usr/local/ directory in order to keep some overview
b. save the file and run the following command : chmod +x <filename>
(this will make the script executable)
c. run the script by typing : ./<filename>


2. apache and php scripts

underneath . apache and php scriptsthe scripts to install Apache and PHP . Make sure you download the versions as indicated. This in order to get the correct soft links.

#! /bin/bash
# works for apache_1.3.29 and php-4.3.3
# 14 oct - added postgresql support in php
# 17 nov for this compute version php = 4.3.3 apache = 1.3.29
# 17 nov removed postgresql
echo "###################################"
echo "# Creating Apache and PHP #"
echo "# 1.unzip and untar apache #"
echo "###################################"
cd /usr/local/
gunzip apache*.tar.gz
tar -xvf apache*.tar
echo "#####################"
echo "# creating softlink #"
echo "#####################"
ln -s apache_1.3.29 apache
cd apache
echo "#######################"
echo "# First configuration #"
echo "#######################"
./configure --with-layout=Apache
echo "#######################################"
echo "#starting php configuration and build #"
echo "#######################################"
cd /usr/local/
gunzip php-4*.tar.gz
tar -xvf php-4*.tar
echo "#####################"
echo "# creating softlink #"
echo "#####################"
ln -s php-4.3.3 php
cd php
echo "#################"
echo "# Configure PHP #"
echo "#################"
./configure --with-apache=../apache --with-mysql=/usr/local/mysql --enable-module=so
echo "########################"
echo "# make and make instal #"
echo "########################"
make
make install
echo "#######################"
echo "# copy ini file #"
echo "#######################"
cp php.ini-dist /usr/local/apache/conf/php.ini
cd /usr/local/apache/htdocs
touch phpinfo.php
echo "<?php phpinfo(); ?>" >> phpinfo.php
clear
echo "#########################"
echo "# reconfigure apache #"
echo "#########################"
cd /usr/local/apache/
./configure --with-layout=Apache --activate-module=src/modules/php4/libphp4.a
make
make install
echo "<<done>>"

3. mysql.sock
try and see whether the file mysql.sock exists in the /tmp directory. The localtion of this file will be set by the my.cnf file
 
Old 02-09-2004, 04:04 AM   #7
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
I don't get it, why going through all the trouble, when you can simply install the RPM?
 
Old 02-09-2004, 05:30 AM   #8
bmcneil2k
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Hey I tried the RPM and was in conflick with the verison already installed, my quest was to get the latest version of Mysql

I want to use the RPM.. is their any known proceedure for it
 
Old 02-09-2004, 05:41 AM   #9
bmcneil2k
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
infochen
Thanks for the script's and I discovered how to run them, Thanks bro
I ran the script within the directory , of the unpack source of mysql... most command lines failed. So I performed the lines separate and some took, the only command that did not run was the ./configure make && make install. nothing happen, I guess it did not install. I still get the error: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
When I try to run mysql,
Now how do can clean this up to start over. Do I simply delete this mysql-version directory
 
Old 02-09-2004, 05:44 AM   #10
bmcneil2k
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Ohhhhhhhhhhh ok I beleive the version I was using was wrong all along for this script
WOW --- the stupitd mistakes can make this so time consuming
 
Old 02-09-2004, 06:05 AM   #11
bmcneil2k
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
The main thing is to make sure you have the appropriate user and run the install script.

How can I make a user with root like permissions,
Or do I use root,,, because that is the user I have been using all along
 
Old 02-09-2004, 06:25 AM   #12
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Upgrade or deinstall the current version then install.
If it complains about dependencies(packages that requires the current version) note them down, install with --nodeps, grab the source rpm of these dependencies then compile them against latest mysql.
To build a source RPM, simply install the rpm, go to /usr/src/redhat/SPECS
and do
Code:
rpmbuild -bb <package>.spec
After its built the RPM will appear somewhere in /usr/src/redhat/RPMS
 
Old 02-09-2004, 12:13 PM   #13
bmcneil2k
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Hey guy's I beleive I have the Mysql set up ok, I followed the information in under the docs,
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &

Although I did not run any actual install , All commands took..
But cannot seem to start the server... What is missing to this configuration, and how can I access this with a user other than root
 
Old 02-10-2004, 06:10 AM   #14
infochen
LQ Newbie
 
Registered: Mar 2003
Location: Belgium
Distribution: Redhat 8.0
Posts: 7
Blog Entries: 1

Rep: Reputation: 0
If you run the command [ps aux] from the command line , you should be able to see the mysqld process as running. If you did not get error messages on the last command (mysqld_safe) , the server is up and running.
 
Old 02-11-2004, 09:57 PM   #15
bmcneil2k
LQ Newbie
 
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Unhappy Still tring

root@localhost mysql]# bin/mysqld_safe --user=mysql &
[1] 4047
[root@localhost mysql]# Starting mysqld daemon with databases from /usr/local/mysql/data
040211 23:14:27 mysqld ended

Ok What would be the RPM proceedure , because I do not even see the service running in services. its not even an option. I do not think this binary install ever took place with the above install proceedure. I'm getting nowhere here..... This can't e that difficult
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tring to install Azureus in Kubuntu NewToLinux2005 Ubuntu 1 07-13-2005 10:06 PM
have navidia g force 2 intergrated video , and tring to install linux 8.0 , and the s RAhdin Linux - Newbie 3 03-20-2004 12:06 AM
Kernel issue for suse9 when tring to install module for e1000 feetyouwell Linux - Software 6 01-15-2004 04:35 PM
Install MySQL on RedHat 9.0 dunmarie Linux - Software 1 10-07-2003 12:18 PM
Tring to install KDE MarleyGPN Linux - Software 8 08-28-2003 11:01 PM


All times are GMT -5. The time now is 11:00 PM.

Main Menu
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration