1.Apache
apt-get install apache2
a2enmod rewrite (开启伪静态)
重启apache service apache2 restart
配置/etc/apache2/apache2.conf
创建站点配置文件
/etc/apache2/sites-available/xxxx.com.conf
<VirtualHost *:80>
ServerAdmin webmaster@xxxx.com
ServerName xxxx.com
ServerAlias www.xxxx.com
DocumentRoot /mnt/xxxx.com/
ErrorLog /mnt/xxxx.com/logs/error.log
CustomLog /mnt/xxxx.com/logs/access.log combined
</VirtualHost>
创建文件
mkdir -p /mnt/xxxx.com/
mkdir /mnt/xxxx.com/logs
启用站点配置
a2ensite xxxx.com.conf
service apache2 reload
停用站点配置
a2dissite xxxx.com.conf
service apache2 reload
2. Mysql
apt-get install mysql-server
配置文件在/etc/mysql/my.cnf
3.PHP
apt-get install php5 php-pear
配置 /etc/php5/apache2/php.ini
4. mysql 扩展
apt-get install php5-mysql
执行service apache2 restart重启Apache。
5.phpize
apt-get install php5-dev
6.curl
apt-get install php5-curl;
7.gd
apt-get install php5-gd;
8.mcrypt
apt-get install php5-mcrypt;
网友评论