Home Backend Development PHP Tutorial CentOS 6.2 uses yum to install LAMP and phpMyadmin in detail_PHP tutorial

CentOS 6.2 uses yum to install LAMP and phpMyadmin in detail_PHP tutorial

Jul 21, 2016 pm 03:06 PM
centos lamp phpmyadmin yum introduce use Install Detailed explanation

Introducing how to use YUM configuration to install the LAMP environment under CentOs6.2. Some brothers also like to use the compiled installation method. I personally think that if you are not customizing the server, using yum to install is stable and simple, why bother to download&make&make install.

Step1. Configure rpmforge and epel sources for centos. The official source of centos is actually sufficient, but some extensions of php such as php-mcrypt are not available in the official source.
The rpmforge source can be downloaded and installed at http://pkgs.repoforge.org/rpmforge-release/, named rpmforge- release-*.i686.rpm or rpmforge-release-*.x86_64.rpm, Find the latest version
The epel source can be found at http://mirrors.ustc.edu.cn/Fedora/epel/6/. The 32-bit system is in the i386 folder, and the 64-bit version is in the x86_64 folder. For epel-release-6-*.noarch.rpm, find the latest version

Here is a 32-bit system as an example,
#If it prompts The requested URL returned error: 404 , please change to the latest version
rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
rpm - ivh http://download.Fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm

Step 2. Install php/mysql/httpd
#Install apache
yum -y install httpd httpd-devel
#Install mysql
yum -y install mysql mysql-devel mysql-server mysql-libs
#Install php
yum -y install php
#Install php extension
yum -y install php-mysql php-gd php-imap php-ldap php-odbc php-mbstring php-devel php-soap php-cli php-pdo
yum -y install php-mcrypt php-tidy php-xml php-xmlrpc php-pear
#Other uncommon php extensions, www.linuxidc.com do not need to be installed
yum -y install php-pecl-memcache php- eaccelerator
#Install phpmyadmin
yum -y install phpmyadmin
#After the installation is completed, start
service httpd start
service mysqld start

Step 3. Configure httpd and mysqld to start automatically at boot
chkconfig mysqld on
chkconfig httpd on

Step 4. Configure phpmyadmin
Modify/usr/share/phpmyadmin/config.inc.php
#Modify the abcde text here to your own characters, you can arbitrarily
$cfg['blowfish_secret'] = 'abcde';

FAQ
1. phpmyadmin prompts that php-mcrypt is not enabled. This is because the php-mrcrpt extension is not installed. There is no php-mrcrpt extension in the official source, please install the epel source and then yum install php-mcrypt

2. phpmyadmin cannot access

phpmyadmin can only use http://localhost/phpmyadmin by default To access, you can modify the corresponding part in /etc/httpd/conf.d/phpmyadmin.conf to

Order Deny,Allow
# Deny from all
Allow from All

However, this is strongly not supported and exposes phpmyadmin to unsafe

Note:
apache parses php, modifies the httpd.conf file, and adds
Addtype application/x-httpd-php .php .phtml
Addtype application/x-httpd-php-source .phps

myql can log in remotely
Set mysql password
mysql>; USE mysql;
mysql>; UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';
mysql>; FLUSH PRIVILEGES;
1.2.3 Allow remote login
mysql -u root -p
Enter Password:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'Username'@'%' IDENTIFIED BY 'Password' WITH GRANT OPTION;
After completion, you can use mysql-front to remotely manage mysql.
Set to start at boot
chkconfig mysqld on

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327593.htmlTechArticleIntroduces how to use YUM configuration to install the LAMP environment under CentOs6.2. Some brothers also like to use the compiled installation method. , I personally think that if you are not customizing the server, use yum to install it for stability...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Where does the wordpress database exist? Where does the wordpress database exist? Apr 15, 2024 pm 10:39 PM

The WordPress database is housed in a MySQL database that stores all website data and can be accessed through your hosting provider’s dashboard, FTP, or phpMyAdmin. The database name is related to the website URL or username, and access requires the use of database credentials, including name, username, password, and hostname, which are typically stored in the "wp-config.php" file.

How to input Chinese in centos How to input Chinese in centos Apr 07, 2024 pm 08:21 PM

Methods for using Chinese input in CentOS include: using the fcitx input method: install and enable fcitx, set shortcut keys, press the shortcut keys to switch input methods, and input pinyin to generate candidate words. Use iBus input method: Install and enable iBus, set shortcut keys, press the shortcut keys to switch input methods, and input pinyin to generate candidate words.

How to read USB disk files in centos7 How to read USB disk files in centos7 Apr 07, 2024 pm 08:18 PM

To read U disk files in CentOS 7, you need to first connect the U disk and confirm its device name. Then, use the following steps to read the file: Mount the USB flash drive: mount /dev/sdb1 /media/sdb1 (replace "/dev/sdb1" with the actual device name) Browse the USB flash drive file: ls /media/sdb1; cd /media /sdb1/directory; cat file name

SCP usage tips-recursively exclude files SCP usage tips-recursively exclude files Apr 22, 2024 am 09:04 AM

One can use the scp command to securely copy files between network hosts. It uses ssh for data transfer and authentication. Typical syntax is: scpfile1user@host:/path/to/dest/scp -r/path/to/source/user@host:/path/to/dest/scp exclude files I don't think you can when using scp command Filter or exclude files. However, there is a good workaround to exclude the file and copy it securely using ssh. This page explains how to filter or exclude files when copying directories recursively using scp. How to use rsync command to exclude files The syntax is: rsyncav-essh-

What should I do if navicat cannot connect? What should I do if navicat cannot connect? Apr 23, 2024 am 10:00 AM

When Navicat cannot connect, you can try the following solutions in order: Check whether the connection information is correct, such as database name, host name, port number, user name and password. Make sure the database is up and running. Check the firewall rules to confirm that Navicat and related services are not blocked. Try using the ping command to test your network connection. Update Navicat client software to the latest version. Check the server logs for error messages related to failed connections. Try connecting using other database tools to troubleshoot Navicat-specific issues.

BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange? BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange? Apr 26, 2024 am 09:40 AM

MetaMask (also called Little Fox Wallet in Chinese) is a free and well-received encryption wallet software. Currently, BTCC supports binding to the MetaMask wallet. After binding, you can use the MetaMask wallet to quickly log in, store value, buy coins, etc., and you can also get 20 USDT trial bonus for the first time binding. In the BTCCMetaMask wallet tutorial, we will introduce in detail how to register and use MetaMask, and how to bind and use the Little Fox wallet in BTCC. What is MetaMask wallet? With over 30 million users, MetaMask Little Fox Wallet is one of the most popular cryptocurrency wallets today. It is free to use and can be installed on the network as an extension

How to change the default password of Empire CMS How to change the default password of Empire CMS Apr 16, 2024 pm 03:21 PM

Reset the Empire CMS default password through the following steps: Log in to the database and find the user table. Edit the administrator user (username is admin). Modify the value in the password field. Save the changes and use the new password to log in to the management backend.

How to check if navicat forgets root password How to check if navicat forgets root password Apr 24, 2024 am 12:06 AM

Answer: You can view and recover a forgotten Navicat root password by modifying the MySQL configuration file. Stop the Navicat MySQL service. Modify the MySQL configuration file, remove the "#" symbol before the password line and enter the root password. Save and restart the MySQL service.

See all articles