天天看点

Linux_LAMP 最强大的动态网站解决方案LAMP Install LAMP via YUM Install LAMP via ResourceCode

1

2

3

4

port:tcp80 tcp443 

logfile:/var/log/httpd/ 

step1. install apache

5

step2. addition service to chkconfig 

vim /etc/init.d/httpd

step3. start the chkconfig service

step4. edit the httpd service config file 

vim /usr/local/apache2/conf/httpd.conf

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

step5. httpd stress testing

virtual machine type: 

(1) domainname-based virtual hosting 

(2) ip address-based 

(3) port-based

step1

step2. open virtual machine function 

vim httpd.conf

vim conf/extra/httpd-vhosts.conf #define virtual machine domain 

for example:

vim /etc/hosts

much step of setup the ip-based virtual hosting as same as the name-based virtual hosting,but different as below. 

step1. comments the “namevritualhost *:80” 

step2. specify the different ip in the sections of <code>&lt;virtualhost ip:80&gt;</code>

step1. add the listen port 

step2. comments the “namevritualhost *:80” 

step3. specify the different ip in the sections of <code>&lt;virtualhost ip:post&gt;</code>

vim httpd.conf #open home directory

vim httpd-userdir.conf

login the personal page

step1. install apache by resource and enable ssl protocol

step2. edit the apache config file to enable ssl function module 

setp3. create ssl cert 

cd conf/ and running the cert script as below

step4. specify virtual machine which used security(ssl) cert and ssl cert’s store directory url. 

vim extra/httpd-ssl.conf

30

31

32

step4. restart httpd service

only permission user who can access this web pager. 

step1. install awstats software.

step2. edit the awstats plugin configure file. 

vim /etc/awstats/awstats.jmilk.fan.com.conf(awstats.domain.com.conf)

step3. edit apache configure file to add awstats plugin 

vim httpd-vhosts.conf #change the customlog type from “common” to “combined”

step4. setting awstats’s access limit 

step5. create htpasswd user by htpasswd tool

port: tcp 3306 

step1. install mysql 

step1. install mysql via resource

step2. initialization mysql configure.

vim /etc/profile

step3. start mysql service

step4. setup mysql’s user and password.

step5. check the mysql install

step6. mysql usage 

a. list user’s table field information 

<code>describe user;</code> 

b. create database and create file in the /usr/local/mysql/var/ 

<code>create database world;</code> 

c. create table 

<code>create table tablename(id int not null,name char(16) not null,password char(16) not null default '123',primany key(id));</code> 

d. delete table

e. select table info or select table item info.

f. select from much table.

g. insert item into table 

<code>insert into tablename(id,name,password) values(1,'username','123');</code> 

h. update the table item info. 

<code>update tablename set password=encrypt('123') where id=1;</code> 

b.mysql date backup and recover: 

(1) backup:

(2) recover:

step1. install php support

step2. edit php configure file

vim /usr/local/apache2/conf/httpd.conf #add php plugin to apache

step3. test the php module 

vim testphp.php

step4. install phpmyadmin manager paper.

step5. install discuz

转载:http://blog.csdn.net/jmilk/article/details/50273995