centos 6.X/7.x apache 2.2.X/2.4.x php5.4 mysql5.5.38
配置CentOS 6.5第三方yum源(CentOS默认的标准源里没有nginx软件包) CentOS默认yum源软件版本太低了,要安装最新版本的LAMP,这里使用第三方yum源 wget http://www.atomicorp.com/installers/atomic #下载,首先使用默认yum源安装wget命令 yum install wget sh ./atomic #安装 yum clean all #清除当前yum缓存 yum makecache #缓存yum源中的软件包信息 yum repolist #列出yum源中可用的软件包 yum check-update #更新yum软件包 ################################################################################################## centosos 6.X yum install -y httpd mysql mysql-server php php-gd php-mbstring php-mcrypt php-mhash php-mysql php-devel php-mcrypt libmcrypt libmcrypt-devel php-sqlite sqlite sqlite-devel centos 7.X yum install -y httpd php php-gd php-mbstring php-mcrypt php-mhash php-mysql php-devel php-sqlite sqlite sqlite-devel MariaDB: http://www.fomore.net/os/?p=1636
关闭SELINUX 不用重启关闭:[root@localhost ~]# setenforce 0 [root@moyea ~]# yum -y install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt (安装php所需要的组件)
就这么简单 设置MYSQL密码: Centos 6 mysql SET PASSWORD FOR 'root'@'localhost' = PASSWORD('secret_password'); 方法二: mysqladmin -u root flush-privileges password "newpwd" 方法三: mysql> UPDATE mysql.user SET Password=PASSWORD(‘newpwd’) -> WHERE User=’root’; mysql> FLUSH PRIVILEGES; 一般前两种方法就可以设置好 Centos 7 systemctl start mysql.service 设置mariadb 密码 #mysql_secure_installation centos 7.x iptalbes yum remove firewalld yum install iptables-services systemctl enable iptables.service systemctl start iptables.service (责任编辑:IT) |