tailieunhanh - Phát triển web với PHP và MySQL - p 82

Installing PHP 4 and MySQL APPENDIX A 785 Let’s begin! Become root by using su. $ su and enter the user root’s password. Change to the directory that you have stored the source files in, for example # cd /tmp/download/ Extract the files using the following command: # gunzip -c | tar xvf - A INSTALLING PHP 4 AND MYSQL Change to the new directory. This was created by tar during the extraction, like this: # cd Now you can start configuring the MySQL server. You can specify many options with the configure command. Type configure --help to see all options. The configure script will check for your compiler and. | Installing PHP 4 and MySQL 785 Appendix A Let s begin Become root by using su. su and enter the user root s password. Change to the directory that you have stored the source files in for example cd tmp download Extract the files using the following command gunzip -c tar xvf - Change to the new directory. This was created by tar during the extraction like this cd Now you can start configuring the MySQL server. You can specify many options with the configure command. Type configure --help to see all options. The configure script will check for your compiler and a number of other things. If you have any errors you can check the file to see them. . configure --prefix usr local mysql After you are done with configure you can make the actual binaries by executing the following line this will take a while make Now you are ready to install all the binaries. Run the following lines to install the binaries to the directory you specified with the configure --prefix option. make install Now it s time to create the mysql tables which are used to define the permissions. Make sure you replace new-password with something of your choice otherwise new-password will be your root password. scripts mysql_install_db cd usr local mysql bin . safe_mysqld . mysqladmin -u root password new-password You can verify that MySQL is working by running some simple tests. The output should be similar to what is shown here A Installing PHP 4 AND MYSQL usr local mysql bin mysqlshow -p 786 Appendixes Part VI Enter password . Databases . mysql . When you install MySQL it will automatically create two databases. One is the mysql table which controls users hosts and DB permissions in the actual server. The other is a test DB. You can check your database via the command line like this mysql -u root -p Enter password mysql show databases -------------------- Database -------------------- mysql test -------------------- 2 rows in set sec Now it s time to

TỪ KHÓA LIÊN QUAN