Install Apache + MySQL + PHP with the manual source code in Linux

Source: Internet
Author: User
Since the release of javastugutsy, I want to transfer the development environment to Linux. install the LAMP system and write down the process for your reference. use the latest Apache2.0.x, MySQL5.0.x, and PHP5.x to install several required packages. if no installation is available, the installation is completed. $ sudoapt-getinstallmakegccbuild-essential

Since the launch of Ubuntu Gutsy, I want to transfer the development environment to Linux. install the LAMP system and write down the process for your reference. use the latest Apache2.0.x, MySQL5.0.x, and PHP5.x for installation.

Install several required packages first. If not, the installation has been completed.

$ Sudo apt-get install make gcc build-essential

Now start installing Apache2.0.56, MySQL-5.0.46, PHP-5.2.5

Install the MySQL server.
Download a binary release from mysql.com. Don't use source code installation, compilation is too time-consuming. This download is mysql-5.0.45
Decompress: tar-zxvf mysql * .tar.gz
Move to the installation directory: sudo mv ~ /Desktop/Downs/mysql * // usr/local/mysql
OK, now start configuring MySQL
Now, the system creates a group named mysql, which makes it easy to know that it is an account used to manage databases.
Sudo groupadd mysql
Add another user named mysql .). At the same time, the user is stored in the user group mysql name.
Sudo useradd-g mysql
Now go to the mysql Directory: cd/usr/local/mysql

Create a database system data table: sudo scripts/mysql_install_db -- user = mysql

Creation may fail. this is because the SQL file in the support-files file does not exist. go to the tests directory and set all mysql _*. the SQL file cp to support-files and then execute the above operation is OK.

Modify Directory Permissions
Sudo chown-R root.
Sudo chown-R mysql data (Note that if the source code is compiled and the data storage directory is not specified, var is used instead of data, data is the directory for storing data tables in mysql Databases of earlier versions .)
Sudo chgrp-R mysql.

Copy the configuration file to the/etc directory.
Sudo cp/usr/local/mysql/support-files/my-medium.cnf/etc/my. cnf
In fact, my. cnf is the specific configuration of mysql. What kind of database system is required? modify the data in my. cnf by yourself so that mysql can support InnoDB and other tables.
Note that the support-files directory does not exist after source code compilation and installation, but the related files are in the share/mysql directory under the mysql directory.

OK. Now we can start the MySQL database server.
Sudo support-files/mysql. server start

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.