(一)安裝apache
2、啟動服務,檢查
3、配置基於網域名稱的虛擬主機
vim httpd.conf 修改98行
servername 127.0.0.1:80
修改132
修改396
建立站點目錄及測試檔案
4、配置客戶端host解析到如下網域名稱商,檢查
curl www.etiantian.orgapache基於網域名稱的虛擬主機配置成功。curl bbs.etiantian.org
curl blog.etiantian.org
*********************************************=
(二)搭建php,本地不裝mysql
1、安裝依賴包並檢查
wget -o /etc/yum.repos.d/epel.repo2、安裝php(無需安裝mysql)yum install zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel libxslt-devel libmcrypt-devel mhash mhash-devel mcrypt openssl-devel -y
rpm -qa zlib-devel libxml2-devel libjpeg-turbo-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libmcrypt-devel mhash mhash-devel mcrypt openssl-devel
mkdir -p /home/oldboy/tools
cd /home/oldboy/tools
wget
tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make
make install
cd ..
cd /home/oldboy/tools建立使用者:tar xf php-5.5.26.tar.gz
cd php-5.5.26
./configure \
--with-mysql=mysqlnd \
--with-iconv-dir=/usr/local/libiconv \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib \
--with-libxml-dir=/usr \
--enable-xml \
--disable-rpath \
--enable-safe-mode \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--enable-mbregex \
--enable-mbstring \
--with-mcrypt \
--with-gd \
--enable-gd-native-ttf \
--with-openssl \
--with-mhash \
--enable-pcntl \
--enable-sockets \
--with-xmlrpc \
--enable-zip \
--enable-soap \
--enable-short-tags \
--enable-zend-multibyte \
--enable-static \
--with-xsl \
--enable-ftp
make
make install
檢查結果:
總用量 30568
-rw-r--r-- 1 root root 9194 11月 10 20:37 httpd.exp
-rwxr-xr-x 1 root root 31285631 11月 10 23:51 libphp5.so
loadmodule php5_module modules/libphp5.so
3、配置httpd.conf
311行下增加:
168行下增加:
directoryindex index.php index.html
67行下增加
user www
group www
useradd -u 513 -s /sbin/nologin www檢查mysql:id www
檢查php:
<?php
phpinfo();
?>
<?phplamp搭建完成。$link_id=mysql_connect('db01.etiantian.org','wordpress','123456') or mysql_error();
if($link_id)
else
?>
搭建部落格產品略,見圖:
LAMP一體環境快速安裝
一 安裝apache 2 啟動服務,檢查 3 配置基於網域名稱的虛擬主機 vim httpd.conf 修改98行 servername 127.0.0.1 80 修改132 修改396 建立站點目錄及測試檔案 4 配置客戶端host解析到如下網域名稱商,檢查 curl www.etiantian....
LAMP快速安裝
1.版本介紹 apache安裝 安裝mysql 5.5.48 安裝依賴 yum install ncurses devel libaio devel y cd server tools wget tar zxf cmake 2.8.8.tar.gz cd cmake 2.8.8 configure ...
LAMP環境快速搭建
1.安裝httpd httpd 安裝httpd root localhost httpd chkconfig httpd on 開機啟動 root localhost httpd service httpd start 啟動服務 root localhost httpd elinks source ...