Download presentation
Presentation is loading. Please wait.
Published byAldous Snow Modified over 6 years ago
1
Installation of MySQL Objectives Contents Practical Summary
Install MySQL Contents Application delivered as Rebuilding SRPMS Removing existing Installing new MySQL Verify installation Creating MySQL admin Practical Summary
2
Developers enviroment needed
If you want to install applications from SRPMS or TAR packages Start X-Windows: and then start: Or if pakgaes is somewhere else, here on ftp server Goto section Development and check Development Tools (Go inside and check all GCC options not checked) Then click on Update and follow instruction’s You might Need more! Save time and go to next page and add packages from other sections as well # startx # redhat-config-packages # redhat-config-packages –tree=ftp://server.com/RPMS redhat-config-packages redhat-config-packages is a graphical package installation tool to use to install various packages onto your system. There are three different modes of operation for redhat-config-packages. redhat-config-packages: This is the primary mode of operation. It is used to install extra packages from package groups included in Red Hat Linux. This uses CDs to install the packages by default. You can instead use a Red Hat Linux installation tree with the option '-tree=/path/to/tree' or use a directory with Red Hat Linux ISO images with the option '--isodir=/path/to/dir'. redhat-cdinstall-helper: This is used when installing packages from additional CDs and can resolve dependencies on packages from the main distribution. redhat-install-packages: This can be used to install single packages. Takes an argument of what packages to install. Resolves dependencies as needed on packages from the main distribution. Notes "Trees" are a complete Red Hat Linux installation tree with the RedHat directory as well as the .discinfo file.
3
Install original MySQL, Apache & PHP
It is a good idea to have RedHat original servers You will have all files, and only need to update Start X-Windows: and then start: Or if pakgaes is somewhere else, here on ftp server In section Servers check: Server Configuration Tools Web Server (add PHP, SQL, PERL) Mail Server (SendMail) Windows File Server DNS Server FTP Server SQL Database (check MySQL) In section System check: Administration Tools System Tools Then click on Update and follow instruction’s # startx # redhat-config-packages # redhat-config-packages –tree=ftp://server.com/RPMS At sthis stage we add up our RH9 to become a server in development stage. The Final server is stripped and might look something like this: Desktops X Windows Don't tick Gnome Desktop Don't tick KDE Desktop Don't tick Applications Editors Don't tick Engineering & Scientific Don't tick Graphical Internet Don't tick Text Based Internet Tick Office / productivity Don't tick Sound & Video Don't tick Authoring & Publishing Don't tick Graphics Don't tick Games & Entertainment Don't tick Servers Server Configuration Tools Tick Web Server Tick Mail Server Tick Windows File Server Tick DNS Server Tick FTP Server Tick SQL Database Tick News Server Don't tick Network Server Don't tick Development Development Tools Don't tick Kernel Development Don't tick X Software Development Don't tick Gnome Development Don't tick KDE Development Don't tick System Administration Tools Tick System Tools Tick Printing Support Don't tick Misc Minimal Don't tick Everything Don't tick
4
Rebuild MySQL from SRPMS
Stop running mysql Download MySQL SRPM to /usr/local/src Rebuild Source RPM Process take between 1 to 4 hour to complete! # service mysqld status mysqld (pid 1228) running... # service mysqld stop # cd /usr/local/src # wget ftp://server.com/path/MySQL src.rpm Server.com/path must be replaced with your download. You find current stable version of MySQL ( ) annonced Source RPM at: Note! When writing this, a new subversion of MySQL has been released MySQL src.rpm # cd /usr/local/src # rpmbuild --rebuild MySQL src.rpm
5
Check rebuilded packages
Rebuilded SRPMS en up in: /usr/src/redhat/RPMS/i386 Check that the rebuild created this files: SRPMS can also be generated for specific CPU Then you have to checkproper sub-catalogs i486/, i686/. . . # cd /usr/src/redhat/RPMS/i386 # ls –1 MySQL-bench i386.rpm MySQL-client i386.rpm MySQL-debuginfo i386.rpm MySQL-devel i386.rpm MySQL-embedded i386.rpm MySQL-Max i386.rpm MySQL-server i386.rpm MySQL-shared i386.rpm You will not need all created RPM’S, these are needed: shared, server, devel, client and debuginfo
6
Removing old MySQL and installing new
Removing old MySQL libraries, ignoring dependecies Installing new MySQL and subcomponents rpm –qa | grep –i mysql . . . mysql a-11 rpm -e --nodeps mysql a-11 cd /usr/src/redhat/RPMS/i386 rpm -ivh MySQL-shared i386.rpm rpm -ivh MySQL-server i386.rpm rpm -ivh MySQL-devel i386.rpm rpm -ivh MySQL-client i386.rpm rpm -ivh MySQL-debuginfo i386.rpm In order to update MySQL you need to remove old MySQL libraries, that can only be done by ignoring dependencies with –nodeps switch.
7
Checking installation
Check that all files are there The rpm –qa takes some time, have pation We also installed mysql-admin for rh9, as you can see. The module perl-DBD is needed for API rpm -qa | grep -i mysql MySQL-shared MySQL-debuginfo MySQL-server MySQL-client MySQL-devel mysql-administrator rh9 perl-DBD-MySQL You should see at least files you installed with rpm, if you see more files it is OK.
8
Start service & Create MySQL admin
Starting MySQLd service Before you can do anything with MySQL it must be running and you must have a client installed. Check logfiles tail /var/log/messages to se any startup error Creating MySQL admin Test MySQL # service mysql start # /usr/bin/mysqladmin -u root password 'qwerty' # /usr/bin/mysqladmin -u root -h my-server.com password 'qwerty' # /usr/bin/mysql_fix_privilege_tables You should be able to see your databases with show databases; To drop a database means that it is erased from server! # mysql –u root –p Enter password: mysql> create database test; Query OK, 1 row affected (0.00 sec) mysql> show databases; mysql> drop database test; mysql> exit;
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.