debian php mysql 包_Linux+Varnish+Apache+MySQL+PHP一键包For Ubuntu/Debian
使用方法: 建議各位先update和upgrade: apt-get -y updateapt-get -y upgrade OK后執行: sudo suwget http://lvamp.yzs.me/lvamp0.3.tar.gztar zxvf lvamp.tar.gzcd lvamp0.3 如果是Debian的,請執行: ./db-lvamp.sh Ubuntu的,請執行: ./ub-lvamp.sh
使用方法:
建議各位先update和upgrade:apt-get -y update
apt-get -y upgrade
OK后執行:sudo su
wget http://lvamp.yzs.me/lvamp0.3.tar.gz
tar zxvf lvamp.tar.gz
cd lvamp0.3
如果是Debian的,請執行:./db-lvamp.sh
Ubuntu的,請執行:./ub-lvamp.sh
安裝MySQL時會提示輸入MySQL的root密碼,putty可能會亂碼,不過直接輸入密碼然后按Enter就OK了:
添加虛擬主機:/root/addhost
添加虛擬主機詳細教程:=========================================================================
Add Virtual Host for LVAMP
=========================================================================
Made by Extreme
My Blog:http://yzs.me/
For more information please visit http://yzs.me/1517.html
=========================================================================
Please input domain:example.com #此處輸入你要綁定的域名
===========================
domain=example.com
===========================
Do you want to add more domain name? (y/n) #如果改網站還有其他域名(例如www,bbs),則輸入y,否則輸入n,按回車
y
Type domainname,example(www.yzs.me bbs.yzs.me blog.yzs.me):
www.example.com #此處輸入你要添加的域名
===========================
domain list=www.example.com
===========================
Do you want to use a different user for this website? (y/n) #讓你的站點以不同的用戶身份運行(默認用戶為www-data),能有效防跨站
y
Type username,example:mywebsite
example #這里輸入該網站要使用的用戶的用戶名(用戶不存在時會自動創建,千萬別輸入root)
===========================
your website user is example
===========================
Please input the directory for the domain:test.com : #這里輸入你的網站的根目錄,默認為/var/www/你的域名,可直接按回車使用默認設置
(Default directory: /var/www/test.com):
===========================
Virtual Host Directory=/var/www/test.com
===========================
Please input Administrator Email Address:example@example.com #此處輸入你的網站的管理員郵箱,可直接按回車跳過使用配置設置。
===========================
Server Administrator Email=example@example.com
===========================
Press any key to create your virtul host...
Create Virtul Host directory......
set permissions of Virtual Host directory......
Enabling site test.com.
Run '/etc/init.d/apache2 reload' to activate new configuration!
Restart Apache2......
Restarting web server: apache2 ... waiting .
=========================================================================
Add Virtual Host for LVAMP
=========================================================================
Made by Extreme
My Blog:http://yzs.me/
For more information please visit http://yzs.me/1517.html
=========================================================================
到此,虛擬主機創建完畢
狀態管理工具:/root/lvamp {start|stop|reload|restart|kill
如果要刪除網站:a2dissite 域名
service apache2 restart
如果要卸載LVAMP(先進入LVAMP一鍵包的目錄):./remove.sh
FAQ:
使用某些程序時,例如WordPress,可能會提示輸入FTP信息,如果你沒有設置站點以其他用戶身份運行,則執行:chown -R www-data:www-data +你的網站目錄
如果站點以其他用戶身份運行,則把www-data改成添加虛擬主機時填寫的用戶名,例如我填的是example,則執行:chown -R example:example +你的網站目錄
======================我是邪惡的分割線======================
2013年4月5日更新日志:
1 ) Debian不再需要自行添加Dotdeb源
2 ) 優化安裝過程,提前MySQL安裝,更早提示用戶們輸入密碼
3 ) 添加PHP-GD庫
4 ) 關閉文件列表功能
5 ) 添加服務管理工具(/root/lvamp)使用方法:/root/lvamp {start|stop|reload|restart|kill
star:啟動LVAMP服務
stop:停止LVAMP服務
reload:重新LVAMP配置文件
restart:重新啟動LVAMP服務
kill:強制中止LVAMP服務
5 ) 更改創建網站文件夾默認權限755(rwxr_xr_x)為711(rwx__x__x),更有效對付跨站獲取數據。
6 ) 添加mpm-itk模塊,支持每個站點一個用戶,使用方法:
在執行/root/addhost時,會提示您輸入網站用戶名:Do you want to use a different user for this website? (y/n) y #輸入y則使用該功能,n則不使用
輸入y后:
Type username,example:mywebsite
test
===========================
your website user is test
如圖:
2013年2月6日更新日志:
1 ) 添加mod_headers模塊。可以在.htaccess添加如下代碼定義緩存時間:#max-age以秒做單位
#定義圖片、CSS、JS的緩存時間為七天
Header set Cache-Control "max-age=604800"
#定義HTML、TXT的緩存時間為兩個小時
Header set Cache-Control "max-age=7200"
2013年2月5日更新日志:
1 ) 修復后端無法獲取真實IP地址的BUG
2 ) 增加varnish等待連接后端(backend)的時間、等待從backend傳輸的第一個字符的時間、兩個字元的間隔時間。防止503錯誤。
本文原創發布php中文網,轉載請注明出處,感謝您的尊重!
總結
以上是生活随笔為你收集整理的debian php mysql 包_Linux+Varnish+Apache+MySQL+PHP一键包For Ubuntu/Debian的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 2020年8月6日前,每周三周四转发朋友
- 下一篇: eclipselink mysql_Ec
