Linode上安裝APM作業環境

LINODE是VPS

什麼是VPS? (Virtual Private Server),借自網路

虛擬專屬主機 (VPS – Virtual Private Server)是虛擬主機的進階,透過技術將一部伺服器主機分割成多個相互隔離的單位,每個單位(又稱虛擬專屬主機VPS)與一般實體主機的運作方式完全相同,擁有Equal Share 的CPU、記憶體、硬碟空間、IO的資源等,並且擁有作業系統Root最高的管理權限。使用VPS主機,從此您不再需要擔心別的網站過大的流量會影響您網站的運作。

VPS主機適用對象?

中大型網站或論壇
需要自主性高的網站,如需特殊module或application
需要自主性高的網頁設計公司或工作室

LINODE方案1個月$USD20給他刷下去

Linode上安裝Ubuntu非常的簡單
只要幾個按鈕就好了
不用擔心被別的用戶干擾

比較麻煩的是UBUNTU上的PAM環境
其實如果是一般使用,指令也不難,如下
apt-get install perl gcc libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python apache2
apt-get install php5 curl libcurl3 libcurl3-dev php5-curl libapache2-mod-php5 php5-gd mysql-server mysql-client

但是,有問題是php是5.5版,而不是開發環境可以接受的5.2或是5.3版
而且要降版,很麻煩,所以我直接把開好設定完的主機給砍掉

最新版的CentOS 7也已經是php5.5 前一版的CentOS 6.7版,還是php5.3版
準備以CentOS作業系統來安裝。
yum install php php-mbstring php-gd php-mysql gd gd-devel wget unzip
yum install curl libcurl3 libcurl3-dev php-curl libapache2-mod-php php-gd mysql-server mysql-client
yum install perl gcc libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python apache2
service httpd start(這行指令我打錯3次…才想起來在RED HAT上是使用httpd….我笨)
service mysqld start

安裝htop
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -Uhv rpmforge-release*.rf.x86_64.rpm
yum install htop

安裝iftop工具
yum install epel-release
yum install iftop

關閉 SELinux
[root@localhost ~]# vi /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing – SELinux security policy is enforced.
#     permissive – SELinux prints warnings instead of enforcing.
#     disabled – No SELinux policy is loaded.
SELINUX=disabled   //預設enforcing為開啟,disabled為關閉
# SELINUXTYPE= can take one of these two values:
#     targeted – Targeted processes are protected,
#     mls – Multi Level Security protection.
SELINUXTYPE=targeted

調整 iptable規則
#clean Rule
iptables -F
iptables -X
iptables -Z
iptables -t nat -F

這裡的規則,只是把內建的規則清掉
清掉之後,外部才有辦法連線
如果是用PPPOE撥號 需要特別注意
測試完 正式開站前 還是要把規則加好

安裝ntsysv
yum install ntsysv
執行ntsysv
把mysqld / httpd / postfix設定成開機就使用

reboot重開機

純文字界面有多少記憶體?

看到top和htop的記憶體使用值就知道,為什麼追求效能的管理者,只用純文字了。
2015-02-03_CentOs 6.7_top

2015-02-03_CentOs 6.7_htop

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *