Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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..
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.
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)
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
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
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
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.