docker run -p 80:80 -p 81:81 -p 8888:8888 -p 801:801 -p 8081:8081 -p 3306:3306 -v /usr/share/nginx/demo:/usr/share/nginx/demo -v /var/lib/data:/var/lib/mysql -tid --privileged --name plus centos:centos7 /usr/sbin/init
docker exec -it plus /bin/bash
yum update -y
yum install glibc-headers gcc-c++ git autoconf wget lrzsz net-tools psmisc gcc curl curl-devel libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel
可能會報錯 configure: error: please reinstall the libzip distribution
安裝 cmake
1、執行安裝配置命令:配置軟體二進位制安裝到/usr/local/bin目錄下
./bootstrap --prefix=/usr/local/bin
2.接下來執行make
命令,直至安裝成功
3.最後執行make install
,安裝軟體
vim ~/.bashrc
export path=/usr/local/bin/bin:$path
執行命令
source ~/.bashrc
4.檢視cmake版本資訊:
cmake --version
安裝 libzip
cd libzip
mkdir build
cmake ..
make
make install
./configure \
--prefix=/usr/local/php \
--with-curl \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv-dir \
--with-kerberos \
--with-libdir=lib64 \
--with-libxml-dir \
--with-mysqli \
--with-openssl \
--with-pcre-regex \
--with-pdo-mysql \
--with-pdo-sqlite \
--with-pear \
--with-png-dir \
--with-xmlrpc \
--with-xsl \
--with-zlib \
--enable-fpm \
--enable-bcmath \
--enable-libxml \
--enable-inline-optimization \
--enable-gd-native-ttf \
--enable-mbregex \
--enable-mbstring \
--enable-opcache \
--enable-pcntl \
--enable-shmop \
--enable-soap \
--enable-sockets \
--enable-sysvsem \
--enable-xml \
--enable-zip
make
make install
export path=$path:/usr/local/php/bin
cp php.ini-production /usr/local/php/etc/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
export path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/php/bin/php:/usr/local/php/bin:/usr/local/php/sbin
php-fpm -c /usr/local/php/etc/php.ini
yum install glibc-headers gcc-c++
wget
tar zxf swoole-4.3.0
phpize
#我們編譯需要指定乙個php-config的檔案
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
echo "extension=swoole.so" > /usr/local/etc/php/conf.d/swoole.ini
rpm -uvh
yum install -y nginx
systemctl start nginx.service
systemctl enable nginx.service
#開機啟動項
vi /etc/rc.d/rc.local
/usr/sbin/nginx
/usr/local/php/sbin/php-fpm
:wq!
chmod -r 777 /etc/rc.d/rc.loacl
新增環境變數
vi /etc/profile
export path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/php/bin/php:/usr/local/php/bin:/usr/local/php/sbin
:wq!
vi ~/.bashrc
source /etc/profile
:wq!
max_execution_time = 600 ;每個php頁面執行的最大時間值(秒),預設30秒
max_input_time = 600 ;每個php頁面接收資料所需的最大時間,預設60秒
memory_limit = 8m ;每個php頁面所吃掉的最大記憶體,預設8m
max_execution_time = 600
max_input_time = 600
memory_limit = 32m
file_uploads = on
upload_tmp_dir = /tmp
upload_max_filesize = 32m
post_max_size = 32m
imagemagick 安裝
參考:php: 安裝 - manual
yum install imagemagick-devel
pecl install imagick
Ansible 完成LNP基礎環境搭建
1.建立使用者和組groupadd g 666 www useradd u 666 g 666 s sbin nologin m www groupadd g 53 tomcat useradd u 53 g 53 s sbin nologin m tomcat name create group ...
CSS徒手畫鋼鐵俠
鋼鐵俠頭盔在螢幕內放大發光,在縮小變暗。效果圖 不斷來畫變化 然後我們再來怎麼編寫吧 html 主要有div盒子通過相對定位和絕對定位布局組合而成 box2 box 1 div box 2 div box 3 mi 1 div mi 2 div div box 4 div box 5 div box...
徒手實現 KNN演算法問題彙總
問題一 read csv 讀取檔案,執行提示檔案不存在 import pandas as pd data pd.read csv d machinelearning study vehicle.csv 執行報錯 filenotfounderror errno 2 file b d machinele...