自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

LAMP源碼安裝方法

運維 系統(tǒng)運維
LAMP源碼安裝方法:LAMP即Linux-Apache-MySQL-PHP,LAMP網(wǎng)站架構(gòu)是目前國際流行的Web框架。包括:Linux操作系統(tǒng),Apache網(wǎng)絡(luò)服務(wù)器,MySQL數(shù)據(jù)庫,Perl、PHP或者Python編程語言,所有組成產(chǎn)品均是開源軟件,是國際上成熟的架構(gòu)框架。本文講述的是LAMP源碼安裝方法

  lamp源碼安裝方法

  先安裝centos系統(tǒng),然后更新:

  1.   yum -y install apr-devel apr-util check-devel cairo-devel pango-devel libxml2-devel rpmbuild glib2-devel dbus-devel freetype-devel fontconfig-devel gcc-c++ expat-devel python-devel libXrender-devel  
  2.  

  mysql 源碼包安裝

  1.useradd mysql

  2.passwd mysql(增加密碼,可以不用)

  3.進入mysql源碼包解壓目錄

  cacti安裝時的方法:

  1.   ./configure --prefix=/usr/local/mysql --enable-local-infile --with-charset=gbk --with-extra-charsets=all --with-low-memory --with-mysqld-user=mysql --enable-thread-safe-client  
  2.  

  4.make

  5.make install

  1.   cp support-files/my-medium.cnf /etc/my.cnf  
  2.  

  6.cd /opt/mysql5

  7.chown -R mysql:mysql .

  8.bin/mysql_install_db --user=mysql

  9.chown -R root .

  chown -R mysql var

  10.bin/mysqld_safe --user=mysql &(啟動mysql)

  11、ln -s /usr/local/mysql/bin/* /usr/local/bin(可以直接運行mysql里面的命令了,不用在打目錄)

  自啟動的配置方法

  1.   cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld  
  2.  
  3.   chmod +x /etc/rc.d/init.d/mysqld  
  4.  
  5.   chkconfig --add mysqld  
  6.  
  7.   service mysqld start  
  8.  

  11.bin/mysqladmin shutdown(關(guān)閉mysql)

  service mysqld stop

  apache與php安裝

  1.進入httpd的解壓目錄

  ./configure --enable-so --prefix=/opt/www(普通安裝)

  cacti安裝方法:

  1.   ./configure --prefix=/usr/local/www --enable-so --enable-rewrite --enable-ssl --with-ssl=/usr/local/openssl --with-zlib --enable-mods-shared=all --enable-track-vars --with-mysql=/usr/local/mysql --with-included-apr  
  2.  
  3.   make  
  4.  
  5.   make install  
  6.  
  7.   /opt/www/bin/apachectl start|stop  
  8.  
  9.   ln -s /opt/www/bin/apachectl /usr/local/bin/apachectl  
  10.  
  11.   cp /opt/www/bin/apachectl /etc/rc.d/init.d/httpd  
  12.  
  13.   chkconfig --add httpd  
  14.  
  15.   chkconfig --list httpd  
  16.  
  17.   service httpd start  
  18.  

  apache安裝好了

  2.安裝php,進入php解壓目錄

  1.   ./configure --with-apxs2=/opt/www/bin/apxs --with-mysql=/opt/mysql5 --enable-sockets  
  2.  

  說明:

  1.   ./configure --with-apxs2=/opt/www/bin/apxs(安裝好的apache里面的apxs目錄) --with-  
  2.  
  3.   mysql=/opt/mysql5(mysql的安裝目錄) --enable-sockets(cacti必須要帶的參數(shù))  
  4.  
  5.   ./configure --prefix=/usr/local/php --with-config-file-path=/etc -with-apxs2=/usr/local/www/bin/apxs --enable-fastcgi --enable-safe-mode --with-zlib --with-bz2 --with-freetype-dir --enable-mbstring -with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-gd --with-libxml-dir --with-png-dir --with-jpeg-dir --enable-sockets  
  6.  

  (出現(xiàn)要安裝的lib庫,用yum安裝一下,包括庫的-devel庫)

  1.   make  
  2.  
  3.   make install  
  4.  
  5.   cp php.ini-dist /etc/php.ini  
  6.  

  (配置目錄在./configure里面說明了是/etc)

  在httpd.conf里面修改:

  找到下面字段:

  DirectoryIndex

  在index.html前面添加index.php

  增加:

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

  3.啟動apache

  1.   /opt/www/bin/apachectl start  
  2.  

  mysql下載

  php下載

  apache下載

  ========================================

  錯誤解決:

  安裝apache時類似于以下信息:

  “exports.c:1653: error: redefinition of 'ap_hack_apr_version_string'

  exports.c:1022: error: previous definition of 'ap_hack_apr_version_string' was here

  make[2]: *** [exports.lo] Error 1

  make[2]: Leaving directory `/usr/local/src/httpd-2.2.*/server'

  make[1]: *** [all-recursive] Error 1

  make[1]: Leaving directory `/usr/local/src/httpd-2.2.*/server'

  make: *** [all-recursive] Error 1”

  有些人說路徑不對,有些說perl包不對,有的說zlib不對。

  反正有病亂投醫(yī)。

  翻了好久的網(wǎng)頁才搞定。

  解決辦法:

  在configure后加上 “--with-included-apr”。

【編輯推薦】

  1. Ubuntu下LAMP的搭建
  2. Centos下搭建LAMP
  3. Linux下LAMP的安裝方法
責任編輯:zhaolei 來源: javaeye
相關(guān)推薦

2011-03-09 13:02:15

LinuxLAMP安裝

2011-03-09 10:52:36

CentOS安裝LAMP

2011-03-09 15:32:57

2011-03-11 09:54:48

CentOSLAMP安裝

2011-03-11 12:57:36

UBUNTU10.10安裝LAMP

2011-03-08 11:22:32

LAMP安裝

2011-03-31 13:40:33

安裝LAMP

2011-03-11 13:58:54

2011-03-11 17:14:27

2011-03-29 14:44:24

LAMP安裝

2011-03-31 15:06:12

lampcacti

2011-03-09 09:30:45

Linux安裝LAMP

2011-03-14 13:07:23

Ubuntu安裝LAMP

2011-03-23 10:30:01

LAMPApache源碼

2011-03-09 10:52:04

ContOSLAMP安裝

2011-03-10 15:47:45

2011-03-21 10:49:33

LAMPApache

2011-03-21 11:16:51

LAMPPHP

2011-03-09 13:46:47

SUSElamp安裝

2011-03-11 14:02:52

PHPmyadmin安裝
點贊
收藏

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