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
  • 相关阅读:
    LightOJ1326 Race(DP)
    LightOJ1125 Divisible Group Sums(DP)
    HDU 5738 Eureka(极角排序)
    BZOJ 3223 Tyvj 1729 文艺平衡树(Splay)
    Codeforces 707D Persistent Bookcase(时间树)
    HDU 5809 Ants(KD树+并查集)
    HDU 5875 Function(ST表+二分)
    BZOJ 2002 [Hnoi2010]Bounce 弹飞绵羊(动态树)
    HDU 5737 Differencia(归并树)
    HDU 1512 Monkey King(左偏树+并查集)
  • 原文地址:https://www.cnblogs.com/sunny-blog/p/4044044.html
Copyright © 2011-2022 走看看