1.ExpanDrive v1.8.3 連接Ubuntu 失敗
提示: Connection Refused
We were able to contact the server, but it refused your connection. Check to see if the server's SSH component is running
or if a fiewall is blocking access.
解決: 在 Ubuntu 系統上安裝 SSH 即可。
2.安裝SSH
sudo yum install ssh
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>
解決: 改成用 apt-get 即可
sudo apt-get install ssh
3.g++ 在 Ubuntu 中找不到
解決:
sudo apt-get install build-essential
4.Ubuntu 中 mysql.h: No such file or directory
解決:
sudo apt-get install libmysqlclient-dev
5.客戶端connect后返回錯誤 no route to host 113
解決:
firewall(防火牆)的問題, services iptables stop 應該就ok了
====================================
CentOS
1.安裝C++
yum install gcc-c++
2.安裝ntpdate
yum install ntpdate
CentOS 更新時間
ntpdate time.nist.gov
date 查看當前時間
3.安裝vim
yum install vim
4.安裝mysql
yum install mysql // 客戶端
yum install mysql-server // 服務器
yum install mysql-devel
5.CentOS設置靜態IP
network 常用配置地址
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/init.d/network restart
/etc/resolv.conf
采用動態IP,只需要修改 /etc/sysconfig/network-scripts/ifcfg-eth0 即可
DEVICE=eth0
TYPE=Ethernet
UUID=5ca6f448-820b-4b97-960b-c1277cf73316
ONBOOT=yes # no 的話則無網絡
NM_CONTROLLED=yes
BOOTPROTO=dhcp # dhcp動態網絡, static靜態
HWADDR=00:0C:29:11:3F:6A
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
==========================================
1.Ubuntu 搭建 阿帕奇 服務器
sudo apt-get install apache2
問題1:
sudo service apache2 restart
* Restarting web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
解決:
sudo gedit /etc/apache2/apache2.conf
在文件最后面添加:
#Server Name
ServerName 127.0.0.1
重啟apache
sudo service apache2 restart
2.Ubuntu 編寫PHP測試代碼
運行http://localhost/test.php的時候
1>無任何顯示。空白
或提示
Not Found
The requested URL /test.php was not found on this server。
解決:
test.php 放在了錯誤的目錄 /var/www/ 下,應該放在 /var/www/html/ 下
2>讓php顯示報錯信息。
在 .php文件前面添加如下代碼
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);