Slackware 12.0的变化--Apache2
时间:2007-07-07
来源:互联网
Slackware 12.0 包括 Kernel 2.6.21.5,Apache 2, MySQL 5, PHP 5. 最主要的变化是apache2配置,配置文件的位置从/etc/apache/httpd.conf变为/etc/httpd/httpd.conf. 而且DocumentRoot 从/var/www/htdocs变为/srv/httpd/htdocs/。 Web 服务器的配置通常包括Linux Apache, MySql, PHP (LAMP).
启动apache2
启动apache2只需要对/etc/rc.d/rc.httpd增加一个可执行位
# chmod +x /etc/rc.d/rc.httpd # /etc/rc.d/rc.httpd start |
配置PHP5
PHP5的配置需要两个文件php.ini和mod_php.conf。这两个文件都在/etc/httpd目录中。
# cd /etc/httpd/ # mv php.ini-recommended php.ini # mv mod_php.conf.example mod_php.conf |
#Include /etc/httpd/mod_php.conf 改为 Include /etc/httpd/mod_php.conf ... DirectoryIndex index.html index.htm index.php |
# /etc/rc.d/rc.httpd restart |
在 /srv/httpd/htdocs/生成一个文件info.php,输入下面内容
<html> <head> <title> PHP Test Script </title> </head> <body> <?php phpinfo( ); ?> </body> </html> |
MySQL 5
首先需要初始化MySql,以root身份
$ su # su mysql $ mysql_install_db $ su root # mv /etc/my-small.cnf /etc/my.cnf # chown -R mysql:mysql /var/lib/mysql/ |
# chmod +x /etc/rd.d/rc.mysqld # /etc/rc.d/rc.mysqld start |
# mysqladmin -u root password <Your_Pass_Word> # mysqladmin -u root -p create testdb |
# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.0.37 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> |
为了让PHP也支持MySql,打开/etc/httpd/php.ini找到 extension=msql.so这一行,并去掉前 面的注释(分号; )
; Filename: /etc/httpd/php.ini ; If you wish to have an extension loaded automatically, use the following ; syntax: ; ; extension=modulename.extension ; ; For example, on Windows: ; ; extension=msql.dll ; ; ... or under UNIX: ; extension=msql.so |
SSL配置
SSL 是一种安全机制,如果你经常去网上银行,你会发现地址栏以https:// 开头而不是以 http:// 开头。https:// 即是增加了安全机制的http协议。为了增加SSL支持,需要产生私有密钥和共有密钥.
$ openssl req -new > myserver.csr |
然后删除掉私有密钥中passphras并生成 certificate.
$ openssl rsa -in privkey.pem -out myserver.key $ openssl x509 -in myserver.csr -out myserver.cert -req -signkey myserver.key -days 365 |
# cp myserver.cert /etc/httpd/server.crt # cp myserver.key /etc/httpd/server.key |
# Filename: /etc/httpd/httpd.conf ... ... LoadModule ssl_module lib/httpd/modules/mod_ssl.so |
# /etc/rc.d/rc.httpd restart |
$ netstat -tpan | grep 443 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp6 0 0 :::443 :::* LISTEN - |
作者: lchxr 发布时间: 2007-07-07
作者: dogking 发布时间: 2007-07-08
作者: jazzly 发布时间: 2007-07-08
虽然系统自带的很方便。^_^
作者: 基督山伯爵 发布时间: 2007-07-08
我的步骤如下:
安装openfire到/opt目录下
设置好mysql(slackware12自带的那个版本),启动服务,建个名叫openfire的数据库并用openfire自带的那个进行脚本初始化,增加个用户jabber专门用来操作openfire数据库。
启动openfire服务,登录http://localhost:9090进行设置->到设置数据库的时候死活连不上
有谁知道是怎么回事?
作者: Yei 发布时间: 2007-09-01
# mysql_init_db
# chown -R mysql.mysql /var/lib/mysql
# mv /etc/my.cnf-sample /etc/my.cnf
如果不希望mysqld自启动,可执行
# sh /etc/rc.d/rc.mysqld start
作者: chendy 发布时间: 2007-09-02
error.zip (5.2 KB, 2 次查看) |
作者: Yei 发布时间: 2007-09-02
好多天上不了Sir,真是郁闷
作者: Yei 发布时间: 2007-09-17
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28