linux常用命令

ls 显示目录

mkdir 创建目录

rmdir 删除目录

touch 创建文件

rm 删除文件 -f(强制删除)

mv 移动文件(重命名)

cp 复制文件

cd ~跳到自己的home directory

cd ../..跳到目前目录的上上层

cd - 返回进入当前目录前所在目录

unzip adt-bundle-linux-x86_64-20131030.zip -d /home/administrator/work/adt2/

rm -rf xxx
-r 递归
-f 强制

http://www.cssmoban.com/cssthemes/index_83.shtml

-----------------------

想一次修改某个目录下所有文件的权限,包括子目录中的文件权限也要修改,要使用参数-R表示启动递归处理。
例如:
[root@localhost ~]# chmod 777 /home/user 注:仅把/home/user目录的权限设置为rwxrwxrwx
[root@localhost ~]# chmod -R 777 /home/user 注:表示将整个/home/user目录与其中的文件和子目录的权限都设置为rwxrwxrwx

-----------------------

php.ini位置,可开启扩展,开启disabled函数
/usr/local/php/etc
 
/root/lnmp0.9
 
找到PHP.INI位置
/usr/local/php/bin/php --ini
会显示php.ini所在路径
 
重启PHP命令:
 
/usr/local/php/sbin/php-fpm start/stop...开启关闭PHP
 
killall php-fpm
/usr/local/php/sbin/php-fpm
 
/usr/local/nginx/sbin/nginx -s stop //关闭服务器
/usr/local/nginx/sbin/nginx 开启服务器
 
PHP扩展位置:
/root/lnmp0.9/php-5.2.17/ext/openssl/modules
/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613
 
安装openssl.so扩展:
让你的php支持 opensll扩展。
默认,是没有openssl扩展的,只能重新编译安装。
yum install openssl openssl-devel
#说明:要将openssl目录下config0.m4改为config.m4,否则/usr/local/php/bin/phpize出错
cd /usr/local/src/php-5.2.14/ext/openssl
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config
#说明:这个位置–with-php-config要换成––with-php-config才行,另外-–两个是不一样的,是输入法所致,转用大写输入即可,否则出现unrecognized option
make && make install
看提示,把编译成的openssl.so 拷贝到你在php.ini 中指定的 extension_dir 下
php.ini
加入
extension=openssl.so
重启web server
 
============================
安装php:
#tar zvxf php-5.3.8.tar.gz
#cd php-5.3.8
#./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --with-mcrypt=/usr/local/mcrypt --disable-rpath --enable-discard-path --enable-magic-quotes--enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem--enable-inline-optimization --with-curlwrappers--enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect--enable-mbstring --enable-gd-native-ttf --with-openssl--with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip--enable-soap --without-pear --with-gettext --with-mime-magic
#make ZEND_EXTRA_LIBS='-liconv'
#make install
 
php5 启动报错value is NULL for a ZEND_INI_PARSER_ENTRY
是copy错了php-fpm.conf 文件。 默认是没有此文件的,但是在php安装目录下/etc下有php-fpm.conf.default,这个才是你需要的。 cp 一个成 php-fpm.conf,启动php吧
 
修改nginx配置文件以支持php-fpm
 
nginx安装完成后,修改nginx配置文件为,nginx.conf
 
其中server段增加如下配置,注意标红内容配置,否则会出现No input file specified.错误
 
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
原文地址:https://www.cnblogs.com/luoyaoquan/p/4228328.html