# PHP重启
service php-fpm restart
/etc/init.d/php-fpm-5.4.33 restart
# 查询mysql是否启动
service mysqld status
service mysqld start
# 软连接符号命令
ln -s 源文件 目标文件
ln -s /home/www/common/Common /home/www/htdocs
ln -s /home/www/Service /home/www/htdocs
ln -s /home/www/htdocs/ThirdGit/Service /home/www/htdocs
ln -s /home/www/htdocs/ThirdGit/common/Common /home/www/htdocs
#以下三行为没有index开头的文件可以进行访问
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
#Nginx用户认证
location /
{
auth_basic "nginx basic http test for phptest.com";
auth_basic_user_file /etc/nginx/htpasswd ;
autoindex on;
}
#加密
printf "58haha:$(openssl passwd -crypt 123456)\n" >>conf/htpasswd
cat htpasswd
# windows 如何用命令来移除网络驱动器映射
net use Z: /delete
php安装rabbitmq
wget https://pecl.php.net/get/amqp-1.6.1.tgz
tar zxf amqp-1.6.1.tgz
cd amqp-1.6.1
phpize
wget https://github.com/alanxz/rabbitmq-c/releases/download/v0.7.1/rabbitmq-c-0.7.1.tar.gz
tar zxf rabbitmq-c-0.7.1.tar.gz
cd rabbitmq-c-0.7.1
./configure --prefix=/usr/local/rabbitmq-c-0.7.1
make && make install
./configure --with-php-config=/usr/local/php-5.4.33/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c-0.7.1
make && make install
vim /usr/local/php-5.4.33/etc/php.ini
extension = /usr/local/php-5.4.33/lib/php/extensions/no-debug-non-zts-20100525/amqp.so
/etc/init.d/php-fpm-5.4.33 restart
php7安装rabbitmq
首先得安装rabbitmq-c-0.7.1.tar.gz
wget https://github.com/alanxz/rabbitmq-c/releases/download/v0.7.1/rabbitmq-c-0.7.1.tar.gz
tar zxf rabbitmq-c-0.7.1.tar.gz
cd rabbitmq-c-0.7.1
./configure --prefix=/usr/local/rabbitmq-c-0.7.1
make && make install
安装amqp
wget http://pecl.php.net/get/amqp-1.8.0.tgz
tar -zxf amqp-1.8.0.tgz
cd amqp-1.8.0
/usr/local/php-7.1.0/bin/phpize
./configure --with-php-config=/usr/local/php-7.1.0/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c-0.7.1
make && make install