Debian架站
1.修改/etc/network/interfaces
# The primary network interface
auto eth0
# DHCP指派
# iface eth0 inet dhcp
# 固定IP改法
iface eth0 inet static
address 192.168.0.168
netmask 255.255.255.0
gateway 192.168.0.1
2.安裝SSH SERVER
apt-get install openssh-server
2.安裝LAMP
apt-get install apache2 mysql-server mysql-client php4 phpmyadmin libapache2-mod-php4 php4-gd
3.phpmyadmin
3.1 限制phpmyadmin對外連線
/etc/apache2/conf.d/phpmyadmin.conf
order deny,allow
deny from all
allow from 127.7.7.1 192.168.0.0/24
AllowOverride All
order deny,allow
deny from all
allow from 127.7.7.1 192.168.0.0/24
AllowOverride All
3.2 登入修改密碼
4.apache
#Virtual Host 的 IP
NameVirtualHost 192.168.1.105
#設定 DocumentRoot
DocumentRoot /srv/www/steven
#設定所對應的 FQDN
ServerName steven.l-penguin.idv.tw
#設定目錄權限
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
DocumentRoot /srv/www/john
ServerName john.l-penguin.idv.tw
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
5.安裝samba
apt-get install samba smbclient smbfs
smb.conf
[global]
unix charset = BIG5
display charset = BIG5
dos charset = CP950
[Linux Nas]
# comment = Lniux Share
# path = /var/samba/
# read only = no
# public = yes
# writable = yes
# create mode = 0664
# directory mode = 0775
path = /mnt/samba/
available = yes
browseable = yes
public = yes
writable = yes
smbmount //192.168.123.118/D /mnt/samba/ -o guest,codepage=cp950,isocharset=utf8,umask=055( or uid=xxx)
6.安裝vnc、中文字型、防火牆
apt-get install icewm x-window-system-core vncserver ttf-arphic-uming firestarter xterm
wget http://debian.linux.org.tw/debian/pool/contrib/v/vnc-java/vnc-java_3.3.3r2-5_all.deb
dpkg -i vnc-java_3.3.3r2-5_all.deb
7.安裝防火牆
apache2加密方法
apache2.conf
AllowOverride AuthConfig
Order allow,deny
Allow from all
GNU nano 1.2.4 File: .htaccess
# This file is used to test the .htacces function
AuthName "domainname MediaWiki"
Authtype Basic
AuthUserFile /var/www/files/.htpasswd
require user domainname ping wayne wjm
htpasswd -c .htpasswd wjm
# The primary network interface
auto eth0
# DHCP指派
# iface eth0 inet dhcp
# 固定IP改法
iface eth0 inet static
address 192.168.0.168
netmask 255.255.255.0
gateway 192.168.0.1
2.安裝SSH SERVER
apt-get install openssh-server
2.安裝LAMP
apt-get install apache2 mysql-server mysql-client php4 phpmyadmin libapache2-mod-php4 php4-gd
3.phpmyadmin
3.1 限制phpmyadmin對外連線
/etc/apache2/conf.d/phpmyadmin.conf
order deny,allow
deny from all
allow from 127.7.7.1 192.168.0.0/24
AllowOverride All
order deny,allow
deny from all
allow from 127.7.7.1 192.168.0.0/24
AllowOverride All
3.2 登入修改密碼
4.apache
#Virtual Host 的 IP
NameVirtualHost 192.168.1.105
#設定 DocumentRoot
DocumentRoot /srv/www/steven
#設定所對應的 FQDN
ServerName steven.l-penguin.idv.tw
#設定目錄權限
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
DocumentRoot /srv/www/john
ServerName john.l-penguin.idv.tw
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
5.安裝samba
apt-get install samba smbclient smbfs
smb.conf
[global]
unix charset = BIG5
display charset = BIG5
dos charset = CP950
[Linux Nas]
# comment = Lniux Share
# path = /var/samba/
# read only = no
# public = yes
# writable = yes
# create mode = 0664
# directory mode = 0775
path = /mnt/samba/
available = yes
browseable = yes
public = yes
writable = yes
smbmount //192.168.123.118/D /mnt/samba/ -o guest,codepage=cp950,isocharset=utf8,umask=055( or uid=xxx)
6.安裝vnc、中文字型、防火牆
apt-get install icewm x-window-system-core vncserver ttf-arphic-uming firestarter xterm
wget http://debian.linux.org.tw/debian/pool/contrib/v/vnc-java/vnc-java_3.3.3r2-5_all.deb
dpkg -i vnc-java_3.3.3r2-5_all.deb
7.安裝防火牆
apache2加密方法
apache2.conf
AllowOverride AuthConfig
Order allow,deny
Allow from all
GNU nano 1.2.4 File: .htaccess
# This file is used to test the .htacces function
AuthName "domainname MediaWiki"
Authtype Basic
AuthUserFile /var/www/files/.htpasswd
require user domainname ping wayne wjm
htpasswd -c .htpasswd wjm
留言