Linux学习笔记3

touch filename

创建一个不存在的文件,或者修改文件的时间戳。

touch log.txt

whereis name

定位一个文件。

whereis php.ini

whereis、locate、find的区别

whereis是从环境变量中查找,快捷,但是范围有限,不全面。

locate是从一个日常活动生成的数据库中查找,需要一定的权限,快捷,全面。

find是通过文件系统来查找,参数多,功能强大。

php -m

查看php安装了哪些拓展。

wget url

下载url指定的文件到当前目录。

wget http://test.com/test.zip

安装php拓展的一般方法

1.下载压缩包,可以使用wget url来下载。

2.使用tar -zxvf filename解压文件。

3.进入解压的目录。

4.使用./configure命令。

5.使用make命令。

6.使用make install命令。

7.把生成的拓展文件加入php.ini。

8.重启服务器。

原文地址:https://www.cnblogs.com/kross/p/3228463.html