使用yum安裝gcc-*、zlib-devel、openssl-devel、pcre-devel、ncurses-devel、libxml2-devel、libpng-devel、bzip2-devel、curl-devel、libjpeg-devel、freetype-devel、net-snmp-devel
1.安裝apr-1.4.6.tar.bz2(apache所用的一個依賴包)
./configure --prefix=/usr/local/apr && make && make install && echo $?
2.安裝apr-util-1.5.1.tar.bz2
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
make && make install
3.A.安裝httpd-2.4.3.tar.gz
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-module=so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-cache --enable-file-cache --enable-mem-cache --enable-disk-cache --enable-static-support --enable-static-ab --disable-userdir --with-mpm=prefork --enable-nonportable-atomics --disable-ipv6 --with-sendfile
make && make install && echo $?
B.測試方法:
a.停止系統(tǒng)本來的http服務(wù),rpm -e httpd
b.啟動新裝的apache2,/usr/local/apache2/bin/apachectl -k start
root 8334 0.0 0.4 4468 2200 ? Ss 11:46 0:00 /usr/local/apache2/bin/httpd -k start
daemon 8335 0.0 0.3 4468 1708 ? S 11:46 0:00 /usr/local/apache2/bin/httpd -k start
daemon 8336 0.0 0.3 4468 1708 ? S 11:46 0:00 /usr/local/apache2/bin/httpd -k start
daemon 8337 0.0 0.3 4468 1708 ? S 11:46 0:00 /usr/local/apache2/bin/httpd -k start
daemon 8338 0.0 0.3 4468 1708 ? S 11:46 0:00 /usr/local/apache2/bin/httpd -k start
daemon 8339 0.0 0.3 4468 1708 ? S 11:46 0:00 /usr/local/apache2/bin/httpd -k start
root 8375 0.0 0.1 3916 704 pts/1 R+ 11:46 0:00 grep apache
c.killall httpd
4.安裝cmake包
rpm -ivh ./cmake-2.6.4-7.el5.i386.rpm
5.A.安裝MySQL-5.5.29.tar.gz
B.為mysql建立用戶
groupadd mysql
useradd -g mysql mysql
C.cmake \
> -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
> -DMYSQL_DATADIR=/usr/local/mysql/data/ -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \
> -DWITH_INNODBBASE_STORAGE_ENGINE=1 \
> -DENABLE_LOCAL_INFILE=1 \
> -DEXTRA_CHARSETS=all \
> -DDEFAULT_CHARSET=utf8 \
> -DDEFAULT_COLLATION=utf8_general_ci \
> -DMYSQL_USER=mysql \
> -DWITH_DEBUG=0 \
> -DWITH_EMBEDED_SERVER=0
等同cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data/ -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DWITH_INNODBBASE_STORAGE_ENGINE=1 -DENABLE_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DWITH_DEBUG=0 -DWITH_EMBEDED_SERVER=0
D.make && make install && echo $?
E.配置文件
cp support-files/my-innodb-heavy-4G.cnf /etc/my.cnf
vim /etc/my.cnf
[mysqld]下加入
skip-name-resolve = 1
cp support-files/mysql.server /etc/init.d/mysqlsource
[root@localhost mysql-5.5.29]# chmod 755 /etc/init.d/mysqlsource
[root@localhost mysql-5.5.29]# chown -R mysql.mysql /usr/local/mysql/
F.初始化數(shù)據(jù)庫
sh scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/
G.做鏈接
ln -s /usr/local/mysql/bin/* /usr/bin/
ln -s /usr/local/mysql/lib/* /usr/lib/
ln -s /usr/local/mysql/libexec /usr/local/libexec
6.安裝libiconv-1.14.tar.gz
./configure --prefix=/usr/local/ --with-apr=/usr/local/apr && make && make install && echo $?
7.安裝libmcrypt-2.5.8.tar.gz
./configure && make && make install && ldconfig
cd libltdl/
./configure --enable-ltdl-install && make && make install && echo $?
8.安裝mhash-0.9.9.9.tar.gz
./configure && make && make install && echo $?
做鏈接
ln -s /usr/local/lib/* /usr/lib/
ln -s /usr/local/bin/libmcrypt-config /usr/bin/
9.安裝mcrypt-2.6.8.tar.gz
./configure && make && make install && echo $?
10.A.安裝php-5.4.11.tar.bz2
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-iconv-dir=/usr/local/ --enable-fpm --with-fpm-user=apache --with-fpm-group=apache --with-pcre-regex --with-zlib --with-bz2 --enable-calendar --disable-phar --with-curl --enable-dba --with-libxml-dir --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-mhash --enable-mbstring --with-mcrypt --enable-pcntl --enable-xml --disable-rpath --enable-shmop --enable-sockets --enable-zip --enable-bcmath --with-snmp --disable-ipv6 --disable-rpath --disable-debug --with-apxs2=/usr/local/apache2/bin/apxs
make ZEND_EXTRA_LIBS='-liconv'
make install && echo$?
B.配置文件
[root@localhost php-5.4.11]# cp php.ini-production /usr/local/php/etc/php.ini
[root@localhost php-5.4.11]# vim /usr/local/apache2/conf/httpd.conf
AddType application/x-httpd-php .php(添加)
DirectoryIndex index.php(修改)
[root@localhost php-5.4.11]# cd /usr/local/apache2/htdocs/
[root@localhost htdocs]# rm -rf index.html
[root@localhost htdocs]# vim index.php
<?php
phpinfo();
?>
C.啟動服務(wù)
[root@localhost htdocs]# /usr/local/apache2/bin/httpd
[root@localhost htdocs]# /etc/init.d/mysqlsource start
11.安裝Discuz_7.2_FULL_SC_UTF8.zip
[root@localhost arvon]# unzip Discuz_7.2_FULL_SC_UTF8.zip
[root@localhost arvon]# mv upload/* /usr/local/apache2/htdocs/
mv: overwrite `/usr/local/apache2/htdocs/index.php'?
[root@localhost arvon]# cd /usr/local/apache2/htdocs/
[root@localhost htdocs]# chmod -R 777 *
[root@localhost htdocs]# vim /usr/local/php/etc/php.ini
short_open_tag = On(修改)
[root@localhost htdocs]# rm -rf index.php
[root@localhost htdocs]# cp /home/arvon/upload/index.php ./
[root@localhost htdocs]# pwd
/usr/local/apache2/htdocs
12.使用瀏覽器進(jìn)行設(shè)置
ip/install
創(chuàng)新互聯(lián)是專業(yè)的靈山網(wǎng)站建設(shè)公司,靈山接單;提供成都網(wǎng)站設(shè)計、做網(wǎng)站,網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行靈山網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊,希望更多企業(yè)前來合作!
網(wǎng)頁標(biāo)題:lamp論壇搭建
瀏覽路徑:http://www.rwnh.cn/article42/peohhc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供做網(wǎng)站、移動網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計公司、品牌網(wǎng)站設(shè)計、關(guān)鍵詞優(yōu)化、域名注冊
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)