設定固定 IP
$sudo vi /etc/network/interfaces
加上以下內容
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.10.123
netmask 255.255.255.0
gateway 192.168.10.254
dns-nameservers 168.95.1.1
重啟網路設定
$sudo /etc/init.d/networking restart
用中文安裝後會出現亂碼,所以要改回英文語系
$sudo vi /var/lib/locales/supported.d/local
修改or新增放置在第一行
en_US.UTF-8 UTF-8
$sudo vi /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en
** for CentOS
$vi /etc/sysconfig/i18n
LANG="en_US"
安裝 php5 GD 模組
$sudo apt-get install php5-gd
安裝 php5 cURL 模組
$sudo apt-get install php5-curl
安裝 php5 PEAR 模組
$sudo apt-get install php-pear
設定 Apache2 Virtual Host
$sudo vi /etc/apache2/site-available/default
加上以下內容
<VirtualHost *:80>
ServerAdmin webmaster@YOURSITE.com
DocumentRoot /var/www/YOURSITE
ServerName www.YOURSITE.com
<Directory /var/www/YOURSITE>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error-YOURSITE.com.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access-YOURSITE.com.log combined
</VirtualHost>
重啟 Apache
sudo service apache2 restart
$sudo vi /etc/network/interfaces
加上以下內容
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.10.123
netmask 255.255.255.0
gateway 192.168.10.254
dns-nameservers 168.95.1.1
重啟網路設定
$sudo /etc/init.d/networking restart
用中文安裝後會出現亂碼,所以要改回英文語系
$sudo vi /var/lib/locales/supported.d/local
修改or新增放置在第一行
en_US.UTF-8 UTF-8
$sudo vi /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en
** for CentOS
$vi /etc/sysconfig/i18n
LANG="en_US"
安裝 php5 GD 模組
$sudo apt-get install php5-gd
安裝 php5 cURL 模組
$sudo apt-get install php5-curl
安裝 php5 PEAR 模組
$sudo apt-get install php-pear
設定 Apache2 Virtual Host
$sudo vi /etc/apache2/site-available/default
加上以下內容
<VirtualHost *:80>
ServerAdmin webmaster@YOURSITE.com
DocumentRoot /var/www/YOURSITE
ServerName www.YOURSITE.com
<Directory /var/www/YOURSITE>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error-YOURSITE.com.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access-YOURSITE.com.log combined
</VirtualHost>
重啟 Apache
sudo service apache2 restart
沒有留言:
張貼留言