lamp環境部署
安裝依賴包
#yum 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 gd gd-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel openssl openssl-devel libtool libtool-devel libtool-ltdl-devel
安裝php所需的支援庫:
#tar -zxf libiconv-1.14.tar.gz //對文字進行編碼轉換的支援庫
#cd libiconv-1.14
#./configure --prefix=/usr/local/
#make && make install
#tar -jxf mhash-0.9.9.9.tar.bz2 //雜湊函式包
#cd mhash-0.9.9.9
#./configure
# make && make instal
#ln -s /usr/local/lib/libmhash.* /usr/lib64/
#tar -zxf libmcrypt-2.5.7.tar.gz //函式加密支援庫
#cd libmcrypt-2.5.7
#./configure
# make && make install
# cd libltdl
# ./configure --enable-ltdl-install
#make && make install
#tar -zxf mcrypt-2.6.8.tar.gz //加密函式包
#cd mcrypt-2.6.8
#./configure //會報錯configure: error: *** libmcrypt was not found
#export ld_library_path=/usr/local/lib: ld_library_path
或則# vim /etc/ld.so.conf
新增/usr/local/lib
#./configure
#make && make install
#tar -zxf apr-1.5.1.tar.gz //apache伺服器的依賴包之一
# ./configure --prefix=/usr/local/
# make && make install
# tar -zxf apr-util-1.5.4.tar.gz
# ./configure --prefix=/usr/local/ --with-apr=/usr/local/
# make && make install
# tar -zxf pcre-8.12.tar.gz //相容正規表示式
# ./configure --prefix=/usr/local/
#make
#make install
安裝mysql
#yum install bison
#tar -zxf cmake-2.8.4.tar.gz
#./configure
#gmake
#make install
#tar -zxf mysql-5.5.14.tar.gz
#cmake ./
#make
#make install
# cp /usr/local/src/mysql-5.5.14/support-files/my-medium.cnf/etc/my.cnf
# cp /usr/local/src/mysql-5.5.14/support-files/mysql.server/etc/init.d/mysqld
# chmod 770 /etc/init.d/mysqld
#chmod +w /usr/local/mysql
# useradd -s /sbin/nologin mysql
#chown -r mysql:mysql /usr/local/mysql
#mkdir -p /data/mysql/data/
#chown -r mysql:mysql /data/mysql/
#vim /etc/my.cnf
加入以下內容
***--enable-ssl 一定要加上
安裝apache
安裝php
# tar -jxvf php-5.4.6.tar.gz2
# make && make install
# cp php.ini-development /usr/local/php/etc/php.ini
檢視是否生成php模組
找到addtype模組處新增
在index.html前新增index.php
更改使用者
www更改主目錄路徑
/data/www/htdocs
更改日誌路徑
測試http://ip/index.php
php測試頁:
# vim index.php
<?php
phpinfo()
docker部署lamp環境
安裝部署mysql root localhost docker run d p 3306 3306 e mysql root password 123456 name m mysql mysql 5.7報錯 安裝部署php root localhost home mkdir p home www h...
Centos開發環境LAMP部署
lamp 是 linux apache mysql 和 php 的縮寫,在生產環境中,lamp是linux伺服器系統必備的伺服器軟體工具。我的作業系統是centos7,下面介紹在centos系統安裝lamp的詳細過程 1.安裝php服務 yum install php php fpm php mys...
mint上部署lamp環境
不得不說現在在linux mint上部署lamp很方便,比windows伺服器上的asp.net的部署公升級都簡單。1 安裝mysql sudo apt get install mysql server mysql client 中間需要輸入root密碼幾次。安裝ok後,使用sudo mysql u...