DebianLNMP一鍵安裝包遇到的常見問題
類似地址如下:
deb http://security.debian.org/ stable/updates main
deb-src http://security.debian.org/debian/ squeeze main
這個時候,請檢查 vim /etc/apt/sources.list 源地址
國內的服務器換一個 apt-get地址
國內快速的apt-get地址列表:
#deb cdrom:[Debian GNU/Linux 6.0.5 _Squeeze_ - Official i386 NETINST Binary-1 20120512-20:43]/ squeeze main
deb http://cdn.debian.net/debian/ squeeze main
deb-src http://cdn.debian.net/debian/ squeeze main
# squeeze-updates, previously known as 'volatile'
deb http://cdn.debian.net/debian/ squeeze-updates main
deb-src http://cdn.debian.net/debian/ squeeze-updates main
很快提示
Reading package lists... Done
結束
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "zh_CN:zh",
LC_ALL = (unset),
LANG = "zh_CN.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
如圖:
直接選擇"Y"
由於官方網絡源不問題導致dotdeb.gpg 源apt-key add dotdeb.gpg無法下載,獲取不了apt-key。
會無法成功安裝DebianLNMP。
root@debian:~# wget http://www.dotdeb.org/dotdeb.gpg
--2012-12-25 00:52:26-- http://www.dotdeb.org/dotdeb.gpg
正在解析主機 www.dotdeb.org... 失敗:未知的名稱或服務。
wget: 無法解析主機地址 “www.dotdeb.org”
root@debian:~# apt-key add dotdeb.gpg
gpg: 無法打開‘dotdeb.gpg’: 沒有那個文件或目錄
安裝前ping www.dotdeb.org
手工下載
wget http://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg
然後多運行幾次,直到成功,提示"OK".
Debian7.3系統i386版本,安裝的DebianLNMP加強版後。啓動提示php5-fpm faild錯誤信息。
解決方法:創建/var/run/php5/目錄,命令“mkdir /var/run/php5/”
如圖後,可正常啓動php-fpm。
Debian安裝後常見錯誤及解決方法
從Debian7版本開始它的源命名爲“wheezy”;而Debian6版本的源名稱是“squeeze”。我們可從他們的版本命名規則中估計推理其他更多源列表、源地址。
值得注意的是,不同的Debian版本設置sources.list的源列表至關重要,稍有設置不當是無法安裝源裏面的軟件,無法正確獲取到源的信息、內容。並且還要版本能匹配得對,即是說明Deb源要設置正確。
在最小化安裝Debian系統的時候,初始安裝的系統沒有安裝SSH服務,Debian默認沒有安裝SSH軟件包。
Debian7.1 安裝 ssh服務
#使用apt-get命令快速安裝ssh服務 # apt-get install openssh-server #啓動ssh進程 #/etc/init.d/ssh restart
Debian7.1系統安裝軟件常遇見類似錯誤提示:
root@debian7:~# apt-get install -y php5-suhosin
正在讀取軟件包列表... 完成
正在分析軟件包的依賴關係樹
正在讀取狀態信息... 完成
現在沒有可用的軟件包 php5-suhosin,但是它被其它的軟件包引用了。
這可能意味着這個缺失的軟件包可能已被廢棄,
或者只能在其他發佈源中找到
E: 軟件包 php5-suhosin 沒有可供安裝的候選者
錯誤解決方法:檢查sources.list配置文件,採用apt-get安裝軟件時,由於配置文件不正確,導致安裝失敗。
Debian7.1系統默認apt-get配置
#vi /etc/apt/sources.list
安裝好Debian7.1.0系統後,默認的apt-get源,它的默認配置文件爲下文:
# deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official amd64 NETINST Binary-1 20130615-23:04]/ wheezy main #deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official amd64 NETINST Binary-1 20130615-23:04]/ wheezy main deb http://mirrors.163.com/debian/ wheezy main deb-src http://mirrors.163.com/debian/ wheezy main deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main # wheezy-updates, previously known as 'volatile' deb http://mirrors.163.com/debian/ wheezy-updates main deb-src http://mirrors.163.com/debian/ wheezy-updates main
Debian7.1系統安裝MySQL服務器端正確示例:
Mysql [ ok ] Stopping MySQL database server: mysqld. 130622 15:34:38 [Note] Plugin 'FEDERATED'is disabled. 130622 15:34:38 InnoDB: The InnoDB memory heap is disabled 130622 15:34:38 InnoDB: Mutexes and rw_locks useGCC atomic builtins 130622 15:34:38 InnoDB: Compressed tables usezlib 1.2.7 130622 15:34:38 InnoDB: Using Linux native AIO 130622 15:34:38 InnoDB: Initializing buffer pool, size = 128.0M 130622 15:34:38 InnoDB: Completed initialization of buffer pool 130622 15:34:38 InnoDB: highest supported file formatis Barracuda. 130622 15:34:38 InnoDB: Waiting forthe background threads to start 130622 15:34:39 InnoDB: 5.5.31 started; logsequence number 1595675 130622 15:34:39 InnoDB: Starting shutdown... 130622 15:34:40 InnoDB: Shutdown completed; logsequence number 1595675 [ ok ] Starting MySQL database server: mysqld .. [info] Checking fortables which need an upgrade, are corrupt or were not closed cleanly.. 正在設置 libhtml-template-perl (2.91-1) ... 正在設置 mysql-client (5.5.31+dfsg-0+wheezy1) ... 正在設置 mysql-server (5.5.31+dfsg-0+wheezy1) ...
Debian7.1系統中默認安裝的MySQL、PHP版本信息
MySQL 客戶端版本: 5.5.31 服務器版本: 5.5.31-0+wheezy1
PHP版本(php_version): 5.4.16-1~dotdeb.1
Debian7.1系統中默認安裝的 nginx版本信息,以及默認已編譯模塊
[email protected]:~# nginx -V nginx version: nginx/1.4.1 TLS SNI support enabled configure arguments: --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log--http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log--http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock--pid-path=/var/run/nginx.pid --with-pcre-jit --with-debug --with-file-aio --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_p_w_picpath_filter_module --with-http_realip_module --with-http_secure_link_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-mail --with-mail_ssl_module --add-module=/usr/src/nginx/source/nginx-1.4.1/debian/modules/nginx-auth-pam --add-module=/usr/src/nginx/source/nginx-1.4.1/debian/modules/nginx-dav-ext-module --add-module=/usr/src/nginx/source/nginx-1.4.1/debian/modules/nginx-echo --add-module=/usr/src/nginx/source/nginx-1.4.1/debian/modules/nginx-upstream-fair --add-module=/usr/src/nginx/source/nginx-1.4.1/debian/modules/nginx-syslog --add-module=/usr/src/nginx/source/nginx-1.4.1/debian/modules/nginx-cache-purge --add-module=/usr/src/nginx/source/nginx-1.4.1/debian/modules/ngx_http_pinba_module --add-module=/usr/src/nginx/source/nginx-1.4.1/debian/modules/ngx_http_substitutions_filter_module --add-module=/usr/src/nginx/source/nginx-1.4.1/debian/modules/nginx-x-rid-header --with-ld-opt=-lossp-uuid
[End]