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