You are on page 1of 89

1

CentOS5.2
1. BIOS server
Boot CD-ROM
CentOS 5.2 1 CD-ROM

Boot CD-ROM
CentOS5

Graphic Mode Enter
Text Mode
linux text Enter
Graphic Mode Enter

2
2.

Skip Enter
CD
3. CentOS Graphic Mode

Next

3
4.

English Next
5.

4
English Next
6.

Yes
7.


Remove Custom
Next

Auto

Delete

NEW
/boot 512

CentOS5.2 Linux
Server
Patition

/boot
256 MB ( Force to

6
/
Swap

be primary Patition )
512 MB ( Force to
be primary Patition )
RAM Server 1
GB 512 MB
1024 MB (
Force to be primary
Patition )
/tmp
512 MB
/usr
5,300 MB package (
)
/var
512 MB
/var/ftp
15,000 MB FTP server
(/ftp
)
/var/lib
2,500 MB SQL
(/lib )
/
3,072 MB Proxy Server
var/spool/sq (/spool/squid )
uid
/
1204 MB (/spool/mail
var/spool/m )
ail
/usr/local
1,500 MB
/opt
512 MB
/home
Fill to maximum allowable
siza ( )
8.
Next

Yes
9. IP Address

1 2 eth1

9
eth0 1
CONSUMER BOX iPSTAR
eth0 Edit
IP4 IP6
IP Address
192.168.5.200 prefix(NetMask)
255.255.255.0 OK

Hostname
manually
marnda.no-ip.org
GateWay
192.168.5.100 DNS
203.192.33.34 eth1
eth1 2

eth1 edit
IP4 192.168.0.1 Prefix (Netmask)
255.255.255.0 IP6
ok Next
10.

10

BangKok
11. root

11

2
Next
12. Package Server
Server

12
Next

13. server

Servers

FTP Server
1 of 3 optional package
selectd 1
Optional packages 3

Lanquages thai server

13

Next

6 CD-ROM
Enter

14
6
14.

Reboot

Server Firewall Disabled
SELinux Disabled

Server

15

Firewall

SElinux
15.

16

Username : root
Password :
16.

17
2
Linux
Linux
1. Terminal
Linux

Terminnal
Server
Applications >
Accesserries > terminal
restart server reboot
shutdown h now

ls
ls -al
pwd
cd /etc
cd ..
cd \

Linux Command

etc
1

18
mkdir data1
mkdir sys
rm -rf data1

data1
sys
data1

cat > admin.sh admin.sh


Crtl+D

cat admin.sh

admin.sh
cat /etc/passwd
passwd etc
cp member.txt
member.txt
member2.txt
member2.txt
cp member.txt
member.txt
/sys
sys
mv member.txt member.txt
/sys
sys
rm member2.txt member2.txt
history

cat

/root/.bash_histor
y

groupadd staff
staff
groupadd std

std
cat /etc/group

adduser seree - seree

19
g staff
adduser joe -g
std
passwd seree
[enter]
xxxx

xxxx

cat /etc/passwd

staff
joe
std

seree

cat /etc/shadow
adduser marnda
passwd marnda marnda
marnda
ls /home

adduser -g hrd -s /bin/false -c "Mr.Peter"


peter
hrd

perter

userdel seree
seree
home directory
userdel -r seree seree
home directory

chown joe data joe


data
Process
ps -aux

kill -9 3452
3452

20

Services Server
Dhcpd , Httpd , FTP , mail , iPTABLES , squid , mysqld ,
named
service server
server

System > Administration > Server


Setings > Servinces

services httpd Start


Services
Service

21
dhcpd =>

httpd =>
FTP => FTP Server
mail => server
iptables => firewall
squid => squid Proxy
mysqld => SQL
named => server
**

Servinces

reboot
servinces
3
Webmin Server
webmin
webmin Control Panel
Config Linux Server port
10000
www.webmin.com

22

webmin
/tmp server
webmin
Terminal
server Putty
/tmp server cd /tmp
webmin

rpm Uvh webmin-1.4301.noarch.rpm

rpm Uvi webmin-1.4301.noarch.rpm


++
++

23
Mozilla Linux server
IE

https:// IP server : 10000

Username Password

24

webserver
1. Apache webmin IE
Mozilla https://IP server:10000
Server > Apache

2.

25

Existing virtual host 1


Start Apache 2
Apache
3. Apache webserver

Apache IE
http:// IP Server/

26
html
php /var/www/html

http:// IP Server/
DHCP
DHCP Dynamic Host Configuration Protocal
IP
(clients)
DHCP
(Server) IP


IP DHCP
IP
DHCP

IP DHCP

1. DHCP webmin
Subnet
Dhcp Server 1

27
subnet 1 (eth0) IP:
192.168.5.200 Netmask : 255.255.255.0
Subnet 192.168.5.0

SAVE
2. Subnet 1 (eth0)

subnet 1 (eth0)
3. Subnet 2
(eth1)

28

2 eth1 IP : 192.168.0.1
NetMask : 255.255.255.0 Subnet
192.168.0.0
SAVE

29

Subnet 2
4. Client Option

Edit Client Option

30
1 Subnet mask NetMask
2 (eth1)
2 Default rountors IP Address
2 (eth1)
3 Broadcast address Broadcast
2
4 DNS Servers DNS
1 (eth0)

Update DNS Ad-hoc

SAVE
5. DHCP

Error
IP Address
DHCP
1. network windows xp

31

My Network Plases > Properties


2. Network Connection
Local Area Connection > Properties

Connect
. Internet Protocol
(TCP/IP)

32

. IP Address

IP Address atomatically
OK
5. IP Address

33

IP Address Server

Squid Proxy iPTABLES


SQUID PROXY
1. squid Proxy
webmin

34

Server > Squid Proxy server

2. Access Control

3. ACL Client Address

35

1 Client Address
Create new ACL 2

SAVE

4. Proxy restrictions

36

Proxy restrictions
Proxy restrictions Add Proxy
restrictions

5.

6. Proxy

37

7. squid

Start Squid
Squid Proxy
ip_forward

iptables
server reboot

server reboot

1. Putty Login server

38

2.

insert
Insert + Esc
:wq

reboot

39
mysql5.1.31
mysql 5.0 update
php5.2.8 php-gd5.2.8
mysql5.1
php function
CMS
Moodle , phpsysinfo , phpmyadmin
php5.2
mysql5.1.31
1 Putty
1.1 /etc/yum.repos.d/
update
1.2 update
Packages File

40

3 package file

y enter

41

y enter

mysql

42

Update php 5.1.6 to 5.2.8 on Centos 5.2



update php
server 4
update
phpsysinfo , moodle , phpmyadmin
cms

php
.
1 php
remote
Putty

php 5.1.6 update


packages webmin
09/02/2009 PHP5.2.8
File Server Update
php5.2.6 update

43
php5.2.8
mysql
1.1

1.2

y enter

44

*** php5.2.8
php
reboot server
reboot server
***update PHP5.2.6
2008***
2 update packages
webmin

45

webmin System >


Software Packages
1. packages epel-release-5-2.noarch.rpm
1 Form ftp or http URL

Install 2

46

install packages Overwrite file


1 , 2
2. packages remi-release-54.el5.remi.noarch.rpm
packages
Form ftp or http URL

Install

47

Overwrite file Install


3 php 5.2.6
remote
Putty server

Packages
file

48

packages file
y Enter

y Enter

49


4 php update
php

update PHP 5.2.6


*** php5.2.6
php
reboot server
reboot server

50
Zend Optimizer webmin
Zend Optimizer
PHP

1 webmin https://IP
SERVER:10000

webmin System >


Software Packages 1 Form ftp
or http URL

URL Istall
2
2

51

Overwrite file 1
2
3

52
reboot
server
4

script test
PHP /var/www/html

script Test PHP


testphp.php
----------<? php
phpinfo();
?>

53
web browser
Zend Optimizer
phpSysinfo server

phpSysinfo
server

3.0
php5.2 php
update
update PHP
1 Putty
/tmp

/tmp server
2

54

*.tar.gz
4 phpSysinfo
/var/www/html
phpSysinfo webserver
5 config.php
phpSysinfo
5.1 Sysinfo

5.2 config.php
config.php.new
config.php
6

55

http://IP Server/phpsysinfo/
sql5
1. Server
sql
rpm -q mysql

2.

56

57
4
phpMyAdmin 3.0
phpMyAdmin 3.0.1.1
phpMyAdmin SQL
AppServ
php
SQL
1 remote server
Putty /tmp server

phpMyAdmin3.0

2 .tar.gz

58

3 web server
web server
config
phpMyAdmin
4 config
web server

4.1 web server


phpMyAdmin
config
4.2 config

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['auth_type'] = 'http';

59

insert Esc+:wq

5 phpMyAdmin
phpMyadmin
internet Explorer
http://IP SERVER/phpMyAdmin/

60

User root

61

62
5
FTP Server

vsftpd
vsftp Ftp server
config
config

server
1 config Putty

1 servince vsftpd
2 vsftp
server reboot

2 FTP Server

63

winSCP
/var/ftp/ server
vsftp
servince vsftpd
/var/ftp/ server
IE

64

ftp://ip-server/

65
6
Squid Proxy Server
Proxy Ports
Proxy port
Block web Proxy
Authentication Username Password

1. webmin
Squid Proxy Server

Server >

2. Ports and
Networking

3. port

66

save
Proxy Ports
Proxy Authentication :

67

Authentication
(Identity)

2
1. (Identification)

(username)
2. (Authentication)

Authentication
1 remote Putty

68

2 permission username

69

3
username ncsa_auth

4 /etc/squid/squid.conf

70

5 #TAG : auth_param
#Recommended
minimum configuration .

username
auth_param

71

#acl our_networks src ...

(Shift:wq)
squid.conf restart sduid
restart servince squid
Authentication

72
User Authentication webmin
config
Authentication
webmin User

webmin
1 webmin
Server > Squid Proxy Server

2 Proxy
Authentication

73

Create
User

74



centos5.2


squid
1 remote server
Putty squid

2 URL squid block

75
1
2
Insert
2 acl aclname urlpath regex [i] \ .gif$ ...

insert
shift :wq
3 blockx.zip

3.1 blockx.zip /tmp

3.2 blockx.zip

3.3 blockx

3.4 blockx


restart squid Putty

76
4

www.sexxy.com

**
blockx.txt restart squid

Proxy
**

1. Internet Explorer
Tools > internet Option

77

2. connecttion

78

LAN setting
3

79

Proxy
4. Internet Explorer
Username Password

80

81
7
Logfile
.50
SARG : Squid Analysis Report Generator
SARG Squid Analysis Report Generator


CentOS Linux
Server

SARG
Logfile Squid
Logfile CentOS Linux Server

SARG


web Browser

82

SARG

83

84
SARG : Squid Analysis Report Generator

SARG

SARG
webmin packages file
server
1 https:// IP
server : 10000

85

86
8
mail server

Openwebmail on centos5.2
Open Webmail Web-based Email Perl
Redhat

webmail

openwebmail
1 remote
Putty

perl-Text
Perl-Text
2 update Yum

87
. Copyright 2008

2/13 1 .
. . 30320 044-361806
Best Viewed with 1024 x 768 Resolution (IE & Firefox)
Administrator regis

88
()
Linux Text Web Server

Linux - Apache - MySQL - PHP


CentOS 5.x
Apache
MySQL
PHP
Perl (including DBD / DBI)
Cronolog
GD - Graphics Library
Mcrypt and libmcrypt (Replacement to unix crypt
supporting additional features)
Libmhash (hash algorithm interface)
VSFTPD (FTP Server)

89

You might also like