CentOS7.3安装LAMP(Centos7.3+Apache2.4.6+mysql5.6.38+php5.4.16)
---------------------------------------------------------------------
[root@localhost ~]# httpd -v
[root@localhost ~]# yum list | grep httpd
[root@localhost ~]# yum -y install httpd httpd-manual httpd-devel mod_ssl mod_perl mod_auth_mysql
[root@localhost ~]# systemctl enable httpd.service
[root@localhost ~]# systemctl start httpd.service
[root@localhost ~]# systemctl restart httpd.service
[root@localhost ~]# systemctl status httpd.service
[root@localhost ~]# curl http://127.0.0.1
[root@localhost ~]# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
----------------------------------------------------------------------
[root@localhost ~]# yum list installed | grep mysql
[root@localhost ~]# yum list | grep mysql
下载MySql安装包,确认yum源的链接是不是有效的
[root@localhost ~]# rpm -ivh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
[root@localhost ~]# yum install -y mysql-community-server
[root@localhost ~]# yum -y install mysql-server mysql mysql-devel
[root@localhost ~]# systemctl enable mysqld.service
[root@localhost ~]# systemctl start mysqld.service
[root@localhost ~]# systemctl restart mysqld.service
[root@localhost ~]# systemctl status mysqld.service
[root@localhost ~]# mysql -uroot -p
mysql>SET PASSWORD = PASSWORD('Abc123!_');
开启远程登录,授权root远程登录,开放3306端口
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Abc123!_' WITH GRANT OPTION;
[root@localhost ~]# cp /etc/my.cnf /etc/my.cnf.bak
----------------------------------------------------------------------
[root@localhost ~]# php -v
[root@localhost ~]# yum list | grep php
[root@localhost ~]# yum -y install php php-odbc php-mysql php-devel php-xml php-gd php-imap php-ldap php-xmlrpc php-common php-process php-bcmath php-cli php-fpm php-pear php-pdo php-pecl-xhprof php-pecl-xdebug php-phpunit-PHPUnit php-mbstring php-mcrypt php-pecl-apcu php-opcache
----------------------------------------------------------------------
[root@localhost ~]# vsftpd -v
[root@localhost ~]# yum list | grep vsftpd
[root@localhost ~]# yum -y install vsftpd
[root@localhost ~]# systemctl enable vsftpd.service
[root@localhost ~]# systemctl start vsftpd.service
[root@localhost ~]# systemctl restart vsftpd.service
[root@localhost ~]# systemctl status vsftpd.service
[root@localhost ~]# cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.bak
----------------------------------------------------------------------
[root@localhost ~]# yum -y upgrade
[root@localhost ~]# reboot
----------------------------------------------------------------------
升级所有包,改变软件设置和系统设置,系统版本内核都升级
升级所有包,不改变软件设置和系统设置,系统版本升级,内核不改变