installing Mysql --- from source

Download from here  ftp://ftp.mysql.com/pub/mysql/

# cd /usr/local/src
#wget -c http://mysql.he.net/Downloads/MySQL-4.0/mysql-5.0.24.tar.gz

Create mysql user and group
#groupadd mysql
#useradd -g mysql mysql

Unpack mysql archive
# tar -zxf mysql-5.0.24.tar.gz
#cd mysql-4.0.24/

Configure mysql with /usr/local/mysql base directory
#./configure --prefix=/usr/local/mysql
Build source files
#make
Install compiled files to the directory specified in prefix
#make install
Mysql uses a configuration file to determine some parameters on startup. It must be modified depending on your machine's capacity. Copy mysql configuration file and startup script for a medium sized system to /etc/my.cnf .  Read my-*.cnf files for your own system on the untarred location of MySQL. Those files allow you to chose which file to use for your system.
#mkdir /etc/mysql/
#cp support-files/my-medium.cnf /etc/mysql/my.cnf
#cp support-files/mysql.server /etc/init.d/
#chmod 755 /etc/init.d/mysql.server

Go to base directory and create MySQL grant tables with mysql user (If this MySQL is your second
MySQL installation in your linux, defaults-file variable can be set to your new conf file)

#cd /usr/local/mysql
#bin/mysql_install_db --user=mysql

Change ownership of binaries to root and ownership of data directory to mysql user
#chown -R root  .
#chown -R mysql var
#chgrp -R mysql .

Introduce new libraries to our Linux
#echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
#ldconfig Start MySQL daemon
#/etc/init.d/mysql.server start

Connect to the MySQL server and give mysql root password. Since, there is no default root password
Please pay attention to this part, I have seen many who don't give any root password to their servers.

#/usr/local/mysql/bin/mysql -u root


--
Warm Regards

mysql ftp site ----GOOD

ftp://ftp.mysql.com/pub/mysql/

--

qmail rocks -qmail-remote.c:36:25: error: openssl/ssl.h: No such file or directory

please ckeck
 
rpm -q gdbm
rpm -q gdbm-devel
rpm -q openssl
rpm -q openssl-devel
rpm -q stunnel
rpm -q krb5-devel (kerberos development files)

--

Perl 5.8.1 installation frm source


Preparation :
  
   i.  Download Perl 5.8.1 from :
         http://www.perl.com/CPAN/src/stable.tar.gz
   ii. Remove the old Perl from the system before building
         # rm -rf /usr/lib/perl5
   p/s : Suggestion from jeremy
         # mv /usr/lib/perl5 /root/perl5backup

Installation :

   i.   # tar xvzf stable.tar.gz
   ii.  # cd perl-5.8.1
   iii. For more information , # ./Configure --help
        # ./Configure -de \
            -Dprefix=/usr \
            -Dcccdlflags='-fPIC' \
            -Darchname=i386-linux
   iv.  # make
   v.   # make test
   vi.  # make install

Post Installation :

   i.   # perl -MCPAN -e shell
        Just Follow step by step. Use all the Default Answer.
   ii.  install Bundle::CPAN
   iii. install Bundle::LWP
   iv.  install Bundle::DBI
   v.   install DBD::mysql

To Test :

   i.   # perl -v
   ii.  # GET -ed www.yahoo.com


--

LAMP installation ( as on July 29 2007 )

1. Installing Apache 2.2.3

a) Download the Apache 2.2.3 source files from http://httpd.apache.org
b) Extract the source from the gunzipped file using tar or gunzip
c) change the working directory to the directory containing the
extracted source files
d) Run the following command for basic apache installation

./configure --prefix=/usr/local
--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql
--enable-shared=max --enable-module=rewrite --enable-module=so
--enable-shared=ssl --enable-ssl --with-ssl=/path/to/openssl-0.9.8d

make
make install


2. Installing PHP 5.2.0

a) Download the PHP 5.2.0 source files from http://www.php.net
b) Extract the source from the gunzipped file using tar or gunzip
c) change the working directory to the directory containing the
extracted source files
d) Run the following command for PHP installation

./configure --prefix=/usr/local/php5
--with-apxs2=/usr/local/apache2/bin/apxs
--with-libxml-dir=/usr/local/lib --with-zlib
--with-zlib-dir=/usr/local/lib --with-mysql=/usr/local/mysql
--with-mysqli-dir=/usr/bin/mysql_config --with-gd --enable-soap
--enable-sockets --with-jpeg-dir=/usr --enable-exif

e)Build the PHP configuration using the following command

make

f) Install PHP

make install

restart apachectl

if you get error like this " /usr/local/modules/libphp5.so: cannot
restore segment prot after reloc: Permission denied "
you need to

#setenforce 0
then restart apachectl

open ../conf/httpd.conf using your favorite editor, find AddType
directive and add after it the following lines:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

chk if you are getting the phpinfo.php page

3. Installing MySQL 5.x


a) Download the MysQL source files from http://www.mysql.com
b) Extract the source from the gunzipped file using tar or gunzip
c) Create the mysql user and group using the following commands

groupadd mysql
useradd -g mysql -c "MySQL Server" mysql

d) Create a symbolic link to the MySQL source directory in a directory
of your choice. (I use /usr/local/). Here is an example of the same

ln -s /software/mysql-max-4.1.22-pc-linux-gnu-i686 /usr/local/mysql

e) Change the working directory to the symbolic link that you have
created in the server.
f) Execute the following command

./scripts/mysql_install_db

The above command will install the mysql and the test database

g) Change the ownership of /usr/local/mysql using the following command

chown -R root:mysql /usr/local/mysql

Where root is the user and mysql is the group

h) Change the ownership of /usr/local/mysql/data using the following command

chown -R mysql:mysql /usr/local/mysql/data

i) Copy the default configuration file for the expected size of the
database (small, medium, large, huge)

cp support-files/my-medium.cnf /etc/my.cnf
chown root:sys /etc/my.cnf
chmod 644 /etc/my.cnf

j) Now we have to tell the system where to find some of the dynamic
libraries that MySQL will need to run. We use dynamic libraries
instead of static to keep the memory usage of the MySQL program itself
to a minimum.

echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
ldconfig

k) Now create a startup script, which enables MySQL auto-start each
time your server is restarted.

cp ./support-files/mysql.server /etc/rc.d/init.d/mysql
chmod +x /etc/rc.d/init.d/mysql
/sbin/chkconfig --level 3 mysql on

l) Then set up symlinks for all the MySQL binaries, so they can be run
from anyplace without having to include/specify long paths, , etc

cd /usr/local/mysql/bin
for file in *; do ln -s /usr/local/mysql/bin/$file /usr/bin/$file; done

m) First, we will assume that only applications on the same server
will be allowed to access the database (i.e., not a program running
on a physically separate server). So we'll tell MySQL not to even
listen on port 3306 for TCP connections l ike it does by default.

Edit /etc/my.cnf and uncomment the

skip-networking

n) Start MySQL


--

apachectl -k start ..error meassage

==================================================
httpd: apr_sockaddr_info_get() failed for server.**********.com
httpd: Could not reliably determine the server's fully qualified
domain name, uing 127.0.0.1 for ServerName
===================================================
If any one gets this error pls edit the httpd .conf file and add ur
server name and also make sure thta ur /etc/host file has ur server
name .

--

Other Articles

Enter your email address: