centos6安装lamp环境

linux开发环境依赖安装:

yum install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel  zlib-


devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-


devel openssl-devel libxml2-devel gettext-devel  pcre-devel mysql-devel net-


snmp-devel curl-devel perl-DBI


-----------


yum install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel  zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel gettext-devel  pcre-devel mysql-devel net-snmp-devel curl-devel perl-DBI

安装mysql:

yum -y install mysql mysql-server 


自启动

chkconfig --level 235 mysqld on


启动mysql

/etc/init.d/mysqld start


配置密码:

mysqladmin -u root password xxxx


设置远程登录

grant all privileges on *.* to 'root'@'%' identified by 'xxxx' with grant option;

flush privileges;

quit;


apache:

yum -y install httpd


自启动

chkconfig --level 235 httpd on


启动apache

/etc/init.d/httpd start


apache配置文件

/etc/httpd/conf/httpd.conf



安装php

yum -y install php


php扩展:

yum -y install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-


xmlrpc  php-bcmath php-mbstring


安装nginx

yum install nginx


重启nginx命令:
        service nginx restart;
        nginx -s reload;


ln -s /usr/share/nginx/html /nginxwww

ln -s /var/www/html  /apachewww


你可能感兴趣的:(mysql,linux,开发,start,password)