<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 在Linux安裝部署Nginx+MySQL+PHP(LNMP ) ## 安裝Nginx ``` cd /opt mkdir src ``` 下載阿里云yum源更新腳本 ``` wget http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/41177/cn\_zh/1504061676920/update\_source.sh ``` 為該腳本添加執行權限 ``` chmod +x update_source.sh ``` 開始執行更新yum源腳本 ``` sh update_source.sh ``` 使用yum安裝一些基礎庫 ``` yum install -y make cmake gcc gcc-c++ autoconf automake libpng-devel libjpeg-devel zlib libxml2-devel ncurses-devel bison libtool-ltdl-devel libiconv libmcrypt mhash mcrypt libmcrypt-devel pcre-devel openssl-devel freetype-devel libcurl-devel ``` 下載nginx源碼 ``` cd /opt/src wget http://nginx.org/download/nginx-1.8.0.tar.gz ``` 解壓文件 ``` tar -zxvf nginx-1.8.0.tar.gz ``` 添加一個叫做www的用戶 ``` cd nginx-1.8.0 useradd www -M -s /sbin/nologin ``` 配置nginx安裝參數 ``` ./configure --prefix=/opt/nginx --user=www --group=www --with-http\_stub\_status\_module --with-http\_ssl\_module ``` 開始編譯源代碼 ``` make ``` 安裝nginx ``` make install clean ``` 啟動nginx ``` /opt/nginx/sbin/nginx ``` ## 安裝php ``` cd /opt/src ``` 下載php源代碼 ``` wget http://cn2.php.net/distributions/php-5.6.10.tar.gz ``` 解壓 ``` tar -zxvf php-5.6.10.tar.gz ``` 配置php安裝參數 ``` cd php-5.6.10 ./configure --prefix=/opt/php --with-mysql --with-mysqli --with-iconv-dir --with-zlib --with-libxml-dir --enable-xml --with-curl --enable-fpm --enable-mbstring --with-gd --with-openssl --with-mhash --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-libdir=/usr/lib64 --with-jpeg-dir=/usr/lib64 --with-freetype-dir=/usr/lib64 --with-png-dir=/usr/lib64 --with-fpm-user=www --with-fpm-group=www? make make install clean cd /opt/src/php-5.6.10 cp php.ini-development /opt/php/lib/php.ini cd /opt/php/etc/ cp php-fpm.conf.default php-fpm.conf cd /opt/src/php-5.6.10/sapi/fpm/ cp init.d.php-fpm /etc/init.d/php-fpm chmod +x /etc/init.d/php-fpm ? service php-fpm start ``` 加入開啟啟動 ``` chkconfig --add php-fpm chkconfig php-fpm on ``` 配置 Nginx可以解析php文件 ``` cd /opt/nginx/conf/ ``` 創建網站根目錄 以后我們的網站全部放在這里 ``` mkdir /opt/webroot vi nginx.conf ``` Nginx配置文件內容 請刪除原來的內容 替換下面的 ``` { worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; gzip on; server { listen 80; server_name localhost; root /opt/webroot; index index.php index.html index.htm; location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params; try_files $uri =404; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } } ``` Nginx配置文件內容結束 關閉nginx進程重新啟動 ``` killall nginx /opt/nginx/sbin/nginx ``` 創建一個php文件 ``` cd /opt/webroot vi info.php ``` info.php 文件內容 ``` <?php phpinfo(); ``` 重啟Nginx ``` /opt/nginx/sbin/nginx -s reload或/opt/nginx/sbin/nginx ``` 為Nginx添加自啟動 ``` mkdir /opt/shell cd /opt/shell vi nginxrun.sh ``` [nginxrun.sh腳本內容](https://www.nginx.com/resources/wiki/start/topics/examples/redhatnginxinit/): ``` #!/bin/sh /opt/nginx/sbin/nginx ``` 給這個腳本文件添加執行權限 ``` chmod +x /opt/shell/nginxrun.sh ``` 加入開啟自啟動文件里面去 ``` vi /etc/rc.local ``` 在/etc/rc.local文件的最后面添加一行 ``` /opt/shell/nginxrun.sh ``` ## 安裝kod 云盤應用 ``` cd /opt/webroot mkdir kod cd kod ``` 下載kod程序源碼 ``` wget http://static.kodcloud.com/update/download/kodexplorer4.21.zip ``` 安裝解壓軟件 ``` yum install -y unzip unzip kodexplorer4.21.zip chmod -R 777 /opt/webroot ``` ## 安裝mysql ``` cd /opt/src/ ``` 下載mysql源代碼 ``` wget http://cdn.markdream.com/ref/sources/lnmp/mysql-5.6.20.tar.gz ``` 解壓 ``` tar -zxvf mysql-5.6.20.tar.gz cd mysql-5.6.20 配置mysql安裝參數 ``` 配置mysql安裝參數 ``` cmake -DCMAKE_INSTALL_PREFIX=/opt/mysql make make install clean ``` 添加mysql用戶 ``` useradd mysql -M -s /sbin/nologin cd /opt/mysql/scripts ``` 安裝數據庫 ``` ./mysql_install_db --user=mysql --basedir=/opt/mysql --datadir=/opt/mysql/data cd /opt/mysql/support-files ``` 復制mysql管理腳本 ``` cp mysql.server /etc/rc.d/init.d/mysql ``` 復制mysql配置文件 ``` cp my-default.cnf /etc/my.cnf ``` 添加mysql服務 ``` chkconfig --add mysql ``` 加入開機啟動策略 ``` chkconfig mysql on ``` 啟動mysql ``` service mysql start ``` 修改mysql數據庫 root的賬號密碼 并且允許遠程登錄 進入管理mysql數據庫 ``` /opt/mysql/bin/mysql ``` 之后你會看見類似 ?mysql> ?開頭的命令行 表示允許root用戶可以在遠程任何地方登錄 且登錄的密碼為 123456 ``` GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; ``` 刷新mysql權限讓用戶生效 ``` FLUSH PRIVILEGES; ``` 退出mysql ``` quit ``` 重新啟動mysql服務 ``` service mysql restart ``` 重置KodExplorer 密碼 ``` cd /opt/webroot/kod rm -rf data/system/install.lock ``` 至此已經完全安裝了LNMP,可道云與PHPCMS可以按需安裝。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看