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 |
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 |
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 & |
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) |
What are the entire install proceedure for the *.tar binary installation of Mysql on Linux 9
|
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 |
I don't get it, why going through all the trouble, when you can simply install the RPM?
|
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 |
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 |
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 |
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 |
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 |
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 |
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.
|
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 |
Suggestion: Use the supplied binary RPMs that come with RH9 and work as-is without any of this complex configuration or compiling, etc... Then, when you've fully mastered that, perhaps move on to compiling and tweaking it to your liking.
http://www.linuxquestions.org/questi...970#post656970 |
All times are GMT -5. The time now is 04:49 AM. |