安装apache,mysql,php
2012-05-30 21:37
218 查看
以下安装apache,mysql,php:
yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql
1.安装php扩展:
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
2.安装apache扩展:
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
3.启动mysql:
/etc/init.d/mysqld start
4.设置mysql的root密码:
mysqladmin -u root password '你的密码'
5.按[ctrl+alt+f7]切换到图形界面.
6.配置apache多站点,找到/etc/httpd/conf/httpd.conf,用文本编辑器打开,找到[#NameVirtualHost *:80],去掉前面的[#]号.
7.找到[DirectoryIndex index.html index.shtml],增加一个[index.php].
8. 在[/etc/httpd/conf.d]文件夹内新建一个[vhosts.conf]文件,内容格式如下(假设我要建立两个站点http: //www.yomeier.com/ / http://www.k204**/),对应的网站文件则应放在[/var/www/yomeier]和 [/var/www/k2046]目录下.:
<VirtualHost *:80>
ServerAdmin xxx@live.com
DocumentRoot /var/www/yomeier
ServerName www.yomeier.com
AddDefaultCharset UTF-8
<Directory "/var/www/yomeier">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin xxx@live.com
DocumentRoot /var/www/k2046
ServerName www.k204**
AddDefaultCharset UTF-8
<Directory "/var/www/k2046">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
9.打开终端.
启动apache:/etc/init.d/httpd start
10.设置apache自启动:
chkconfig --add httpd
chkconfig --level 345 httpd on
11.设置mysql自启动:
chkconfig --add mysqld
chkconfig --level 345 mysqld on
12.修正centos在VirtualBox安装里全屏时分辨率的问题:
用文本编辑器打开[/etc/X11/xorg.conf]
找到:
SubSection "Display"
Modes "1280x800" "800x600" #这里按屏幕需要改就可以了
EndSubSection完成!
yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql
1.安装php扩展:
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
2.安装apache扩展:
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
3.启动mysql:
/etc/init.d/mysqld start
4.设置mysql的root密码:
mysqladmin -u root password '你的密码'
5.按[ctrl+alt+f7]切换到图形界面.
6.配置apache多站点,找到/etc/httpd/conf/httpd.conf,用文本编辑器打开,找到[#NameVirtualHost *:80],去掉前面的[#]号.
7.找到[DirectoryIndex index.html index.shtml],增加一个[index.php].
8. 在[/etc/httpd/conf.d]文件夹内新建一个[vhosts.conf]文件,内容格式如下(假设我要建立两个站点http: //www.yomeier.com/ / http://www.k204**/),对应的网站文件则应放在[/var/www/yomeier]和 [/var/www/k2046]目录下.:
<VirtualHost *:80>
ServerAdmin xxx@live.com
DocumentRoot /var/www/yomeier
ServerName www.yomeier.com
AddDefaultCharset UTF-8
<Directory "/var/www/yomeier">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin xxx@live.com
DocumentRoot /var/www/k2046
ServerName www.k204**
AddDefaultCharset UTF-8
<Directory "/var/www/k2046">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
9.打开终端.
启动apache:/etc/init.d/httpd start
10.设置apache自启动:
chkconfig --add httpd
chkconfig --level 345 httpd on
11.设置mysql自启动:
chkconfig --add mysqld
chkconfig --level 345 mysqld on
12.修正centos在VirtualBox安装里全屏时分辨率的问题:
用文本编辑器打开[/etc/X11/xorg.conf]
找到:
SubSection "Display"
Modes "1280x800" "800x600" #这里按屏幕需要改就可以了
EndSubSection完成!
相关文章推荐
- 手动安装Apache+PHP+MYSQL及环境配置
- Linux安装Apache 2.4 + PHP 7 + Mysql笔记
- 安装和配置PHP,MYSQL,Apache和Zend Studio
- CentOS 源码编译安装LAMP(Apache MySQL PHP)
- Ubuntu 16.04 安装 Apache, MySQL, PHP7
- CentOS 6.4 系LAMP(Apache+MySQL+PHP)安装步骤
- Linux下Apache+Mysql+PHP的安装与配置
- Apache+php+mysql在windows下的安装与配置图解(最新版)
- 在RHEL -AS4-u4中安装apache+mysql+php+ZendOptimizer笔记
- 在 Windows 下安装 WAMP(Apache、MySQL、PHP)详细图文教程
- Apache+php+mysql在windows下的安装与配置图解(最新版,-)
- 修改WAMPServer(Apache+PHP+MySQL一键式安装)中mysql默认空密码
- mac下安装apache+php+mysql
- Apache 2.0.50,+php5.1.2+mysql 5.1 安装手记
- centos Apache、php、mysql默认安装路径
- CentOS环境下yum安装LAMP(Linux+Apache+Mysql+php)
- Centos 6编译安装apache&PHP&mysql
- ubuntu降级php(默认安装apache,php,mysql)
- php+apache+mysql安装
- Ubuntu安装php+apache+mysql