成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

CentOS下安裝LAMP的方法

運(yùn)維 系統(tǒng)運(yùn)維
LAMP的意思是linux、apache、mysql、php的縮寫,他是當(dāng)前國(guó)際上流行的web框架。本文將要介紹的是如何在CentsOS下安裝LAMP。

CentOS安裝LAMP的方法:

  -------------------編譯前準(zhǔn)備

  安裝編譯器gcc

  最小化安裝,沒(méi)有安裝編譯器

  yum install gcc

  gcc-c++

  如果不安裝,在編譯mysql的時(shí)候會(huì)出現(xiàn)【exec: g++: not found】錯(cuò)誤

  yum install gcc-c++

  --------------------------------ncurses-5.6.tar.gz http://ftp.gnu.org/pub/gnu/ncurses/

  1.   tar zxvf ncurses-5.6.tar.gz  
  2.  
  3.   cd ncurses-5.6  
  4.  
  5.   ./configure --prefix=/usr --with-shared --without-debug  
  6.  
  7.   make  
  8.  
  9.   make install clean  
  10.  

  ------------------mysql-5.0.22.tar.gz http://download.mysql.cn/download_file/gz/5.0/mysql-5.0.22.tar.gz

  1.   tar -zxvf mysql-5.0.22.tar.gz  
  2.  
  3.   cd mysql-5.0.22  
  4.  
  5.   ./configure --with-mysqld-user=mysql --prefix=/usr/local/mysql5 --with-extra-charset=all --without-isam --exec-prefix=/usr/local/mysql5  
  6.  
  7.   make && make install  
  8.  

  初始化數(shù)據(jù)庫(kù):

  1.   groupadd mysql  
  2.  
  3.   useradd -g mysql mysql  
  4.  
  5.   scripts/mysql_install_db  
  6.  
  7.   cp /usr/local/mysql5/share/mysql/my-medium.cnf /usr/local/mysql5/var/my.cnf //手動(dòng)創(chuàng)建/usr/local/mysql5/var目錄  
  8.  
  9.   cp /usr/local/mysql5/share/mysql/mysql.server /etc/init.d/mysqld  
  10.  
  11.   chkconfig --add mysqld  
  12.  
  13.   chkconfig --level 2345 mysqld on  
  14.  
  15.   chown mysql:mysql -R /usr/local/mysql5/  
  16.  
  17.   service mysqld start  
  18.  
  19.   ln -s /usr/local/mysql5/bin/mysql /sbin/mysql  
  20.  
  21.   ln -s /usr/local/mysql5/bin/mysqladmin /sbin/mysqladmin  
  22.  

  設(shè)定mysql密碼

  1.   mysqladmin -uroot password "123456"  
  2.  

  測(cè)試

  1.   netstat -nplt | grep mysql  
  2.  
  3.   ps aux|grep mysql  
  4.  

  ------------------apache

  http://httpd.apache.org/download.cgi

  http://labs.xiaonei.com/apache-mirror/httpd/httpd-2.2.13.tar.gz

  tar zxvf httpd-2.2.13.tar.gz

  cd httpd-2.2.13

  1.   ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite  
  2.  
  3.   make && make install  
  4.  
  5.   /usr/local/apache2/bin/apachectl configtest  
  6.  
  7.   /usr/local/apache2/bin/apachectl start  
  8.  
  9.   /usr/local/apache2/bin/apachectl stop  
  10.  

  修改默認(rèn)啟動(dòng)頁(yè)

  vi /usr/local/apache2/conf/httpd.conf

  DirectoryIndex index.html 改為

  1.   DirectoryIndex index.html index.htm default.htm default.html index.php index.php3 index.jsp  
  2.  
  3.   #ServerName www.example.com:80 改為  
  4.  
  5.   ServerName www.example.com:80  
  6.  

  修改亂碼

  步驟1:

  在httpd.conf中將Include conf/extra/httpd-autoindex這個(gè)模塊的注釋去掉

  @vi /usr/local/apache/conf/httpd.conf

  步驟2:

  在httpd-autoindex.conf中加入IndexOptions Charset=UTF-8

  @vi /usr/local/apache/conf/extra/httpd-autoindex.conf

  ---------------安裝GD

  1:安裝ZLIB2

  ######zlib#############

  tar zxvf zlib-1.2.3.tar.gz

  cd zlib-1.2.3

  1.   ./configure  
  2.  
  3.   make  
  4.  
  5.   make install clean  
  6.  

  2:安裝PNG

  ##########libpng###########

  tar zxvf libpng-1.2.26.tar.gz

  cd libpng-1.2.26

  cp scripts/makefile.linux ./makefile

  1.   ./configure --prefix=/usr/local/libpng  
  2.  
  3.   make  
  4.  
  5.   make install clean  
  6.  

  3:安裝freetype

  ##########freetype#########

  cd freetype-2.3.5

  1.   ./configure  
  2.  
  3.   make  
  4.  
  5.   make install  
  6.  

  4:安裝JPEG6

  #########jpeg###############

  tar zxvf jpegsrc.v6b.tar.gz

  1.   cd jpeg-6b  
  2.  
  3.   mkdir -pv /usr/local/jpeg/{,bin,lib,include,man/man1,man1}  
  4.  
  5.   ./configure --prefix=/usr/local/jpeg --enable-shared --enable- static  
  6.  
  7.   make  
  8.  
  9.   make install  
  10.  

  5:安裝GD

  ########GD###########

  tar zxvf gd-2.0.35.tar.gz

  cd gd-2.0.35

  1.   ./configure --with-png --with-freetype --with-jpeg=/usr/local/jpeg/  
  2.  
  3.   make  
  4.  
  5.   make install  
  6.  

  ------------------php

  http://cn.php.net/distributions/php-5.2.11.tar.gz

  1:安裝LIBXML2

  #####libxml2 #####

  tar zxvf libxml2-2.6.31.tar.gz

  cd libxml2-2.6.31

  1.   ./configure --prefix=/usr/local/libxml2  
  2.  
  3.   make  
  4.  
  5.   make install  
  6.  
  7.   cp xml2-config /usr/bin  
  8.  

  2::安裝PHP5.2.5

  #########php##########

  tar zxvf php-5.2.5.tar.gz

  cd php-5.2.5

  1.   ./configure --prefix=/usr/local/php5 --with-mysql=/usr/local/mysql5 --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/include/freetype2 --with-zlib --with-png-dir=usr/local/libpng12 --with-libxml-dir=/usr/local/libxml2 --with-gd --enable-ftp --enable-sockets  
  2.  
  3.   make  
  4.  
  5.   make test  
  6.  
  7.   make install  
  8.  

  3:配置

  cp php.ini-dict /usr/local/php5/lib/php.ini

  編輯httpd.conf

  /usr/local/apache2/conf/httpd.conf

  加載php模塊,去掉注釋,我的版本是缺省就啟用的。

  1.   LoadModule php5_module modules/libphp5.so  
  2.  

  加上下面兩行

  1.   AddType application/x-httpd-php .php .phtml  
  2.  
  3.   AddType application/x-httpd-php-source .phps  
  4.  

  5.5 安裝zend

  tar -zxvf ZendOptimizer-3.0.0-linux-glibc23- x86_64.tar.gz

  cd ZendOptimizer-3.0.0-linux-glibc23-x86_64

  ./install

  5.6 安裝phpmyadmin

  cp -rf phpMyAdmin-v2.11.5.2 /usr/local/apache2/htdocs/phpmyadmin

  cd /usr/local/apache2/htdocs/phpmyadmin/

  cp config.sample.inc.php config.inc.php

  vi config.inc.php

  $cfg['blowfish_secret'] = ''改為

  $cfg['blowfish_secret'] = 'dd'

  只要不為空就可以了,這樣就可以登陸,如果還有問(wèn)題,就修改一下語(yǔ)言就解決“配置文件現(xiàn)在需要絕密的短語(yǔ)密碼(blowfish_secret)”這個(gè)錯(cuò)誤了。以上就是CentOS下安裝LAMP的方法。本文就介紹到這里啦。

【編輯推薦】

  1. CentOS上安裝LAMP的方法
  2. CentOS下LAMP的安裝
  3. CentOS下的LAMP環(huán)境之基本安全設(shè)置
責(zé)任編輯:zhaolei 來(lái)源: javaeye
相關(guān)推薦

2011-03-10 15:44:18

CentOSLAMP安裝

2011-03-10 15:44:18

CentOSLAMP安裝

2011-03-09 10:52:36

CentOS安裝LAMP

2011-03-09 13:02:15

LinuxLAMP安裝

2011-03-09 16:16:56

CentOSLAMP

2011-03-11 12:57:34

2011-03-09 16:16:54

CentOSLAMP

2011-03-11 12:57:36

UBUNTU10.10安裝LAMP

2011-03-09 13:03:15

Centos搭建LAMP

2011-03-09 10:52:04

ContOSLAMP安裝

2011-03-09 13:46:47

SUSElamp安裝

2011-03-11 17:14:27

2011-03-14 13:07:23

Ubuntu安裝LAMP

2011-03-09 10:25:25

Linux安裝LAMP

2011-03-10 09:31:02

LAMP安裝

2011-03-11 12:57:30

CentosLAMP

2011-03-10 08:59:04

Ubuntu安裝LAMP

2011-09-09 17:23:53

CentOSLAMPmysql

2011-03-11 10:39:09

CentOS 5.5安裝LAMP

2011-03-09 15:32:57

點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)

主站蜘蛛池模板: 97人人干| 狠狠躁躁夜夜躁波多野结依 | 日韩免费高清视频 | 国产精品久久久久久久三级 | 色呦呦在线| 亚洲人成网站777色婷婷 | 免费av观看 | 一区二区免费在线视频 | 成人精品一区 | 久久久久国产精品一区三寸 | 三级黄色片在线观看 | 久久精片 | 影音先锋成人资源 | 伊人久久国产 | www.日韩| 一区二区三区高清不卡 | 亚洲精品一区二区网址 | 欧美成人自拍 | ww 255hh 在线观看 | 黄色在线播放视频 | 在线不卡视频 | 91视频免费黄 | 一区欧美 | 日韩av成人在线观看 | 久久91| 欧美黑人一级爽快片淫片高清 | 91国内精精品久久久久久婷婷 | 黄色毛片免费 | 亚洲成人一区二区 | 在线精品亚洲欧美日韩国产 | 久久久网 | 欧美日韩国产一区二区 | 色欧美片视频在线观看 | 亚洲第一福利网 | 免费激情| 欧美精品中文字幕久久二区 | 国产亚洲一区在线 | 欧洲一区二区视频 | av在线免费网站 | 一本一道久久a久久精品综合蜜臀 | 精品日韩在线 |