Linux mysqlapache php installation process. Copy the tar.gz files of apache, mysql, and php to the/home/tmp directory. Run the following command:
Install mysql in Linux
- Cd/home/tmp
- Groupadd mysql
- Useradd-g mysql
- Tar-zxvf mysql-5.1.33.tar.gz
- Cd mysql-5.1.33
- ./Configure -- prefix =/usr/local/mysql
- Make
- Make install
- Cd/usr/local/mysql
- Chown-R root.
- Bin/mysql-u root-p
- Chgrp-R mysql. (Note that there is one .)
- Cd/home/tmp
- Cd mysql-5.1.33
- Ln-s/usr/local/mysql // usr/local/mysql
- Cp support-files/my-small.cnf/etc/my. cnf
- Modify my. cnf and add user = mysql under [sqld.
- Chown root/etc/my. cnf
- Chgrp root/ect/my. cnf
- Chmod 644/etc/my. cnf
- /Usr/local/mysql/bin/mysqld_safe -- user = mysql &
- Cp support-files/mysql. server/etc/init. d/mysql
- Chmod 755/etc/init. d/mysql
- Chkconfig -- add mysql
- Chkconfig -- level 35 mysql on
- /Usr/local/mysql/bin/mysql_install_db -- user = mysql
- /Usr/local/mysql/bin/mysql-u root (if you can enter the mysql command line, the mysql configuration is successful .)
Edit/etc/my. cnf
[Client] + default-character-set = utf8 [mysqld] + default-character-set = utf8 [mysql] + default-character-set = utf8
- To install apache, go to the/home/tmp directory (cd/home/tmp)
- Tar-zxvf httpd-2.2.13.tar.gz
- Cd httpd-2.2.13./configure -- prefix =/usr/local/apache2 -- enable-so -- enable-rewrite -- enable-auth-digest = shared -- enable-ssl -- enable-deflate
- Make
- History
- Make install
- Cp/usr/local/apache2/bin/apachectl/etc/init. d
- Chmod 755/etc/init. d/apachectl
- /Usr/local/apache2/bin/apachectl start
-
- Php installation
- Cd/home/tmp
- Tar-xzf php-5.3.0.tar.gz
- Cd php-5.3.0
- ./configure --prefix=/usr/local/php \
- --with-apxs2=/usr/local/apache2/bin/apxs \
- --with-mysql=/usr/local/mysql \
- --with-pdo-mysql \
- --with-zlib \
- --with-libxml-dir \
- --with-xsl \
- --enable-mbstring \
- --enable-zend-multibyte \
- --enable-sockets \
- --enable-soap \
- --enable-zip
Linux mysql
Make install modify apache httpd. conf (apache/conf/httpd. conf) to add the following parts: LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php. php
- cp php.ini-development /usr/local/php/lib/php.ini
- /usr/local/apache2/bin/apachectl start
- /usr/local/apache2/bin/apachectl stop
- /usr/local/apache2/bin/apachectl start
Attachment: Linux mysql allows remote connection
- /Usr/local/mysql/bin/mysql-u root-p (enter mysql)
- Use mysql;
- SELECT 'host', 'user' FROM User;
- UPDATE user SET 'host' = '%' WHERE 'user' = 'root' LIMIT 1;
- Flush privileges;
- Note that you must enter ";" in the mysql command line format ";".
V can be made after configure.
Linux mysql
Make install note that the full path of pdo_mysql is:
/Usr/local/php/lib/php/extensions/debug-non-zts-20060613/pdo_mysql.so
Then in/usr/local/lib/php. ini
Add the following sentence:
Extension =/usr/local/php/lib/php/extensions/debug-non-zts-20060613/pdo_mysql.so
Restart apache and you will see that pdo_mysql has been loaded successfully.
Mysql is installed in ubuntu7.10. By default, only local access is allowed. You need to enable the user permission and bind it to mysql.
1. Open the user permission under the command line: grant all privileges on drupal. * to user@192.168.1.80 identified by 'user-password ';
On the administrator interface, you can add host-> any host through user management to add access permissions (by default, root users can only access the local machine, and new users can remotely)
2. Cancel the mysql local binding:
Edit/etc/mysql/my. cnf
# Instead of skip-networking the default is now to listen only on
# Localhost which is more compatible and is not less secure.
Bind-address = 127.0.0.1
Annotate "bind-address = 127.0.0.1"
Sudo/etc/init. d/mysql restart Remote Access