linux mysql php apache 配置安装
我们把下载的三个软件包放到/var/local目录下(这是笔者个人的习惯),它们都是tar.gz包,可以用命令tar -xzpvf 包名,把它们在当前目录(/var/local/)中解开:
cd /var/local
tar -xzpvf mysql-4.0.15.tar.gz
tar -xzpvf php-4.3.3.tar.gz
tar -xzpvf httpd-2.0.47.tar.gz
解包后可以开始进入正式安装。
安装MySQL
1.编译
cd mysql-4.0.15/
../configure --prefix=/usr/local/mysql
make
make install
cd ..
2.增加用户
adduser -s /bin/false mysql
3.初始化并设置目录权限
/usr/local/mysql/bin/mysql_install_db
chown -R root /usr/local/mysql/
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql/
4.加入库
echo /usr/local/mysql/lib/mysql/lib >>/etc/ld.so.conf
ldconfig
5.使之启动时自动运行
echo "/usr/local/mysql/bin/mysqld_safe &" >>/etc/rc.d/rc.local
6.启动MySQL
/usr/local//mysql/bin/mysqld_safe &
7.安全性设定
修改MySQL的root密码:
/usr/local/mysql/bin/mysqladmin -uroot password abcdefg
8.测试
[root@terry bin]# /usr/local/mysql/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3 to server version: 4.0.15
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> delete from user where user=''; (删除所有用户名为空的用户,可以提高安全性)
Query OK, 2 rows affected (0.00 sec)
mysql> quit
Bye
安装Apache
cd httpd-2.0.47/
../configure --prefix=/usr/local/httpd --enable-so
make
make install
cd ..
现在已经将Apache 2.0.47安装到 /usr/local/httpd目录中,安装好的Apache支持可装载模块和标准的MPM prefork。如果安装过程中没有出现错误,便可以使用如下命令启动Apache服务:
/usr/local/httpd/bin/apachectl start
如果启动成功,将启动命令加入rc.local,使之在系统启动时自动运行:
echo "/usr/local/httpd/bin/apachectl start &" &g
相关文档:
Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......
系统中能够随机(不需要按顺序)访问固定大小数据片(chunks)的设备被称作块设备,这些数据片就称作块。最常见的块设备是硬盘,除此以外,还有软盘驱动器、CD-ROM驱动器和闪存等等许多其他块设备。注意,它们都是以安装文件系统的方式使用的——这也是块设备一般的访问方式。
& ......
服务器:
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <time.h>
#define SERVER_PORT 20000 // define the defualt connect port id
#define LENGTH_OF_LISTEN_QU ......
摘要:从老牌的桌面端的Fedora和Debian,到日渐流行Ubuntu;从节省空间的Puppy Linux,到功能强大的红帽Linux企业版(RHEL),我们的开源专家将告诉你哪个是你最需要的。
【51CTO.com独家特稿】当你对别人说,“我要买辆车。”他马上就会问你:“什么车?”福特、丰田、还是本田?是双门跑车、小轿车 ......
Linux 下串口编程入门
文档选项
<tr
valign="top"><td width="8"><img alt="" height="1" width="8"
src="//www.ibm.com/i/c.gif"/></td><td width="16"><img alt="" width="16"
heig ......