ubuntu 安装mysql apache
2010-04-05 17:11
204 查看
sudo apt-get install mysql-server mysql 服务
sudo apt-get install mysql-client mysql 连接
sudo apt-get install libmysqlclient15-dev 安装c 的mysql 开发包
开启mysql服务 sudo /etc/init.d/mysql start
c中mysql编译选项:
gcc -o test test.c -I/usr/include/mysql -L/usr/lib/mysql/*.a -lmysqlclient
开启apache2 服务 sudo /etc/init.d/apache2 start
sudo apt-get install apache2 安装apache2服务器
配置apache 服务器是一定要注意,
安装完Apache后的最重要的一件事就是要知道Web文档根目录在什么地方,对于Ubuntu而言,默认的是/var/www。怎么知道的呢? apache2.conf里并没有DocumentRoot项,httpd.conf又是空的,因此肯定在其他的文件中。经过搜索,发现在 /etc/apache2/sites-enabled/000-default中,
下面是一个关于根目录www 和 ci-bin配置文件
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/kanison/www #这里是www根目录
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/kanison/www> #这里也是
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /home/kanison/cgi-bin/ #这里是cgi-bin的目录 是/cgi-bin/ 这个目录映射到/home/kanison/cgi-bin
<Directory "/home/kanison/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
<Directory /home/kanison/cgi-bin>
Options +ExecCGI
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
如果网页上只显示文字不现实图片。很有可能是权限不够。要把权限改为755就可以了
sudo apt-get install mysql-client mysql 连接
sudo apt-get install libmysqlclient15-dev 安装c 的mysql 开发包
开启mysql服务 sudo /etc/init.d/mysql start
c中mysql编译选项:
gcc -o test test.c -I/usr/include/mysql -L/usr/lib/mysql/*.a -lmysqlclient
开启apache2 服务 sudo /etc/init.d/apache2 start
sudo apt-get install apache2 安装apache2服务器
配置apache 服务器是一定要注意,
安装完Apache后的最重要的一件事就是要知道Web文档根目录在什么地方,对于Ubuntu而言,默认的是/var/www。怎么知道的呢? apache2.conf里并没有DocumentRoot项,httpd.conf又是空的,因此肯定在其他的文件中。经过搜索,发现在 /etc/apache2/sites-enabled/000-default中,
下面是一个关于根目录www 和 ci-bin配置文件
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/kanison/www #这里是www根目录
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/kanison/www> #这里也是
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /home/kanison/cgi-bin/ #这里是cgi-bin的目录 是/cgi-bin/ 这个目录映射到/home/kanison/cgi-bin
<Directory "/home/kanison/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
<Directory /home/kanison/cgi-bin>
Options +ExecCGI
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
如果网页上只显示文字不现实图片。很有可能是权限不够。要把权限改为755就可以了
相关文章推荐
- 安装ubuntu10.10后,如何配置一个Apache+MySQL+PHP环境
- ubuntu下安装Apache+PHP+Mysql
- ubuntu下安装Apache+PHP+Mysql
- Ubuntu 下安装PHP+APACHE+MYSQL 成功篇
- (转)Ubuntu下Apache、php、mysql默认安装路径
- 手把手教你在ubuntu上安装apache和mysql和php
- 手把手教你在Ubuntu上安装Apache、MySql和PHP
- ubuntu下安装Apache+PHP+Mysql
- 手把手教你在Ubuntu上安装Apache、MySql和PHP
- ubuntu httpserver 安装配置(apache+mysql+php)
- ubuntu apache+php+mysql+phpmyadmin 服务器安装
- ubuntu下安装Apache + PHP + Mysql
- Ubuntu10安装apache,mysql,php
- Ubuntu安装PHP+MYSQL+Apache
- Ubuntu 下 Apache、php、mysql默认安装路径(以Ubuntu12.04为例)
- 手把手教你在Ubuntu上安装Apache、MySql和PHP
- ubuntu or debian下安装php mysql apache phpmyadmin
- ubuntu下安装Apache+PHP+Mysql
- Ubuntu下Apache、php、mysql默认安装路径
- ubuntu下安装Apache+PHP+Mysql