Use yum to install Apache, Mysql, PHP in the YUM-PHP environment. use yum to install Apache, Mysql, and PHP.2.1. after installing Apacheyuminstallhttpdhttpd-devel, use/etc/init. d/httpdstart start apache set to boot start: c YUM-PHP environment build
Install Apache, Mysql, and PHP with yum.
Install Apache, Mysql, and PHP with yum.
2.1 install Apache
Yum install httpd-devel
After the installation is complete, start apache with/etc/init. d/httpd start
Set to boot: chkconfig httpd on
2.2 install mysql
2.2.1 yum install mysql-server mysql-devel
Similarly, start mysql with/etc/init. d/mysqld start
2.2.2 set the mysql password
Start mysql console: mysql
Mysql>; USE mysql;
Mysql>; UPDATE user SET Password = PASSWORD ('newpassword') WHERE user = 'root ';
Mysql>; flush privileges;
2.2.3 allow remote logon
Mysql-u root-p
Enter Password:
Mysql> grant all privileges on *. * TO 'username '@' % 'identified by 'password' with grant option;
After that, you can use mysql-front to remotely manage mysql.
2.2.4 set to boot
Chkconfig mysqld on
3. install php
Yum install php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
/Etc/init. d/httpd start
/Upgrade php5.1 to 5.2 by default.
Vi gedit/etc/yum. repos. d/utterramblings. repo
Add the following content to the open file:
[Utterramblings]
Name = Jason's Utter Ramblings Repo
Baseurl = http://www.jasonlitka.com/media/el?releasever/?basearch/
Enabled = 1
Gpgcheck = 1
Gpgkey = http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
Save
Yum update php
Decompress the package and copy ZendOptimizer. so under the ZendOptimizer-3.3.9-linux-glibc23-x86_64/data/5_2_x_comp directory to a directory, such as/usr/local/Zend/lib/
Zend optimizer 3.3.9 has some new changes and does not need to be installed. you can directly reference the. so file in the php. ini file:
ExpiresActive on
ExpiresDefault "access plus 86400 second"
Uninstall Mysql
[Root @ localhost ~] # Rpm-qa | grep mysql
Mod_auth_mysql-2.6.1-2.2
Php-mysql-4.3.9-3.15
Mysql-devel-4.1.20-1.RHEL4.1
Mysql-4.1.20-1.RHEL4.1
Mysqlclient10-3.23.58-4.RHEL4.1
Libdbi-dbd-mysql-0.6.5-10.RHEL4.1
Note: The rpm-qa | grep mysql command is used to list mysql-related packages. in the preceding example, the rpm Package List of mysql is installed by default in LinuxAS4,
The list listed in other Linux versions may be different, but don't worry. whatever it is, the uninstallation starts from the bottom package until the first package is detached.
(Rpm-e is the command to uninstall the rpm package, followed by the package name, the last version number is not to fight, for example, we next to uninstall the mysqlclient10-3.23.58-4.RHEL4.1 package)
The method is as follows:
Rpm-e mysqlclient
Uninstall Apache
[Root @ localhost ~] # Rpm-qa | grep httpd
Httpd-manual-2.0.52-25.ent
System-config-httpd-1.3.1-1
Httpd-2.0.52-25.ent
Httpd-suexec-2.0.52-25.ent
Note: The method is the same as to uninstall Mysql.
Uninstall PHP
[Root @ localhost ~] # Rpm-qa | grep php
Php-odbc-4.3.9-3.15
Php-4.3.9-3.15
Php-mysql-4.3.9-3.15
Php-pear-4.3.9-3.15
Php-ldap-4.3.9-3.15
Php-pgsql-4.3.9-3.15
Note: The method is the same as to uninstall Mysql.
Note: If the package dependency cannot be detached, the system will usually prompt the package dependency, and list the dependent package names. uninstall the dependent package first.
If there is really a package that can not be uninstalled, you can add-nodeps this parameter to uninstall, for example, we unload the php-4.3.9-3.15, it can not be removed.
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.