CenOS下LAMP搭建過程

來源:互聯網
上載者:User

標籤:

LAMP: Linux+Apache+MySQL+PHP

 

安裝前先關閉防火牆和Selinux

把所有安裝包解壓到/lamp下(根目錄下的lamp目錄)

 

依次安裝如下

 #install.sh

1
cd /lamp/libxml2-2.6.30 2 ./configure --prefix=/usr/local/libxml2/ 3 make 4 make install 5 6 cd /lamp/libmcrypt-2.5.8 7 ./configure --prefix=/usr/local/libmcrypt/ 8 make 9 make install10 11 cd /lamp/libmcrypt-2.5.8/libltdl12 ./configure --enable-ltdl-install13 make14 make install15 16 cd /lamp/zlib-1.2.317 ./configure18 make19 make install 20 21 cd /lamp/libpng-1.2.3122 ./configure --prefix=/usr/local/libpng/23 make24 make install25 26 mkdir /usr/local/jpeg627 mkdir /usr/local/jpeg6/bin28 mkdir /usr/local/jpeg6/lib29 mkdir /usr/local/jpeg6/include30 mkdir -p /usr/local/jpeg6/man/man131 cd /lamp/jpeg-6b32 ./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static33 make34 make install35 36 cd /lamp/freetype-2.3.537 ./configure --prefix=/usr/local/freetype/38 make39 make install40 41 cd /lamp/autoconf-2.6142 ./configure43 make 44 make install45 46 cd /lamp/gd-2.0.3547 ./configure --prefix=/usr/local/gd2/ --with-jpeg=/usr/local/jpeg6/ --with-freetype=/usr/local/freetype/48 make49 make install50 51 cd /lamp/httpd-2.2.952 ./configure --prefix=/usr/local/apache2/ --sysconfdir=/etc/httpd/ --with-included-apr --disable-userdir --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support53 make54 make install55 56 /usr/local/apache2/bin/apachectl start57 echo "/usr/local/apache2/bin/apachectl start" >> /etc/rc.d/rc.sysinit58 59 cd /lamp/ncurses-5.6 60 ./configure --with-shared --without-debug --without-ada --enable-overwrite61 make 62 make install #此步會報錯,下載新版本如5.9,重新編譯安裝63 64 groupadd mysql65 useradd -g mysql mysql66 cd /lamp/mysql-5.0.4167 ./configure --prefix=/usr/local/mysql/ --with-extra-charsets=all68 make69 make install70 71 cp support-files/my-medium.cnf /etc/my.cnf72 /usr/local/mysql/bin/mysql_install_db --user=mysql73 chown -R root /usr/local/mysql74 chown -R mysql /usr/local/mysql/var75 chgrp -R mysql /usr/local/mysql76 77 /usr/local/mysql/bin/mysqld_safe --user=mysql &78 79 cp /lamp/mysql-5.0.41/support-files/mysql.server /etc/rc.d/init.d/mysqld80 chown root.root /etc/rc.d/init.d/mysqld81 chmod 755 /etc/rc.d/init.d/mysqld82 chkconfig --add mysqld83 chkconfig --list mysqld84 chkconfig --levels 245 mysqld off85 86 cd /lamp/php-5.2.687 ./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml2/ --with-jpeg-dir=/usr/local/jpeg6/ --with-freetype-dir=/usr/local/freetype/ --with-gd=/usr/local/gd2/ --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets 88 make89 make install90 91 cp php.ini-dist /usr/local/php/etc/php.ini92 echo "Addtype application/x-httpd-php .php .phtml" >> /etc/httpd/httpd.conf93 /usr/local/apache2/bin/apachectl restart

 

CenOS下LAMP搭建過程

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.