lamp安裝步驟 編譯

2021-09-22 22:19:10 字數 2275 閱讀 5502

1,停止防火牆及不必要的服務

/etc/init.d/rpcbind stop

/etc/init.d/cups stop

/etc/init.d/postfix stop

/etc/init.d/qpidd stop

/etc/init.d/nfslock stop

chkconfig rpcbind off

chkconfig cups off

chkconfig postfix off

chkconfig qpidd off

chkconfig nfslock off

chkconfig iptables off

2,臨時停止selinux

[root@bogon ~]# setenforce 0 

disabled

檢視狀態

[root@bogon ~]# getenforce 

disabled

也可以修改 /etc/selinux/config,將selinux=disabled,重新啟動系統即可。

3,更新系統軟體源

rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

4,安裝依賴的軟體包

yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers

5,編譯apache

設定自啟動

vi /etc/init.d/httpd,在第二行新增下面的內容

修改 httpd.conf,新增:

7,編譯php

注意修改httpd,mysql的安裝路徑,安裝完畢後,新增info.php檔案進行測試

./configure \

--prefix=/usr/local/webserver/php \

--with-apxs2=/usr/local/webserver/apache2/bin/apxs \

--with-config-file-path=/usr/local/webserver/php/etc \

--with-mysql=/usr/local/webserver/mysql \

--with-mysqli=/usr/local/webserver/mysql/bin/mysql_config \

--with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath \

--enable-mbstring  --with-gd --enable-gd-native-ttf  --enable-pcntl --enable-sockets  --with-xmlrpc --enable-zip --enable-soap

make

make install

cp php.ini-dist /usr/local/webserver/php/etc/php.ini

編譯安裝lamp

1,停止防火牆及不必要的服務 etc init.d rpcbind stop etc init.d cups stop etc init.d postfix stop etc init.d qpidd stop etc init.d nfslock stop chkconfig rpcbind of...

LAMP編譯安裝

1 準備安裝環境 yum install y gcc pcre devel openssl devel expat devel 2 解壓縮 3 以 with included apr方式安裝httpd 4 切換目錄 至此httpd編譯安裝完成,後續的善後工作處理 7 建立apache系統使用者,供h...

LAMP編譯安裝

lnmp環境 mysql至5.x之後編譯安裝需要使用cmake工具了,所以需要先安裝cmake cmake 3.3.1安裝 原始碼目錄 cd opt modules cmake 3.3.1 configure make make install mysql安裝 groupadd mysql user...