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服务和它们的特征的方法。 ......
系统
# uname -a # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue # 查看操作系统
版本
# cat /proc/cpuinfo # 查看CPU信息
# hostname &n ......
原始定义:include/linux/init.h
__init和__exit标记函数,__initdata和__exitdata标记数据。
此宏定义可知标记后的函数与数据其实是放到了特定的(代码或数据)段中。标记为初始化的函数,表明该函数供在初始化期间使用。在模块装载之后,模块装载就会将初始化函数扔掉。这样可以将该函数占用的内存释放出来。
__ ......
1. java ... > log.out
将Java程序输出 保存到 log.out 文件
2. java .... >>log.out
与上一个不同,这个是追加到文件,而不会覆盖原有输出.
3. java .... >>log.out 2>&1
在Java里(其他语言也应该一� ......