目錄
[root@development httpd-2.2.14]# yum install zlib-devel.x86_64 ./configure --prefix=/usr/local/httpd-2.2.14 \ --with-mpm=worker \ --enable-so \ --enable-mods-shared=all \ --enable-static-support \ --enable-static-htpasswd \ --enable-static-htdigest \ --enable-static-ab \ --disable-include \ --disable-actions \ --disable-alias \ --disable-asis \ --disable-autoindex \ --disable-auth_basic \ --disable-authn_file \ --disable-authn_default \ --disable-authz_groupfile \ --disable-authz_user \ --disable-authz_default \ --disable-cgi \ --disable-cgid \ --disable-env \ --disable-negotiation \ --disable-status \ --disable-userdir
Apache
[root@development ~]# yum -y install httpd
PHP
[root@development ~]# yum -y install php [root@development ~]# yum -y install php-mysql php-gd php-mbstring php-bcmath [neo@development ~]$ sudo yum -y install php-pecl-memcache
mysql
[root@development ~]# yum -y install mysql-server
[root@development ~]# vim /etc/httpd/conf.d/vhost.conf # # Use name-based virtual hosting. # NameVirtualHost *:80 # # NOTE: NameVirtualHost cannot be used without a port specifier # (e.g. :80) if mod_ssl is being used, due to the nature of the # SSL protocol. # # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # <VirtualHost *:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot /www/docs/dummy-host.example.com ServerName dummy-host.example.com ErrorLog logs/dummy-host.example.com-error_log CustomLog logs/dummy-host.example.com-access_log common </VirtualHost>
levels
[root@development ~]# chkconfig --list mysqld mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@development ~]# chkconfig --list httpd httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@development ~]# chkconfig httpd on [root@development ~]# chkconfig --list httpd httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@development ~]# chkconfig mysqld on [root@development ~]# chkconfig --list mysqld mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Apache
[root@development ~]# service httpd start
MySQL
[root@development ~]# service mysqld start
[root@development ~]# netstat -nat | grep 80 tcp 0 0 :::80 :::* LISTEN [root@development ~]# netstat -nat | grep 3306 tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
[root@development php-5.3.0]# yum install libxml2-devel [root@development php-5.3.0]# yum install curl-devel [root@development php-5.3.0]# yum install gd-devel [root@development php-5.3.0]# yum install libjpeg-devel [root@development php-5.3.0]# yum install libpng-devel [root@development php-5.3.0]# yum install openldap-devel [root@development php-5.3.0]# yum install mysql-devel [root@development php-5.3.0]# yum install net-snmp-devel