CentOS View OS Version
[Email protected] ~]# cat/etc/redhat-release
CentOS Release 6.6 (Final)
Refer to Linux CentOS Yum installation lamp environment
Yum (full name Yellow dog Updater, Modified) is a shell front end package Manager in Fedora and Redhat and CentOS.
Based on RPM package management, the ability to automatically download RPM packages from specified servers and install them automatically handles dependency relationships and installs all dependent packages at once, without the hassle of downloading and installing them over and over again.
1. Update Yum
[[email protected] ~]# yum-y update
2. Install apache,mysql,php with Yum
Install Apache:
[email protected] ~]# Yum install httpd httpd-devel
When the installation is complete, start Apache
[[email protected] ~]#/etc/init.d/httpd start
Starting Httpd:httpd:apr_sockaddr_info_get () failed for oa.aioute.com
Httpd:could not reliably determine the server ' s fully qualified domain name, using 127.0.0.1 for ServerName
[OK]
Set to boot
[Email protected] ~]# chkconfig httpd on
Install MySQL:
[email protected] ~]# yum install MySQL mysql-server mysql-devel
Start MySQL
[[email protected] ~]#/etc/init.d/mysqld start
Reference: [CentOS 0010] centos config mysql allow telnet
Open MySQL remote connection under CentOS, remote Management database
Set the MySQL password and turn on remote permissions:
Mysql> GRANT All privileges on * * to ' root ' @ '% ' identified by ' YourPassword ' with GRANT OPTION;
Query OK, 0 rows Affected (0.00 sec)
mysql> FLUSH privileges;
Query OK, 0 rows Affected (0.00 sec)
Mysql> EXIT
Allow Port 3306:
[Email protected] ~]# iptables-i input-p tcp-m State--state new-m TCP--dport 3306-j ACCEPT
[Email protected] ~]# iptables-l-N
Install PHP:
Yum Install PHP Php-devel
Restart Apache to make PHP effective:
/ETC/INIT.D/HTTPD restart
[email protected] ~]# yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
To restart PHP:
[Email protected] ~]#/etc/init.d/httpd restart
Starting httpd:
3. Allow port access
[Email protected] ~]# iptables-i input-p tcp-m State--state new-m TCP--dport 80-j ACCEPT
[Email protected] ~]# iptables-l-N
Refer to the use of CentOS under the VI usage Daquan
Refer to CentOS configuration Vsftp server
CentOS 6.6 Yum Build lamp environment