跳到主要內容

發表文章

解決在CentOS 6.8 無法使用vmware workstation 12 的問題

問題出在使用了 2.6.32-642 或以上的kernel 造成的, 因此: yum groupinstall "Development tools" yum install kernel-headers kernel-devel 然後開始安裝vmware, 之後 : 查看使用中的kernel   uname -r ln -s /lib/modules/2.6.32-642.3.1.el6.x86_64/build/include/linux /lib/modules/2.6.32-642.3.1.el6.x86_64/build/include/generated cd /usr/lib/vmware/modules/source/ tar xvf vmnet.tar cd vmnet-only/ vi netif.c 修改成以下: (comment lines 152, 153, 154 and 156) //#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(NET_NAME_USER) //   dev = alloc_netdev(sizeof *netIf, deviceName, NET_NAME_USER, VNetNetIfSetup); //#else    dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup); //#endif 儲存然後退出 mv vmnet.tar vmnet.orig.tar tar cvf vmnet.tar vmnet-only 之後打開workstation

讓CentOS 支援 HTTP/2 的方法

yum groupinstall "Development Tools" wget http://www.us.apache.org/dist//apr/apr-1.5.2.tar.gz wget http://www.us.apache.org/dist//apr/apr-util-1.5.4.tar.gz wget https://github.com/tatsuhiro-t/nghttp2/releases/download/v1.4.0/nghttp2-1.4.0.tar.gz wget https://www.openssl.org/source/openssl-1.0.2d.tar.gz wget http://www.eu.apache.org/dist//httpd/httpd-2.4.18.tar.gz tar xvf apr-1.5.2.tar.gz cd apr-1.5.2 ./configure make make install cd .. tar xvf apr-util-1.5.4.tar.gz cd apr-util-1.5.4 ./configure --with-apr=/usr/local/apr/ make make install cd .. tar xvf nghttp2-1.4.0.tar.gz cd nghttp2-1.4.0 ./configure make make install cd .. tar xvf openssl-1.0.2d.tar.gz cd openssl-1.0.2d ./config shared make make install yum install pcre-devel zlib-devel libxml2-devel cd .. tar xvf httpd-2.4.18.tar.gz cd httpd-2.4.18.tar.gz cd httpd-2.4.18 make clean make distclean ./configure --enable-ssl --enable-so --enable-cache --enable-socache-memcache --e...

讓 Ubuntu 的Apache 支援 HTTP/2 的方法

網路上找到的方法如下: sudo -i apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y reboot sudo -i apt-get install python-software-properties add-apt-repository -y ppa:ondrej/apache2 add-apt-repository -y ppa:ondrej/php5 apt-key update apt-get update && apt-get upgrade -y apt-get install -y php5-fpm apache2 a2enmod proxy_fcgi proxy proxy_http http2 ssl expires headers rewrite Change php5-fpm config to use TCP connection instead of socket. sudo sed -i "s/listen =.*/listen = 127.0.0.1:9000/" /etc/php5/fpm/pool.d/www.conf Open and edit the default HTTP virtual host. nano /etc/apache2/sites-enabled/000-default.conf Add these lines to the default HTTP virtual host config file, this assumes you have your DocumentRoot set to /var/www/html, in an existing setup this could be different and would need to be modified. ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/$1 # for a https server Protocols h2 htt...

讓CentOS 6 也能安裝 Apache 2.4

網路上找到的方法如下: Step 1: cd /etc/yum.repos.d/ wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo Step 2: yum install httpd24.x86_64 Step 3: $ /opt/rh/httpd24/root/usr/sbin/httpd -version Server version: Apache/2.4.6 (Red Hat) Server built:   Sep 25 2013 05:25:46 NOTE: config files are in: /opt/rh/httpd24/root/etc/httpd $ ls conf  conf.d  conf.modules.d  logs  modules  run EDIT: in case you want to switch off Apache 2.2 $ chkconfig httpd off $ chkconfig --list | grep httpd httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off httpd24-httpd   0:off   1:off   2:off   3:off   4:off   5:off   6:off EDIT 2: http://wiki.apache.org/httpd/PHP-FPM yum install php-fpm /etc/init.d/php-fpm start service httpd24-httpd start

解決 WARNING: "pear/DB" is deprecated in favor of "pear/MDB2" 的問題

伺服器是CentOS 5.7, 安裝了PHP 5.4.45 以及最新的PHP PEAR, 卻發現無法安裝pear db, 顯示:  WARNING: "pear/DB" is deprecated in favor of "pear/MDB2" 先確認 pear version, 倘若證實是 1.9.4, 解決辦法如下: 1.  pear version 2.   pear config - set auto_discover 1 3.   pear install -- force -- alldeps db 倘若要安裝phpqatools, 方法也一樣: pear install --force --alldeps pear.phpqatools.org/phpqatools 有些伺服器無法運行以上的, 因此要下載php phar 1. 下載 http://pear.php.net/go-pear.phar 2. 執行 go-pear.phar, 選擇system 來安裝 Download http://pear.php.net/go-pear.phar , execute it, select system wide install and adapt all the pathes to your location.

解決CentOS 6.7 vmware 的 Could not open /dev/vmmon: No such file or directory 的問題

 yum install automake gcc kernel-devel cd /tmp tar -xzvf /usr/lib/vmware/modules/source/vmmon.tar cd vmmon-only/ make ls /lib/modules/ -al 查看最新的, 比如 2.6.32-573.3.1.el6.x86_64 cp vmmon.ko /lib/modules/2.6.32-573.3.1.el6.x86_64/misc/vmmon.ko modprobe vmmon 重新start VM

解決 Synology DSM 5.1 造成的網路慢的問題

日前發現 ping google.com 時發現timed out / 慢得離譜 (而且顯示的是google 的 ip6 地址), 安裝的 DNS server 服務也被拖累. 主因似乎是我的網路暫時不支援IPv6 / IPv4 跟 IPv6 相衝, 因此只要關閉 IPv6 就好. 打開 控制台 進入 網路 選擇 網路介面 編輯 區域網路 在 IPv6 下, IPv6 設定 , 選擇 關閉 儲存