zoukankan      html  css  js  c++  java
  • 服务器篇之 yum安装LAMP环境

    【1】、准备环境:

    yum添加163源:

    使用yum程序安装所需开发包:

    [root@nosay yum.repos.d]# 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

    【2】、安装LAMP:

    MySQL:

    [root@nosay ~]# yum install mysql mysql-server
    
    [root@nosay ~]# chkconfig --levels 235 mysqld on
    [root@nosay ~]# service mysqld start
    
    [root@nosay ~]# mysqladmin -u root password liukun
    
    [root@nosay ~]# mysql -uroot -p
    Enter password: 
    
    mysql> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | mysql              |
    | test               |
    +--------------------+
    3 rows in set (0.00 sec)
    
    mysql> 

    Apache:

    [root@nosay ~]# yum install httpd
    
    [root@nosay ~]# chkconfig --levels 235 httpd on
    [root@nosay ~]# service httpd start
    
    [root@nosay ~]# vim /etc/httpd/conf/httpd.conf
    #ServerName 127.0.0.1:80
    
    [root@nosay ~]# service httpd restart

    PHP:

    [root@nosay ~]# yum install php
    
    [root@nosay ~]# yum search php
    [root@nosay ~]# yum -y install php-mysql php-gd php-lmap php-ldap php-odbc php-pear php-xml php-xmlrpc php-bcmath php-mbstring
    
    [root@nosay ~]# vim /var/www/html/phpinfo.php
    [root@nosay ~]# service httpd restart

     phpMyAdmin:

    下载地址:http://www.phpmyadmin.net/home_page/downloads.php

    版本:phpMyAdmin-4.0.10.5-all-languages.tar.gz

    FTP上传至:/var/www/html

    [root@nosay html]# tar xvfz phpMyAdmin-4.0.10.5-all-languages.tar.gz 
    
    [root@nosay html]# mv phpMyAdmin-4.0.10.5-all-languages phpMyAdmin
    [root@nosay html]# cd phpMyAdmin
    
    [root@nosay html]# cp config.sample.inc.php config.inc.php
    
    [root@nosay html]# service httpd restart
  • 相关阅读:
    C++类构造函数初始化列表(转)
    Linux可重入函数和线程安全的区别与联系(转)
    Splinter自动登录
    VBA添加下拉菜单
    批处理自动备份并生成日志文件
    VBA 格式化excel数据表 (数据分列)
    Python 调用outlook发送邮件(转 )
    Node.js 文件操作
    Node.js express模块 http服务
    将ejs模板文件的后缀换成html
  • 原文地址:https://www.cnblogs.com/sunny-blog/p/4044044.html
Copyright © 2011-2022 走看看