yum-php Environment Construction
Install apache,mysql,php with Yum.
Install apache,mysql,php with Yum.
2.1 Installing Apache
Yum Install httpd Httpd-devel
When the installation is complete, start Apache with/etc/init.d/httpd start
Set to boot: Chkconfig httpd on
2.2 Installing MySQL
2.2.1 Yum install MySQL mysql-server mysql-devel
Again, when done, start MySQL with/etc/init.d/mysqld start
2.2.2 Setting 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 logins
Mysql-u root-p
Enter Password:
Mysql>grant all privileges on * * to ' user name ' @ '% ' identified by ' password ' with GRANT OPTION;
When you're done, you can manage MySQL remotely with Mysql-front.
2.2.4 Set to boot
Chkconfig mysqld on
3. Install PHP
Yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
/ETC/INIT.D/HTTPD start
/Upgrade the default php5.1 to 5.2
VI Gedit/etc/yum.repos.d/utterramblings.repo
Include the following in 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
After decompression, copy the zendoptimizer.so in 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 There are some new changes, do not need to install, directly in the php.ini file to refer to the. so file:
Expiresactive on
ExpiresDefault "Access plus 86400 second"
Uninstall MySQL
[[email protected] ~]# 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
Description: Rpm–qa | The grep mysql command is to list all MySQL related packages, the example above is the LinuxAS4 default install MySQL RPM package list,
If it's a list of other Linux versions, it might not be the same, but don't worry, no matter what, uninstall starts with the bottom one, until the first one is uninstalled.
Description: Rpm–e is the command to unload the RPM package, followed by the package name, the final version number is not to fight, such as our next uninstall mysqlclient10-3.23.58-4.rhel4.1 package
Here's how:
Rpm–e mysqlclient
Uninstalling Apache
[Email protected] ~]# 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
Description: The method is the same as uninstalling MySQL, needless to say.
Uninstalling PHP
[[email protected] ~]# 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
Description: The same method as uninstalling MySQL
Note: If the uninstallation is not removed, the system will generally prompt the package dependencies, and list the name of the dependent package, first uninstall the prompt depends on the package is ready.
If there is really a unloading package, you can add-nodeps this parameter to unload, for example, we uninstall php-4.3.9-3.15, it is not 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.