Compiling and installing MySQL under solrais many of my friends may encounter some problems when compiling mysql under sun. now I will sort out the compilation process as follows, hoping to help you.
Environment:
Sun250 + solaris8
Process:
First install the compilation environment of solaris8, go to http://www.sunfreeware.com/download the ghost software:
1.autoconf-2.13-sol8-sparc-local.gz
2.automake-1.4-sol8-sparc-local.gz
3.bison-1.28-sol8-sparc-local.gz
4.gcc-2.95.3-sol8-sparc-local.gz
5.gzip-1.3-sol8-sparc-local
6.make-3.79.1-sol8-sparc-local.gz
Go to www.gnu.orgto download gnu_tar. the latest version is tar-1.13.tar.gz.
To set environment variables, some sun commands are required during the compilation process, but these commands are not included in your PATH by default, so we need to manually add them, I use bash to modify the root user. the PATH in bash_profile is
PATH =/usr/local/sbin:/usr/local/bin:/usr/ccs/bin:/usr/sbin: $ PATH: $ HOME/bin: /usr/local/mysql/bin:
Log out and log on again to make the variable take effect. follow these steps to install the software:
1. pkgadd-d gzip-1.3-sol8-sparc-local
2. gunzip autoconf-2.13-sol8-sparc-local.gz
3. gunzip automake-1.4-sol8-sparc-local.gz
4. gunzip gcc-2.95.3-sol8-sparc-local.gz
5 gunzip bison-1.28-sol8-sparc-local.gz
6. pkgadd-d autoconf-2.13-sol8-sparc-local
7. pkgadd-d automake-1.4-sol8-sparc-local
8. pkgadd-d gcc-2.95.3-sol8-sparc-local
9. pkgadd-d make-3.79.1-sol8-sparc-local
10. gunzip tar-1.13.tar.gz
11. tar xvf tar-1.13.tar
12. cd tar-1.13
13 ../configure -- prefix =/usr/local/gnu_tar
14. make
15. make install
16. vi ~ /. Add bashrc
Alias tar = '/usr/local/gnu_tar/bin/tar'
17. alias tar = '/usr/local/gnu_tar/bin/tar'
18. tar zxvf mysql-3.23.44.tar.gz
19. cd mysql-3.23.44
20. which perl (check the location of your system's perl, where sun is in/bin)
21. cd tests changed the location of the perl interpreter for all files ending with pl in this directory #! /Bin/perl
22. cd .. (back to the upper-level Directory)
23. CC = gcc CFLAGS = "-O6" CXX = gcc CXXFLAGS = "-O6-felide-constructors-fno-exceptions-fno-rtti ". /configure -- prefix =/usr/local/mysql -- with-mysqld-user = mysql -- with-charset = gbk -- with-extra-charsets = all
24. make
25. make install
26. cd support-files
27. chmod 700 mysql. server
28. cp mysql. server/etc/rc2.d/S90MySQL (the above three are used to automatically start the MySQL service during system boot)
29. Modify. bash_profile to add the mysql path. I added the path above, so this is free of charge.
30. useradd-d/usr/local/mysql/var-s/bin/false mysql (create a MySQL running user)
31. mysql_install_db (initial database)
32. chown-R mysql/usr/local/mysql/var
33./etc/rc2.d/S90MySQL start (start the database)
34. mysql (connection test)
[Root @ mailtest support-files] # mysql
Welcome to the MySQL monitor. Commands end with; or g.
Your MySQL connection id is 1 to server version: 3.23.44
Type 'help; 'or 'H' for help. Type 'C' to clear the buffer.
Mysql>
35. installation is complete