centos6.4 update Yum Source to build a high-version lamp environment

Source: Internet
Author: User
Tags apache log file apcu mysql version apache log fully qualified domain name

Server use CENTOS6 words, use yum way to build lamp environment, may face the problem of software version is too low, then can choose New Yum source (here Select is webtatic EL6 source), and then choose to install a higher version of MySQL, PHP and other software.

Step One: Update the Yum source
1. Perform the following command to update the Yum source to webtatic EL6 Yum Source:
RPM-UVH http://repo.webtatic.com/yum/el6/latest.rpm

Step Two: View the version of the package that the Yum source can download and install
1. See the PHP version you can install, such as:
Yum list availiable php* //view packages that start with PHP in the Yum source

2. View the MySQL version that can be installed
Yum list availiable mysql*

3. View the Apache version that can be installed
Yum list availiable httpd*

Step Three: Install the specified version of MySQL, Apache, PHP
(use Rpm-qa|grep MySQL to view package installation before installation,
Use Rpm-e "mysql-xx" or rpm-e–nodeps "mysql-xx" command
Remove installed packages).
1. Install mysql5.5
Yum install mysql55w mysql55w-server

2. Install Apache, with the default version is OK
Yum Install httpd

3. Install php5.6
Yum Install php56w

4. Install the PHP extension component (optional installation as required)
Here simply put the possible use of all to install, a great trouble.
Yum install Php56w-bcmath php56w-dba php56w-devel php56w-embedded php56w-enchant php56w-fpm php56w-gd php56w-imap Php56w-interbase php56w-intl php56w-ldap php56w-mbstring php56w-mcrypt php56w-mssql php56w-mysqlnd php56w-odbc Php56w-opcache php56w-pdo php56w-pear.noarch PHP56W-PECL-APCU php56w-pecl-apcu-devel Php56w-pecl-gearman Php56w-pecl-geoip php56w-pecl-igbinary php56w-pecl-igbinary-devel Php56w-pecl-imagick php56w-pecl-imagick-devel Php56w-pecl-memcache php56w-pecl-memcached Php56w-pecl-redis php56w-pecl-xdebug php56w-pgsql php56w-phpdbg Php56w-process Php56w-pspell php56w-recode php56w-snmp php56w-soap php56w-tidy php56w-xml php56w-xmlrpc
5. Set up httpd, mysqld service Boot
To use the command:chkconfig–levels 235 httpd on
chkconfig–levels 235 mysqld on
6. View the installation effect:
① Open httpd Service httpd restart, (if shown "httpd:could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName”),
To modify the servername in the httpd.conf configuration file,vim/etc/httpd/conf/httpd.conf
Change #servername www.example.com:80 to ServerName own domain or localhost:80
, and then visit the localhost local URL

② Open Mysqld Services, service mysqld restart,
(If you display"mysql:unrecognized Service"May be a permission issue, try modifying mysqld execution permissions:
chmod 755/etc/rc.d/init.d/mysqld Modify mysqld Execute Permissions
Open mysqld Service, mysql-uroot-p password, enter MySQL, the initial password is empty, if the previous Yum way to install MySQL without uninstall delete clean, may leave the original database information, root user's password is still original.
select version ();Show MySQL version information

7. Change MySQL initial password
Using commandsmysql_secure_installation,
Press ENTER, "Set root password?" [y/n] ", then press ENTER to build, and then enter the password two times, and then always return to confirm on the
8. Installation directory:
①. Default site root directory:
/var/www/html
②.apache Configuration file directory:
/etc/httpd/conf/httpd.conf
③.apache Log file directory:
/var/log/httpd/
④.php configuration file php.ini directory:
/etc/php.ini
⑤.mysql configuration file my.cnf directory:
/etc/my.cnf
⑥.mysql error log file directory:
/var/log/mysqld.log

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.