[Azure]如何在VM上安裝LAMP

有關於電腦系統設定, 備份, 監控, 網路等機制討論
頭像
tim
文章: 1380
註冊時間: 2008年 11月 26日, 00:49

[Azure]如何在VM上安裝LAMP

文章 tim »

參考文章: http://lovesoo.org/centos-6-3-yum-insta ... l-php.html

此環境為 CentOS 6.3 (也是 Windows Azure 上的 CentOS 版本)

安裝 mysql:

代碼: 選擇全部

yum -y install mysql mysql-server
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
/usr/bin/mysqladmin -u root -password 'new_password'
安裝 apache:

代碼: 選擇全部

yum –y install httpd
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
安裝 php:

代碼: 選擇全部

yum –y install php
yum –y install php-mysql php-common php-mbstring php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
/etc/init.d/httpd restart
安裝 phpmyadmin:
到這裡找最新版本: http://www.phpmyadmin.net/home_page/downloads.php
複製連結後, 用 wget 下載, 並解壓縮

代碼: 選擇全部

wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.5.8.1/phpMyAdmin-3.5.8.1-all-languages.tar.bz2
tar -xvf phpMyAdmin-3.5.8.1-all-languages.tar.bz2
多多留言, 整理文章, 把經驗累積下來.....
頭像
tim
文章: 1380
註冊時間: 2008年 11月 26日, 00:49

Re: [Azure]如何在VM上安裝LAMP

文章 tim »

安裝 php-soap: http://stackoverflow.com/questions/1101 ... oap-on-php

代碼: 選擇全部

yum install php-soap
多多留言, 整理文章, 把經驗累積下來.....
頭像
tim
文章: 1380
註冊時間: 2008年 11月 26日, 00:49

Re: [Azure]如何在VM上安裝LAMP

文章 tim »

如何繼續安裝 ssh2 套件:

代碼: 選擇全部

yum install gcc php-devel php-pear libssh2 libssh2-devel
pecl install -f ssh2
touch /etc/php.d/ssh2.ini
echo extension=ssh2.so > /etc/php.d/ssh2.ini
/etc/init.d/httpd restart
php -m | grep ssh2
其中安裝 gcc 時, 若有 Requires: kernel-headers 參考這篇:
http://stackoverflow.com/questions/6513 ... el-headers

主要是 yum install 時, 會做 kernel 檢查. 可以 by pass 這個部分.

參考資料:
http://www.beingexperts.com/archives/in ... tos-6.html
http://blog.dynamichosting.biz/2011/01/ ... -centos-5/
多多留言, 整理文章, 把經驗累積下來.....
頭像
tim
文章: 1380
註冊時間: 2008年 11月 26日, 00:49

Re: [Azure]如何在VM上安裝LAMP

文章 tim »

多多留言, 整理文章, 把經驗累積下來.....
頭像
tim
文章: 1380
註冊時間: 2008年 11月 26日, 00:49

Re: [Azure]如何在VM上安裝LAMP

文章 tim »

重新起動 mariadb:

systemctl restart mariadb.service

起動與關閉 mariadb:

systemctl start mariadb.service
systemctl stop mariadb.service

起動 mariadb 服務:

systemctl enable mariadb.service
多多留言, 整理文章, 把經驗累積下來.....
頭像
tim
文章: 1380
註冊時間: 2008年 11月 26日, 00:49

Re: [Azure]如何在VM上安裝LAMP

文章 tim »

於 centos 上使用 iptables 服務與設定
http://wiki.centos.org/zh-tw/HowTos/Network/IPTables
多多留言, 整理文章, 把經驗累積下來.....
頭像
tim
文章: 1380
註冊時間: 2008年 11月 26日, 00:49

Re: [Azure]如何在VM上安裝LAMP

文章 tim »

多多留言, 整理文章, 把經驗累積下來.....
頭像
tim
文章: 1380
註冊時間: 2008年 11月 26日, 00:49

Re: [Azure]如何在VM上安裝LAMP

文章 tim »

最後由 tim 於 2016年 5月 26日, 17:57 編輯,總共編輯了 1 次。
多多留言, 整理文章, 把經驗累積下來.....
頭像
tim
文章: 1380
註冊時間: 2008年 11月 26日, 00:49

Re: [Azure]如何在VM上安裝LAMP

文章 tim »

CentOS mariadb 忘記密碼操作方式

https://www.liberiangeek.net/2014/10/re ... -centos-7/
多多留言, 整理文章, 把經驗累積下來.....
頭像
tim
文章: 1380
註冊時間: 2008年 11月 26日, 00:49

Re: [Azure]如何在VM上安裝LAMP

文章 tim »

CentOS 上安裝 php7 的版本與對應的 php7 的模組.

https://webtatic.com/packages/php70/
多多留言, 整理文章, 把經驗累積下來.....
回覆文章