<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ## 1(50分)部署dedecms(www網站),discuz(bbs網站),wordpress(blog網站),并把用戶上傳的目錄掛載到nfs01的/data/www /data/bbs /data/blog上 ### 以下是web01(10.0.0.8),web02(10.0.0.7)上的部署, #### 一, 安裝nginx ##### 01,下載,解壓nginx源碼 ~~~ mkdir /root/tools -p cd /root/tools yum install openssl openssl-devel -y yum install pcre pcre-devel -y useradd www -u 888 -s /sbin/nologin -M wget -q http://nginx.org/download/nginx-1.14.0.tar.gz tar xf nginx-1.14.0.tar.gz ~~~ ##### 02,配置nginx ~~~ cd /root/tools/nginx-1.14.0 ./configure --user=www --group=www --with-http_ssl_module --with-http_stub_status_module --prefix=/apps/nginx-1.14.0/ ~~~ ##### 03,編譯安裝nginx ~~~ make make install ~~~ ##### 04,給nginx目錄創建軟連接 ~~~ ln -s /apps/nginx-1.14.0/ /apps/nginx ~~~ ##### 05,修改nginx配置文件 ~~~ # nginx.conf cat >nginx.conf<<EOF worker_processes 1; error_log logs/error.log; error_log logs/error.log notice; error_log logs/error.log info; pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on; keepalive_timeout 65; include extra/www.conf; include extra/bbs.conf; include extra/blog.conf; } EOF # extra/www.conf cat >extra/www.conf <<EOF server { listen 80; server_name www.etiantian.org; location / { root html/www; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html/www; } location ~ \.php$ { root html/www; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } } EOF # extra/bbs.conf cat >extra/bbs.conf <<EOF server { listen 80; server_name bbs.etiantian.org; location / { root html/bbs; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html/bbs; } location ~ \.php$ { root html/bbs; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } } EOF # extra/blog.conf cat >extra/blog.conf <<EOF server { listen 80; server_name blog.etiantian.org; location / { root html/blog; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html/blog; } location ~ \.php$ { root html/blog; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } } EOF ~~~ ##### 06,nginx開機自啟動 ~~~ ln -s /apps/nginx/sbin/nginx /usr/bin/nginx echo '/usr/bin/nginx' >> /etc/rc.local ~~~ #### 二,安裝php ##### 01,安裝依賴庫 ```Bash yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel curl-devel -y yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel -y rpm -qa zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel curl-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel ``` ##### 02, 安裝其它相關程序---libmcrypt ```Bash #wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo yum -y install libmcrypt-devel mhash mcrypt rpm -qa libmcrypt-devel mhash mcrypt #php下載地址 http://php.net/releases/ ``` ##### 03, 下載并解壓 ```Bash #下載安裝包并解壓 cd /root/tools/ wget http://cn2.php.net/distributions/php-5.6.36.tar.gz tar xf php-5.6.36.tar.gz cd php-5.6.36 #----正式編譯前也可以把這個軟件安裝上(libxslt*) ``` ##### 04, 配置 ``` ./configure --prefix=/apps/php-5.6.36 \ --with-mysql=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-freetype-dir \ --with-jpeg-dir \ --with-png-dir \ --with-zlib \ --with-libxml-dir=/usr \ --enable-xml \ --disable-rpath \ --enable-bcmath \ --enable-shmop \ --enable-sysvsem \ --enable-inline-optimization \ --with-curl \ --enable-mbregex \ --enable-fpm \ --enable-mbstring \ --with-mcrypt \ --with-gd \ --enable-gd-native-ttf \ --with-openssl \ --with-mhash \ --enable-pcntl \ --enable-sockets \ --with-xmlrpc \ --enable-soap \ --enable-short-tags \ --enable-static \ --with-xsl \ --with-fpm-user=www \ --with-fpm-group=www \ --enable-ftp \ --enable-opcache=no ``` ##### 05, 編譯--安裝--安裝目錄創建軟連接 ```bash touch ext/phar/phar.phar #這個文件一定要創建 make && make install ln -s /apps/php-5.6.36/ /apps/php ``` ##### 06,復制php配置文件 ~~~ cp /root/tools/php-5.6.36/php.ini-production /apps/php-5.6.36/lib/php.ini cp /apps/php-5.6.36/etc/php-fpm.conf.default /apps/php-5.6.36/etc/php-fpm.conf ~~~ ##### 07,檢查并啟動php ~~~ /apps/php-5.6.36/sbin/php-fpm -t /apps/php-5.6.36/sbin/php-fpm ss -lntup |grep 9000 ~~~ ##### 08,php-fpm開機自啟動 ~~~ ln -s /apps/php/sbin/php-fpm /usr/bin/php-fpm echo '/usr/bin/php-fpm' >> /etc/rc.local ~~~ ### 在數據庫服務器上安裝mysql,ip為10.0.0.51 #### 數據庫安裝 ##### 0.準備工作-下載mysql ``` # 下載地址 # https://downloads.mysql.com/archives/community/ mkdir /root/tools -p cd /root/tools wget https://downloads.mysql.com/archives/get/file/mysql-5.6.40-linux-glibc2.12-x86_64.tar.gz ``` ##### 1.添加用戶 ``` useradd -s /sbin/nologin -M mysql ``` ##### 2.解壓 mysql 二進制包 ``` cd /root/tools tar xf mysql-5.6.40-*-x86_64.tar.gz ``` ##### 3.把MySQL 移動到 /apps/ ``` mkdir -p /apps/ mv /root/tools/mysql-5.6.40-*-x86_64 /apps/mysql-5.6.40 ``` ##### 4.創建軟連接 ``` ln -s /apps/mysql-5.6.40/ /apps/mysql ``` ##### 5.讓MySQL用戶管理 /apps/mysql ``` chown -R mysql.mysql /apps/mysql/data ``` ##### 6.安裝這個軟件 初始化數據庫 ``` /apps/mysql/scripts/mysql_install_db --basedir=/apps/mysql --datadir=/apps/mysql/data --user=mysql ``` ##### 7.復制啟動腳本 授權 ``` cp /apps/mysql/support-files/mysql.server /etc/init.d/mysqld chmod +x /etc/init.d/mysqld ``` ##### 8.修改啟動腳本 和 mysql命令 中的路徑 ``` sed -i 's#/usr/local/mysql#/apps/mysql#g' /apps/mysql/bin/mysqld_safe /etc/init.d/mysqld ``` ##### 9.復制 默認的配置文件 ``` \cp /apps/mysql/support-files/my-default.cnf /etc/my.cnf /etc/init.d/mysqld start ``` ##### 10.PATH路徑 ``` echo 'export PATH=/apps/mysql/bin:$PATH' >>/etc/profile source /etc/profile which mysql ``` ##### 11.加入開機自啟動 ``` chkconfig --add mysqld chkconfig mysqld on chkconfig | grep mysql ``` ##### 12.給MySQL root用戶設置密碼 ``` /apps/mysql/bin/mysqladmin -u root password 'oldboy123' ``` ##### 13.重新登錄MySQL數據庫,創建所需數據庫 ``` mysql -uroot -poldboy123 create database discuz; grant all on discuz.* to 'discuz'@'172.16.1.0/255.255.255.0' identified by '123456'; create database dedecms; grant all on dedecms.* to 'dedecms'@'172.16.1.0/255.255.255.0' identified by '123456'; create database wordpress; grant all on wordpress.* to 'wordpress'@'172.16.1.0/255.255.255.0' identified by '123456'; flush privileges; # mysql -uwordpress -p123456 -h 172.16.1.8 ``` ### 三,部署網站,把 ~~~ cd /root/tools wget https://cn.wordpress.org/wordpress-4.9.4-zh_CN.tar.gz tar xf wordpress-4.9.4-zh_CN.tar.gz cd wordpress/ \cp * /apps/nginx/html/blog/ -a cd /root/tools wget http://updatenew.dedecms.com/base-v57/package/DedeCMS-V5.7-UTF8-SP2-Full.tar.gz tar xf DedeCMS-V5.7-UTF8-SP2-Full.tar.gz cd DedeCMS-V5.7-UTF8-SP2-Full/uploads/ \cp * /apps/nginx/html/www/ -a cd /root/tools wget http://download.comsenz.com/DiscuzX/3.3/Discuz_X3.3_SC_UTF8.zip unzip Discuz_X3.3_SC_UTF8.zip cd upload/ \cp * /apps/nginx/html/bbs/ -a cd /apps/nginx chown -R www.www html ~~~ ### 安裝dedecms,discuz,wordpress截圖,見附件 `安裝dedecms,discuz,worpress截圖.pdf` ~~~ web01安裝完成以后,把html/下的內容全部復制到web02上面 scp -r root@10.0.0.8:/apps/nginx/html/* /apps/nginx/html/ chown -R www.www /apps/nginx/html/ ~~~ ### 配置nfs01,存儲服務 ~~~ #1,安裝nfs和rpcbind yum install nfs-utils rpcbind -y #2,啟動rpcbind和nfs服務 #先啟動rpcbind /etc/init.d/rpcbind start #再啟動nfs /etc/init.d/nfs start #3,開機自啟動 chkconfig nfs on chkconfig rpcbind on #4,創建/data目錄,更改所屬用戶和用戶組 useradd www -u 888 -s /sbin/nologin -M mkdir /data/{www,bbs,blog} -p chown -R www.www /data/ #5,配置NFS服務,分享/data目錄 vim /etc/exports #share /data 172.16.1.0/24 /data/www 172.16.1.0/24(rw,sync,all_squash,anonuid=888,anongid=888) /data/bbs 172.16.1.0/24(rw,sync,all_squash,anonuid=888,anongid=888) /data/blog 172.16.1.0/24(rw,sync,all_squash,anonuid=888,anongid=888) #6,重啟nfs服務 /etc/init.d/nfs reload #7,在web01,web02上掛載 yum install nfs-utils rpcbind -y /etc/init.d/rpcbind start chkconfig rpcbind on chkconfig nfs off mount -t nfs 172.16.1.31:/data/www /apps/nginx/html/www/upload mount -t nfs 172.16.1.31:/data/bbs /apps/nginx/html/bbs/data/attachment/forum mount -t nfs 172.16.1.31:/data/blog /apps/nginx/html/blog/wp-content/uploads ~~~
                  <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>

                              哎呀哎呀视频在线观看